[arch-commits] Commit in python-gflags/repos (community-any community-any/PKGBUILD)

Ike Devolder idevolder at archlinux.org
Wed May 18 19:24:20 UTC 2016


    Date: Wednesday, May 18, 2016 @ 21:24:20
  Author: idevolder
Revision: 175645

archrelease: copy trunk to community-any

Added:
  python-gflags/repos/community-any/
  python-gflags/repos/community-any/PKGBUILD
    (from rev 175644, python-gflags/trunk/PKGBUILD)

----------+
 PKGBUILD |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

Copied: python-gflags/repos/community-any/PKGBUILD (from rev 175644, python-gflags/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2016-05-18 19:24:20 UTC (rev 175645)
@@ -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"
+}
+



More information about the arch-commits mailing list