aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-udev
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-07 15:44:09 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-07 16:08:16 -0300
commit65a8e46b21dad2c08110d155c86edb43e1e9f537 (patch)
treea8b0eedbc74aa15bab09d2d993e06aab5539af02 /community/py3-udev
parente758e912e3ec84db4ae97ba300eb837eed094ac4 (diff)
downloadaports-65a8e46b21dad2c08110d155c86edb43e1e9f537.tar.bz2
aports-65a8e46b21dad2c08110d155c86edb43e1e9f537.tar.xz
community/py3-udev: rename from py-udev
Diffstat (limited to 'community/py3-udev')
-rw-r--r--community/py3-udev/APKBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/py3-udev/APKBUILD b/community/py3-udev/APKBUILD
new file mode 100644
index 0000000000..2ea5eb22da
--- /dev/null
+++ b/community/py3-udev/APKBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-udev
+pkgver=0.21.0
+pkgrel=2
+pkgdesc="Python bindings to libudev"
+url="http://pyudev.readthedocs.org"
+arch="noarch"
+license="LGPL-2.1"
+depends="eudev py-six"
+makedepends="python2-dev python3-dev py-setuptools"
+install=""
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="py-udev-$pkgver.tar.gz::https://github.com/pyudev/pyudev/archive/v$pkgver.tar.gz"
+builddir="$srcdir/pyudev-$pkgver"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/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="c6cc8786c69de2a07eeae39cb57e33db6ca5fea83c38fdab277070bf052c97bd053911ab08a11fe65cb56c463492111e74451801390d89dc7f00fd00e68bba19 py-udev-0.21.0.tar.gz"