# Contributor: Francesco Colista # Maintainer: Francesco Colista setglobal pkgname = 'py-apsw' setglobal _pkgname = 'apsw' setglobal pkgver = '3.19.3' setglobal _pkgrel = 'r1' setglobal pkgrel = '0' setglobal pkgdesc = '"Another Python SQLite Wrapper'" setglobal url = '"https://github.com/rogerbinns/apsw/'" setglobal arch = '"all'" setglobal license = '"ZLIB'" setglobal makedepends = '"python2-dev python3-dev py-setuptools sqlite-dev'" setglobal subpackages = ""py2-$(pkgname#py-):_py2 py3-$(pkgname#py-):_py3 $pkgname-doc"" setglobal source = ""$pkgname-$pkgver-$_pkgrel.tar.gz::https://github.com/rogerbinns/apsw/archive/$pkgver-$_pkgrel.tar.gz"" setglobal builddir = ""$srcdir/$_pkgname-$pkgver-$_pkgrel"" proc check { cd $builddir python2 setup.py check python3 setup.py check } proc build { cd $builddir python2 setup.py build python3 setup.py build } proc package { mkdir -p $pkgdir } proc _py2 { setglobal replaces = $pkgname setglobal depends = $(depends//py-/py2-) ## remove if there are no common Python dependencies _py python2 } proc _py3 { setglobal depends = $(depends//py-/py3-) ## remove if there are no common Python dependencies _py python3 } proc _py { local python="$1" setglobal pkgdesc = ""$pkgdesc (for $python)"" setglobal depends = ""$depends $python"" ## remove if arch isn't noarch setglobal install_if = ""$pkgname=$pkgver-r$pkgrel $python"" cd $builddir $python setup.py install --prefix=/usr --root="$subpkgdir" } proc doc { cd $builddir install -Dm644 LICENSE "$subpkgdir"/usr/share/licenses/$pkgname/LICENSE default_doc } setglobal sha512sums = '"f5d3fc82129d50906aede3ae8c11f63108769078b0d3da85b3807f5f8f914471b357f2c594be48e466afa91ecc2ebd74b6138825fab80d9a7dd6502529416020 py-apsw-3.19.3-r1.tar.gz'"