diff options
Diffstat (limited to 'main/py-vobject/APKBUILD')
-rw-r--r-- | main/py-vobject/APKBUILD | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/main/py-vobject/APKBUILD b/main/py-vobject/APKBUILD index d39b2ab7bb..00cabe2c6a 100644 --- a/main/py-vobject/APKBUILD +++ b/main/py-vobject/APKBUILD @@ -1,45 +1,43 @@ -# Maintainer: +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=py-vobject -_pkgname=vobject pkgver=0.9.5 -pkgrel=1 +pkgrel=2 pkgdesc="Module for parsing and generating vCard and vCalendar files" url="http://eventable.github.io/vobject/" arch="noarch" license="Apache" -depends="py-dateutil py-icu" -makedepends="python2-dev py-setuptools python3-dev" -subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" -source="$pkgname-$pkgver.tar.gz::https://github.com/eventable/$_pkgname/archive/$pkgver.tar.gz" -builddir="$srcdir"/$_pkgname-$pkgver +makedepends="python2-dev py-setuptools python3-dev py2-dateutil py3-dateutil + py2-icu py3-icu" +subpackages="py3-${pkgname#py-}:_py py2-${pkgname#py-}:_py" +source="$pkgname-$pkgver.tar.gz::https://github.com/eventable/vobject/archive/$pkgver.tar.gz" +builddir="$srcdir"/vobject-$pkgver build() { cd "$builddir" - python2 setup.py build || return 1 - python3 setup.py build || return 1 + python2 setup.py build + python3 setup.py build } package() { - mkdir -p "$pkgdir" -} - -_py() { - local python="$1" - pkgdesc="$pkgdesc (for $python)" - depends="$python" - install_if="$pkgname=$pkgver-r$pkgrel $python" - cd "$builddir" - $python setup.py install --prefix=/usr --root="$subpkgdir" + python2 setup.py install --prefix=/usr --root="$pkgdir" + python3 setup.py install --prefix=/usr --root="$pkgdir" } -_py2() { - replaces="$pkgname" - _py python2 +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check } -_py3() { - _py python3 +_py() { + local py=${subpkgname%%-*} + local python="python${py#py}" + depends="$python $py-icu $py-dateutil" + pkgdesc="$pkgdesc ($python)" + install_if="$pkgname=$pkgver-r$pkgrel $python" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/${python}* "$subpkgdir"/usr/lib/ } sha512sums="087b394ad6c48c359ee1cabb90cbc85cb305ed9e65199f33c19f386c7075b70273e5fddcf7fde5356b140ead7a581efd917594e4d493e720c4e1a632f797acc7 py-vobject-0.9.5.tar.gz" |