# Maintainer: Natanael Copa pkgname=py-vobject pkgver=0.9.6.1 pkgrel=1 pkgdesc="Module for parsing and generating vCard and vCalendar files" url="http://eventable.github.io/vobject/" arch="noarch" license="Apache" 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 python3 setup.py build } package() { cd "$builddir" python2 setup.py install --prefix=/usr --root="$pkgdir" python3 setup.py install --prefix=/usr --root="$pkgdir" } check() { cd "$builddir" python2 setup.py check python3 setup.py check } _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="499f22a1a9e60398a89d3d6fa472a0b4c9dd00b98440a4ce873da824f83cef1b0a5eb9e5051267931707a3eef00a1d3fb83ff63ffe857b403c4ac3a131f18dff py-vobject-0.9.6.1.tar.gz"