Date: Wednesday, February 14, 2018 @ 13:22:14
  Author: dvzrv
Revision: 294303

archrelease: copy trunk to community-any

Added:
  python-linux-procfs/repos/community-any/
  python-linux-procfs/repos/community-any/PKGBUILD
    (from rev 294302, python-linux-procfs/trunk/PKGBUILD)

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

Copied: python-linux-procfs/repos/community-any/PKGBUILD (from rev 294302, 
python-linux-procfs/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD                              (rev 0)
+++ community-any/PKGBUILD      2018-02-14 13:22:14 UTC (rev 294303)
@@ -0,0 +1,59 @@
+# Maintainer: David Runge <d...@sleepmap.de>
+# Contributor: Joakim Hernberg <jhernb...@alchemy.lu>
+# Contributor: Ninez <triplesquaredn...@gmail.com>
+
+pkgbase=python-linux-procfs
+pkgname=('python-linux-procfs' 'python2-linux-procfs')
+pkgver=0.5.1
+pkgrel=3
+pkgdesc="Linux /proc abstraction classes for python"
+arch=('any')
+url="https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git/";
+license=('GPL')
+makedepends=('python-setuptools' 'python-six' 'python2-setuptools' 
'python2-six')
+source=("https://git.kernel.org/pub/scm/libs/python/${pkgbase}/${pkgbase}.git/snapshot/${pkgbase}-${pkgver}.tar.gz";)
+sha512sums=('eb57fbc17e918cea1234323bf48ea228df00dafb5344dad94cf88c63116058c75c4e8113e203d10eb5005592aad5d55abfc9587d43e18b4ff5ac100833ad3cee')
+
+prepare() {
+  cp -av "${pkgname[0]}-${pkgver}" "${pkgname[1]}-${pkgver}"
+  cd "${pkgname[1]}-${pkgver}"
+  # fixing shebang of scripts
+  sed -e '1s/python/python2/' -i procfs/*.py pflags
+}
+
+build() {
+  cd "${pkgname[0]}-${pkgver}"
+  python setup.py build
+  cd ../"${pkgname[1]}-${pkgver}"
+  python2 setup.py build
+}
+
+check() {
+  cd "${pkgname[0]}-${pkgver}"
+  export PYTHONPATH=${srcdir}/${pkgname}-${pkgver}/build:${PYTHONPATH}
+  python bitmasklist_test.py
+
+  cd ../"${pkgname[1]}-${pkgver}"
+  export PYTHONPATH=${srcdir}/${pkgname}-${pkgver}/build:${PYTHONPATH}
+  python2 bitmasklist_test.py
+}
+
+package_python-linux-procfs() {
+  depends=('python')
+  cd "${pkgname[0]}-${pkgver}"
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}/"
+}
+
+package_python2-linux-procfs() {
+  depends=('python2')
+  cd "${pkgname[1]}-${pkgver}"
+  python2 setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}/"
+  mv -v ${pkgdir}/usr/bin/pflags ${pkgdir}/usr/bin/pflags2
+}
+# vim:set ts=2 sw=2 et:

Reply via email to