# $Id: PKGBUILD 122757 2014-11-19 15:26:06Z fyan $
# 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.6
pkgrel=1
pkgdesc='Deletes unneeded files to free disk space and maintain privacy'
arch=('any')
url='http://bleachbit.sourceforge.net/'
license=('GPL3')
depends=('pygtk' 'python2' 'desktop-file-utils' 'gtk-update-icon-cache'
         'hicolor-icon-theme')
install=$pkgname.install
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
md5sums=('10e12cd3896dcfee2c4e56c83850298d')

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
}
