diff options
Diffstat (limited to 'testing/py3-libarchive-c/APKBUILD')
-rw-r--r-- | testing/py3-libarchive-c/APKBUILD | 35 |
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" |