# $Id: PKGBUILD 113048 2014-06-12 02:02:59Z eric $
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# 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=1.2
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' 'desktop-file-utils' 'gtk-update-icon-cache'
         'hicolor-icon-theme')
install=$pkgname.install
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
md5sums=('a4832f2333b76e5647337b8ac2a387a7')

package() {
    cd $pkgname-$pkgver

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

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