diff options
author | Stuart Cardall <developer@it-offshore.co.uk> | 2017-01-26 16:15:12 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-02-15 08:24:01 +0200 |
commit | 84da05520345a2bae8311cb0aa767f6f0cefee4a (patch) | |
tree | 31576d08ec9c3f68e603951e0f28b42530abf182 /testing | |
parent | 1b40edd21cc6737fa5ea99fa544dc80264b9786c (diff) | |
download | aports-84da05520345a2bae8311cb0aa767f6f0cefee4a.tar.bz2 aports-84da05520345a2bae8311cb0aa767f6f0cefee4a.tar.xz |
testing/xxhash: new aport
includes py-xxhash subpkgs
closes https://bugs.alpinelinux.org/issues/6744
closes https://bugs.alpinelinux.org/issues/6743
Diffstat (limited to 'testing')
-rw-r--r-- | testing/xxhash/APKBUILD | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/testing/xxhash/APKBUILD b/testing/xxhash/APKBUILD new file mode 100644 index 0000000000..c72586bfe8 --- /dev/null +++ b/testing/xxhash/APKBUILD @@ -0,0 +1,67 @@ +# Contributor: Stuart Cardall <developer@it-offshore.co.uk> +# Maintainer: Stuart Cardall <developer@it-offshore.co.uk> +pkgname=xxhash +_pkgname=xxHash +pkgver=0.6.2 +_pypkg=python-xxhash +_pyver=0.6.1 +pkgrel=0 +pkgdesc="Extremely fast non-cryptographic hash algorithm" +url="http://www.xxhash.com" +arch="all" +license="BSD/GPL" +depends="" +makedepends="python2-dev python3-dev py-setuptools valgrind" +subpackages="$pkgname-dev $pkgname-doc py2-$pkgname:_py2 py3-$pkgname:_py3" +source="$_pkgname-$pkgver.tar.gz::https://github.com/Cyan4973/$_pkgname/archive/v$pkgver.tar.gz + $_pypkg-$pkgver.tar.gz::https://github.com/ifduyue/$_pypkg/archive/v$_pyver.tar.gz + " +builddir="$srcdir/"$_pkgname-$pkgver +pybuilddir="$srcdir/"$_pypkg-$_pyver + +build() { + cd "$builddir" + sed -i 's|--leak-check=yes|-v --leak-check=full --show-leak-kinds=all|' Makefile +# make test || return 1 + make xxhsum || return 1 + + cd "$pybuilddir" + ln -s "$srcdir"/$_pkgname-$pkgver/xxhash.c ./xxhash/xxhash.c + ln -s "$srcdir"/$_pkgname-$pkgver/xxhash.h ./xxhash/xxhash.h + python2 setup.py build || return 1 + python3 setup.py build || return 1 +} + +package() { + cd "$builddir" + mkdir -p "$pkgdir"/usr/bin + mkdir -p "$pkgdir"/usr/include/xxhash + mkdir -p "$pkgdir"/usr/share/man/man1 + mkdir -p "$pkgdir"/usr/share/doc/xxhash + install -m755 xxhsum "$pkgdir"/usr/bin || return 1 + install -m644 xxhsum.1 "$pkgdir"/usr/share/man/man1 || return 1 + install -m644 LICENSE "$pkgdir"/usr/share/doc/xxhash || return 1 + install -m644 xxhash.h "$pkgdir"/usr/include/xxhash || return 1 + install -m644 xxhash.c "$pkgdir"/usr/include/xxhash || return 1 +} + +_py2() { + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends=xxhash + install_if="py-xxhash=$pkgver-r$pkgrel $python" + + cd "$pybuilddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="1e8017f78baf5747f739d6ab0c6c3ce51e4ddf53bd0aced3e2495fceefea23b408e395ff2f38681ad54e8588525fa12c13b08c1ff5fabf1df75044525c15e781 xxHash-0.6.2.tar.gz +72a99d744ccaac830e9789053acb9728b2da457c7841e2aae96e9748450f09366b9830f6d92b62ac494e938f43c1fea7910c9d5257824ae33c1fe48f199ed9cc python-xxhash-0.6.2.tar.gz" |