diff options
author | andalenavals | 2017-12-31 20:30:43 -0500 |
---|---|---|
committer | andalenavals | 2017-12-31 20:30:43 -0500 |
commit | c1db5cc83ac59695685a1268cc18cafd3bc88ad2 (patch) | |
tree | b95ababed2ec73b60106edc715df667b268d9b12 | |
parent | b6fadcee301e0be2dacd3af80b5904ca68115809 (diff) | |
download | aur-c1db5cc83ac59695685a1268cc18cafd3bc88ad2.tar.gz |
spliting PKBUILD and adding function check()
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 37 |
2 files changed, 36 insertions, 6 deletions
@@ -7,11 +7,14 @@ pkgbase = python-palpy-git arch = x86_64 license = GPL makedepends = git - depends = python provides = python-palpy conflicts = python-palpy source = python-palpy::git+https://github.com/Starlink/palpy md5sums = SKIP pkgname = python-palpy-git + depends = python + +pkgname = python2-palpy-git + depends = python2 @@ -1,35 +1,62 @@ # Maintainer: Andres Alejandro Navarro Alsina <aanavarroa@unal.edu.co> # Contributor: Tim Jenness _pkgname=python-palpy -pkgname=${_pkgname}-git +pkgbase=$_pkgname-git +pkgname=("$_pkgname-git" "python2-palpy-git") pkgver=pypi.1.8.1.r0.a7ad770 pkgrel=1 pkgdesc=" PALpy is a python interface to the PAL positional astronomy library " arch=('i686' 'x86_64') url="https://github.com/Starlink/palpy" license=('GPL') -depends=('python') makedepends=('git' ) provides=("${_pkgname}") conflicts=("${_pkgname}") source=("${_pkgname}::git+${url}") md5sums=('SKIP') + pkgver() { - cd "${_pkgname}" + cd $_pkgname printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" } +prepare() { + cp -a $_pkgname{,-py2} +} + build() { - cd "${_pkgname}" + cd "$srcdir"/$_pkgname git submodule init git submodule update python setup.py build + + cd "$srcdir"/$_pkgname-py2 + git submodule init + git submodule update + python2 setup.py build } +check() { + cd "$srcdir"/$_pkgname + python test_pal.py + + cd "$srcdir"/$_pkgname-py2 + python2 test_pal.py +} -package() { + +package_python-palpy-git() { + depends=('python') cd "${_pkgname}" python setup.py install --root=${pkgdir} --prefix=/usr install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE } + +package_python2-palpy-git() { + depends=('python2') + cd "${_pkgname}" + python2 setup.py install --root=${pkgdir} --prefix=/usr + install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE + +} |