tAPKBUILD - paraports - parazyd's aports
 (HTM) git clone https://git.parazyd.org/paraports
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       tAPKBUILD (1097B)
       ---
            1 # Maintainer: Ivan J. <parazyd@dyne.org>
            2 pkgname=py-stem
            3 _pkgname=stem
            4 pkgver=1.7.1
            5 pkgrel=0
            6 pkgdesc="Stem is a Python controller library for Tor"
            7 url="https://stem.torproject.org"
            8 arch="noarch"
            9 license="LGPL-3"
           10 depends="tor"
           11 makedepends="python2-dev python3-dev py-setuptools http-parser-dev libev-dev"
           12 subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
           13 source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
           14 builddir="$srcdir/$_pkgname-$pkgver"
           15 
           16 build() {
           17         cd "$builddir"
           18 
           19         python2 setup.py build || return 1
           20         python3 setup.py build || return 1
           21 }
           22 
           23 package() {
           24         mkdir -p "$pkgdir"
           25 }
           26 
           27 _py2() {
           28         replaces="$pkgname"
           29         _py python2
           30 }
           31 
           32 _py3() {
           33         _py python3
           34 }
           35 
           36 _py() {
           37         local python="$1"
           38         pkgdesc="$pkgdesc (for $python)"
           39         depends="$depends $python"
           40         install_if="$pkgname=$pkgver-r$pkgrel $python"
           41 
           42         cd "$builddir"
           43         $python setup.py install --prefix=/usr --root="$subpkgdir"
           44 }
           45 
           46 sha512sums="a275f59bba650cb5bb151cf53fb1dd820334f9abbeae1a25e64502adc854c7f54c51bc3d6c1656b595d142fc0695ffad53aab3c57bc285421c1f4f10c9c3db4c  stem-1.7.1.tar.gz"