# $Id: PKGBUILD 73287 2012-07-05 18:27:17Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: yugrotavele <yugrotavele at archlinux dot us>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
# Contributor: Arnaud Durand <biginozNOSPAM_at_free.dot.fr>
# Contributor: Nuno Araujo <nuno.araujo at russo79.com>

pkgname=bleachbit
pkgver=0.9.3
pkgrel=1
pkgdesc="Deletes unneeded files to free disk space and maintain privacy"
arch=('any')
url="http://bleachbit.sourceforge.net/"
license=('GPL3')
depends=('pygtk>=2' 'python2>=2.6')
install=$pkgname.install
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
md5sums=('9c3c1e31d74500cb22505b0df19adac6')

package() {
    cd $srcdir/$pkgname-$pkgver

    # Fix python2 header
    for file in $(find . -name '*.py' -print); do
        sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
        sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
    done
    sed -i 's/python/python2/g' Makefile

    # Compile
    make prefix=/usr DESTDIR=$pkgdir PYTHON=python2 install
}
