aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-ethtool/APKBUILD
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-04-04 01:01:10 +0300
committerprspkt <prspkt@protonmail.com>2019-04-04 01:22:51 +0300
commit343e6ea54843fba955e5dac7073e5d09e3a57c37 (patch)
tree8fa856bdd6c1b9c5e541c403bc0fd41b2442d4f7 /community/py-ethtool/APKBUILD
parentcb5c255936512f6684a28b721c661d43a2e49507 (diff)
downloadaports-343e6ea54843fba955e5dac7073e5d09e3a57c37.tar.bz2
aports-343e6ea54843fba955e5dac7073e5d09e3a57c37.tar.xz
community/py-ethtool: add multiversion executables
Diffstat (limited to 'community/py-ethtool/APKBUILD')
-rw-r--r--community/py-ethtool/APKBUILD14
1 files changed, 13 insertions, 1 deletions
diff --git a/community/py-ethtool/APKBUILD b/community/py-ethtool/APKBUILD
index 0c54f7d166..12dc4a7bee 100644
--- a/community/py-ethtool/APKBUILD
+++ b/community/py-ethtool/APKBUILD
@@ -2,7 +2,7 @@
pkgname=py-ethtool
_pkgname=ethtool
pkgver=0.14
-pkgrel=0
+pkgrel=1
pkgdesc="Python library for the ethtool kernel interface"
url="https://github.com/fedora-python/python-ethtool"
arch="all"
@@ -28,9 +28,15 @@ build() {
package() {
cd "$builddir"
+ mkdir -p "$pkgdir"/usr/bin
# install man-pages
install -Dm644 man/*.8 -t "$pkgdir/usr/share/man/man8"
+
+ # Create unsuffixed symlinks for executables from py3 subpackage
+ local name; for name in pethtool pifconfig; do
+ ln -s $name-3 "$pkgdir"/usr/bin/$name
+ done
}
_py2() {
@@ -44,12 +50,18 @@ _py3() {
_py() {
local python="$1"
+ local pyver="${1:6: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"
+
+ # Add version suffix to executable files
+ local path; for path in "$subpkgdir"/usr/bin/*; do
+ mv "$path" "$path-$pyver"
+ done
}
sha512sums="57a3f2d60dd8309192fc858614645d4e7533c90c03113ffc1eeeb810b86eb71b0a80b4eb209d3452c7624c5318a853de50d9d716d41334bf079e6e3e2490fd4b py-ethtool-0.14.tar.gz