blob: 7dff05e15bf116c9ebfec6cac40238ca610fd2a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-lz4
pkgver=0.8.2
_pkgname=${pkgname#py-}
pkgrel=1
pkgdesc="LZ4 Bindings for Python"
url="https://pypi.python.org/pypi/lz4"
arch="all"
license="BSD"
makedepends="python2-dev python3-dev py-setuptools lz4-dev"
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2 $pkgname-tests:_tests"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build || return 1
python3 setup.py build || return 1
}
package() {
mkdir -p "$pkgdir"
}
_py() {
local python=$1
pkgdesc="$pkgdesc ${python#python}"
depends="$python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
}
_tests() {
pkgdesc="$pkgdesc (tests)"
arch="noarch"
mkdir -p "$subpkgdir"/usr/share/$pkgname
mv "$builddir"/tests "$subpkgdir"/usr/share/$pkgname
}
md5sums="50dc6c2cb99c43ce6ed95cf6ae965f0e lz4-0.8.2.tar.gz"
sha256sums="6bf49061d73d69c453e892ace4586b99ccffc7de558f921d18b9418235692ac7 lz4-0.8.2.tar.gz"
sha512sums="e516d5c3309f214fa422b040a0aacdda079395624dd4f5548ed7af637b1594012aac75b309cef260b41c10a623410f815fc089b54ca5d80955d5f2ead12841b1 lz4-0.8.2.tar.gz"
|