Date: Wednesday, May 18, 2016 @ 21:17:23 Author: idevolder Revision: 175643
python-gflags :: python2 and python version Added: python-gflags/ python-gflags/repos/ python-gflags/trunk/ python-gflags/trunk/PKGBUILD ----------+ PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) Added: python-gflags/trunk/PKGBUILD =================================================================== --- python-gflags/trunk/PKGBUILD (rev 0) +++ python-gflags/trunk/PKGBUILD 2016-05-18 19:17:23 UTC (rev 175643) @@ -0,0 +1,50 @@ +# $Id$ +# Maintainer: BlackEagle < ike DOT devolder AT gmail DOT com > +pkgbase=python-gflags +pkgname=('python-gflags' 'python2-gflags') +pkgver=3.0.5 +pkgrel=1 +pkgdesc="Commandline flags module for Python" +arch=('any') +url="https://github.com/google/python-gflags" +license=('BSD') +makedepends=('python2-setuptools' 'python-setuptools') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/google/$pkgbase/archive/$pkgver.tar.gz") +sha256sums=('5558a2137a35cf847421393405df1d787fb2958d1d2aa7b5ad669d19efab9097') + +prepare() { + cp -a "$pkgbase-$pkgver" "${pkgbase/python/python2}-$pkgver" +} + +build() { + cd "$srcdir/$pkgbase-$pkgver" + python setup.py build + + cd "$srcdir/${pkgbase/python/python2}-$pkgver" + python2 setup.py build +} + +package_python-gflags() { + depends=('python') + cd "$pkgbase-$pkgver" + python setup.py install --root=${pkgdir} + chmod +x "$pkgdir/usr/bin/gflags2man.py" + #chmod +r ${pkgdir}/* -R + #install -dm755 ${pkgdir}/usr/share/licenses/${pkgname} + install -Dm644 AUTHORS "$pkgdir/usr/share/licenses/$pkgbase/AUTHORS" + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgbase/COPYING" +} + +package_python2-gflags() { + depends=('python2') + cd ${pkgbase/python/python2}-${pkgver} + find -name "*.py" -exec sed -e 's/env python/&2/' -i {} \; + python2 setup.py install --root=${pkgdir} + mv "$pkgdir/usr/bin/gflags2man.py" "$pkgdir/usr/bin/gflags2man.py2" + chmod +x "$pkgdir/usr/bin/gflags2man.py2" + #chmod +r ${pkgdir}/* -R + #install -dm755 ${pkgdir}/usr/share/licenses/${pkgname} + install -Dm644 AUTHORS "$pkgdir/usr/share/licenses/${pkgbase/python/python2}/AUTHORS" + install -Dm644 COPYING "$pkgdir/usr/share/licenses/${pkgbase/python/python2}/COPYING" +} + Property changes on: python-gflags/trunk/PKGBUILD ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property