# $Id: PKGBUILD 135637 2015-06-20 08:36:23Z arojas $
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# 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.8
pkgrel=1
pkgdesc='Deletes unneeded files to free disk space and maintain privacy'
arch=(any)
url='http://bleachbit.sourceforge.net/'
license=(GPL3)
depends=(pygtk desktop-file-utils gtk-update-icon-cache hicolor-icon-theme)
install=$pkgname.install
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
md5sums=('433f9d655c366aac50ca2d5f9aa8b86d')

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
}
