APKBUILD (1056B)
1 # Maintainer: Ivan J. <parazyd@dyne.org> 2 pkgname=py-rarfile 3 _pkgname=rarfile 4 pkgver=3.0 5 pkgrel=0 6 pkgdesc="Module for RAR archive reading" 7 url="https://github.com/markokr/rarfile" 8 arch="all" 9 license="ISC" 10 makedepends="unrar python2-dev python3-dev py-setuptools" 11 subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" 12 source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" 13 builddir="$srcdir/$_pkgname-$pkgver" 14 15 build() { 16 cd "$builddir" 17 18 python2 setup.py build || return 1 19 python3 setup.py build || return 1 20 } 21 22 package() { 23 mkdir -p "$pkgdir" 24 } 25 26 _py2() { 27 replaces="$pkgname" 28 _py python2 29 } 30 31 _py3() { 32 _py python3 33 } 34 35 _py() { 36 local python="$1" 37 pkgdesc="$pkgdesc (for $python)" 38 depends="$depends $python" 39 install_if="$pkgname=$pkgver-r$pkgrel $python" 40 41 cd "$builddir" 42 $python setup.py install --prefix=/usr --root="$subpkgdir" 43 } 44 45 sha512sums="b0b816bf09fe455e4d8d35b447c30e7810468a6927555164a1b513d4161f3fd4e77a37439620bd935c3a12e46b1e5eda3e35d7d281899d2f9fd26b6e989aa6e4 rarfile-3.0.tar.gz"