diff options
Diffstat (limited to 'community/py-crcmod/APKBUILD')
-rw-r--r-- | community/py-crcmod/APKBUILD | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/community/py-crcmod/APKBUILD b/community/py-crcmod/APKBUILD index 211eec39ad..87317abe28 100644 --- a/community/py-crcmod/APKBUILD +++ b/community/py-crcmod/APKBUILD @@ -1,36 +1,46 @@ # Contributor: Stuart Cardall <developer@it-offshore.co.uk> # Maintainer: Stuart Cardall <developer@it-offshore.co.uk> pkgname=py-crcmod -_pkgname=crcmod +_pkgname=${pkgname#py-} pkgver=1.7 -pkgrel=0 +pkgrel=1 pkgdesc="Cyclic Redundancy Check (CRC) implementation in Python" url="https://pypi.python.org/pypi/crcmod/" arch="all" license="MIT" -depends="python2" -makedepends="python2-dev" +depends="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" source="https://files.pythonhosted.org/packages/source/c/$_pkgname/$_pkgname-$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" - python2 setup.py build || return 1 + cd "$builddir" + python2 setup.py build + python3 setup.py build } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 || return 1 + mkdir -p "$pkgdir" +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr \ + --root="$subpkgdir" --optimize=1 +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 } md5sums="2d5b92117d958dcead94f9e17f54cd32 crcmod-1.7.tar.gz" |