aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-ethtool/APKBUILD
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-03-28 15:55:36 +0200
committerprspkt <prspkt@protonmail.com>2019-03-28 16:06:26 +0200
commit1e4bd108ccc057442ab035758575e332efcf8148 (patch)
treeba71a457ee0c53656b9e72c4e5c2d2cc394a28b6 /community/py-ethtool/APKBUILD
parentbafb8bcff3f0fa961f29a26301361f04642dc42f (diff)
downloadaports-1e4bd108ccc057442ab035758575e332efcf8148.tar.bz2
aports-1e4bd108ccc057442ab035758575e332efcf8148.tar.xz
testing/py-ethtool: add python3
Diffstat (limited to 'community/py-ethtool/APKBUILD')
-rw-r--r--community/py-ethtool/APKBUILD33
1 files changed, 29 insertions, 4 deletions
diff --git a/community/py-ethtool/APKBUILD b/community/py-ethtool/APKBUILD
index 8acfe662f8..645eb3af45 100644
--- a/community/py-ethtool/APKBUILD
+++ b/community/py-ethtool/APKBUILD
@@ -11,7 +11,7 @@ depends=
depends_dev="libnl-dev pkgconfig python2-dev"
makedepends="linux-headers $depends_dev"
install=
-subpackages=
+subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3 $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/fedora-python/python-ethtool/archive/v$pkgver.tar.gz
python-ethtool-libnl-1.0-support.patch
fix-includes-and-types.patch
@@ -20,13 +20,38 @@ builddir="$srcdir"/python-ethtool-$pkgver
build() {
cd "$builddir"
- return 0
+ python2 setup.py build
+ python3 setup.py build
+
+ # build man-pages
+ a2x -d manpage -f manpage man/pethtool.8.asciidoc
+ a2x -d manpage -f manpage man/pifconfig.8.asciidoc
}
package() {
cd "$builddir"
- make DESTDIR="$pkgdir" install || return 1
- # python2 setup.py install --root="$pkgdir"
+
+ # install man-pages
+ install -Dm644 man/*.8 -t "$pkgdir/usr/share/man/man8"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="ee258bbb308d405c7089ab3a9e307c3bdafe557d220a2fad2498af3c54938ef9093973cdde52b6b971d07f888698af42bdcdbff00300c461248cfb2bdc3c35f5 python-ethtool-0.7.tar.bz2