aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2020-07-16 13:15:17 +0300
committerFrancesco Colista <fcolista@alpinelinux.org>2020-07-19 15:20:23 +0000
commitbe85fa28a97c9f387492eadeb09e6261db9e279f (patch)
tree5e84d933919cde4db4f10b9c4f4f5c038d3b4876
parent01870de6a0440507bf190b04622779beb50c43ce (diff)
downloadaports-be85fa28a97c9f387492eadeb09e6261db9e279f.tar.gz
aports-be85fa28a97c9f387492eadeb09e6261db9e279f.tar.bz2
aports-be85fa28a97c9f387492eadeb09e6261db9e279f.tar.xz
community/miniupnpc: add python bindings, modernize
-rw-r--r--community/miniupnpc/APKBUILD18
1 files changed, 11 insertions, 7 deletions
diff --git a/community/miniupnpc/APKBUILD b/community/miniupnpc/APKBUILD
index c59a067c9f..037e2ca4a3 100644
--- a/community/miniupnpc/APKBUILD
+++ b/community/miniupnpc/APKBUILD
@@ -2,29 +2,33 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=miniupnpc
pkgver=2.1.20191224
-pkgrel=0
+pkgrel=1
pkgdesc="Library and tool to control NAT in UPnP-enabled routers"
url="http://miniupnp.free.fr"
arch="all"
license="BSD-3-Clause"
-makedepends="bsd-compat-headers"
-subpackages="$pkgname-dev $pkgname-doc"
+makedepends="bsd-compat-headers py3-setuptools python3-dev"
+subpackages="$pkgname-dev py3-$pkgname:_py3 $pkgname-doc"
source="http://miniupnp.free.fr/files/$pkgname-$pkgver.tar.gz"
-builddir="$srcdir"/$pkgname-$pkgver
build() {
- cd "$builddir"
make
+ python3 setup.py build
}
check() {
- cd "$builddir"
make check
}
package() {
+ make DESTDIR="$pkgdir" PREFIX=/usr install
+}
+
+_py3() {
+ pkgdesc="Python bindings for miniupnpc"
+ depends="python3"
cd "$builddir"
- make PREFIX="$pkgdir"/usr install
+ python3 setup.py install --prefix=/usr --root="$subpkgdir" --skip-build
}
sha512sums="d362f914ce9177c1bc46f1f3ae59069c61c0c9c1b6ea7e78003d6b46445d3550835ffc541c2649b5fbc997d035357b461148edb3648135f33d0ce98b54961917 miniupnpc-2.1.20191224.tar.gz"