Date: Friday, February 2, 2018 @ 20:46:38
  Author: dvzrv
Revision: 288648

upgpkg: python-iwlib 1.5-8

Providing python2 version in a split-package.

Modified:
  python-iwlib/trunk/PKGBUILD

----------+
 PKGBUILD |   33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-02-02 18:46:33 UTC (rev 288647)
+++ PKGBUILD    2018-02-02 20:46:38 UTC (rev 288648)
@@ -1,33 +1,52 @@
 # Maintainer: David Runge <d...@sleepmap.de>
 
-pkgname=python-iwlib
+pkgbase=python-iwlib
+pkgname=('python-iwlib' 'python2-iwlib')
 pkgver=1.5
-pkgrel=7
+pkgrel=8
 pkgdesc='Python module to interface with iwlib'
 arch=('x86_64')
 url='https://github.com/nathan-hoad/python-iwlib'
 license=('GPL2')
-depends=('python' 'wireless_tools')
-makedepends=('python-setuptools')
+makedepends=('python-setuptools' 'python2-setuptools' 'wireless_tools')
 
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/nathan-hoad/${pkgname}/archive/${pkgver}.tar.gz";)
 
sha512sums=('2b79e412949a465d1383620745b6bfbf5924ef8ed47d459882afc5c86e54d10d1b963055df7076a481fb7bd6ade1d318ce35ed36ee5c129c048bbf6b1790f432')
 
+prepare(){
+  cp -a "${pkgname[0]}-${pkgver}" "${pkgname[1]}-${pkgver}"
+}
+
 build() {
   cd "${pkgname}-${pkgver}"
   python setup.py build
+  cd ../"${pkgname[1]}-${pkgver}"
+  python2 setup.py build
 }
 
 check() {
   cd "${pkgname}-${pkgver}"
   python setup.py test
+  cd ../"${pkgname[1]}-${pkgver}"
+  python2 setup.py test
 }
 
-package() {
+package_python-iwlib() {
+  depends=('python' 'wireless_tools')
   cd "${pkgname}-${pkgver}"
-  python setup.py install --skip-build --optimize=1 --prefix=/usr \
-  --root="${pkgdir}/"
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
 
   install -t "${pkgdir}/usr/share/doc/${pkgname}/" \
     -vDm644 {AUTHORS,README.rst}
 }
 
+package_python2-iwlib() {
+  depends=('python2' 'wireless_tools')
+  cd "${pkgname[1]}-${pkgver}"
+  python2 setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
+}

Reply via email to