diff options
-rw-r--r-- | testing/py-rarfile/APKBUILD | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/testing/py-rarfile/APKBUILD b/testing/py-rarfile/APKBUILD index 175eb0e237..ba6c02c273 100644 --- a/testing/py-rarfile/APKBUILD +++ b/testing/py-rarfile/APKBUILD @@ -2,40 +2,46 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-rarfile _pkgname=rarfile -pkgver=2.7 +pkgver=2.8 pkgrel=0 -pkgdesc="A RAR archive reader for Python" +pkgdesc="A RAR archive reader" url="https://github.com/markokr/rarfile" arch="noarch" license="ISC" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_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" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } -md5sums="d143205f22078830451e0066c123580d rarfile-2.7.tar.gz" -sha256sums="47148088ddb6c020774f4c38927fec9625ca33651bdc551bdaeafc78690b1635 rarfile-2.7.tar.gz" -sha512sums="39827329644a89ac9721a52bb591be9a8921e919e1c0f2434df3d467d52b49aac4b18e27fdd4e40b5dd21b0df1ced495d42afe69331392ffadd9ac1fc857db56 rarfile-2.7.tar.gz" +md5sums="98942f9c51468ca044738fe2e96fdd2d rarfile-2.8.tar.gz" +sha256sums="2a27e401daa6d8ff0df1112a274a3661ca3e4afaac626217506fb1391069ca61 rarfile-2.8.tar.gz" +sha512sums="6d249b1be9f286185d37fc5eaeae01c4b7153bf6248e66285099f7b9f920419986c27b006fd5511ffe4ae6e3b5214956ccb37ce5be5fc2673880cd7b2af0f98a rarfile-2.8.tar.gz" |