aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-libarchive-c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-12-17 16:33:53 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-12-17 16:34:24 +0000
commit8c05602cd16a799e165c76f293de8295beaaed23 (patch)
treecc0cdf0715ab9c4d6900bb6fc9b37ff3bc4dff5a /testing/py3-libarchive-c
parente44beae1061eec6bdd1ba9e6ac780ecffc1584f8 (diff)
downloadaports-8c05602cd16a799e165c76f293de8295beaaed23.tar.bz2
aports-8c05602cd16a799e165c76f293de8295beaaed23.tar.xz
testing/py3-libarchive-c: new aport
needed by diffoscope
Diffstat (limited to 'testing/py3-libarchive-c')
-rw-r--r--testing/py3-libarchive-c/APKBUILD35
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/py3-libarchive-c/APKBUILD b/testing/py3-libarchive-c/APKBUILD
new file mode 100644
index 0000000000..d528e753dd
--- /dev/null
+++ b/testing/py3-libarchive-c/APKBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py3-libarchive-c
+pkgver=2.8
+pkgrel=0
+pkgdesc="Python interface to libarchive"
+url="https://github.com/Changaco/python-libarchive-c"
+arch="noarch"
+license="CC0-1.0"
+depends="libarchive python3" # uses ffi
+makedepends="python3-dev libarchive-dev py3-setuptools"
+source="python-libarchive-c-$pkgver.tar.gz::https://github.com/Changaco/python-libarchive-c/archive/$pkgver.tar.gz"
+builddir="$srcdir/python-libarchive-c-$pkgver"
+
+prepare() {
+ soname=$(scanelf --quiet --soname /usr/lib/libarchive.so | awk '{print $1}')
+ sed -i -e "s/find_library('libarchive')/find_library('$soname')/" libarchive/ffi.py
+}
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python3 setup.py check
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="789e2b700d0a57c424d133d274bac2fdc1d26027a45f3b4827ea3d47ceccd40cc1bbd4baa8e5abeb4ee42267ac589e36e94700f35354ff2dd0274f64c1fdba93 python-libarchive-c-2.8.tar.gz"