summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorandalenavals2017-12-31 20:01:33 -0500
committerandalenavals2017-12-31 20:01:33 -0500
commita20ea5a2a8bb23d257c1346f64f16acc430ce257 (patch)
treeb447b3ee27459939a96c37eeb5b59d57cc16e1e0
parentf06cf15398dcde7db244d5c8f96c4427e9ab4544 (diff)
downloadaur-a20ea5a2a8bb23d257c1346f64f16acc430ce257.tar.gz
include pkgbase definition and check() function
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD36
2 files changed, 26 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c957aaa11fa..d6388008b6b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,4 +1,4 @@
-pkgbase = python-galsim-git
+pkgbase = python-galsim
pkgdesc = The modular galaxy image simulation toolkit
pkgver = v1.5.1.r0.9de448ef9
pkgrel = 1
@@ -9,6 +9,9 @@ pkgbase = python-galsim-git
makedepends = git
makedepends = scons
makedepends = boost
+ makedepends = fftw
+ makedepends = tmv-git
+ makedepends = python
source = python-galsim::git+https://github.com/GalSim-developers/GalSim.git
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 67ee6ef41c8..b0acea38100 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Andres Alejandro Navarro Alsina <aanavarroa@unal.edu.co>
# Contributor: GalSim developers team on GitHub
-_pkgname=python-galsim
+pkgbase=python-galsim
pkgname=('python-galsim-git' 'python2-galsim-git' )
pkgver=v1.5.1.r0.9de448ef9
pkgrel=1
@@ -8,39 +8,47 @@ pkgdesc=" The modular galaxy image simulation toolkit "
arch=('i686' 'x86_64')
url="https://github.com/GalSim-developers/GalSim.git"
license=('BSD')
-makedepends=('git' 'scons' 'boost')
-source=("${_pkgname}::git+${url}")
+makedepends=('git' 'scons' 'boost' 'fftw' 'tmv-git' 'python')
+source=("${pkgbase}::git+${url}")
md5sums=('SKIP')
pkgver() {
- cd "${_pkgname}"
+ cd "${pkgbase}"
printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
-#check() {
-# cd "${_pkgname}"/tests
-# nosetests -v
+prepare() {
+ cp -a $pkgbase{,-py2}
+}
-# cd "${_pkgname}"/tests
-# nosetests2 -v
-#}
build() {
- cd "${_pkgname}"
+ cd "$srcdir"/$pkgbase
scons PREFIX=/usr TMV_DIR=/usr PYTHON=python
+
+ cd "$srcdir"/$pkgbase-py2
scons PREFIX=/usr TMV_DIR=/usr PYTHON=python2
}
+
+check() {
+ cd "$srcdir"/$pkgbase/tests
+ nosetests -v
+
+ cd "$srcdir"/$pkgbase-py2/tests
+ nosetests2 -v
+}
+
package_python-galsim-git() {
depends=('python' 'boost-libs' 'fftw' 'tmv-git')
- cd "${_pkgname}"
+ cd $pkgbase
scons PREFIX=$pkgdir/usr FINAL_PREFIX=/usr PYTHON=python install
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
package_python2-galsim-git() {
- depends=('python2' 'boost-libs' 'fftw' 'tmv-git')
- cd "${_pkgname}"
+ depends=('python2' 'boost-libs' 'fftw' 'tmv-git' )
+ cd $pkgbase-py2
scons PREFIX=$pkgdir/usr FINAL_PREFIX=/usr PYTHON=python2 install
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}