aboutsummaryrefslogblamecommitdiffstats
path: root/testing/py3-libarchive-c/APKBUILD
blob: 8569b4ce9b6a31eeb1c082a19f57dddf15a13658 (plain) (tree)
1
2
3
4


                                                   
        






























                                                                                                                                                                             
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-libarchive-c
pkgver=2.8
pkgrel=1
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"