summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGraham Gower2020-04-05 16:13:53 +0200
committerGraham Gower2020-04-05 16:20:21 +0200
commit10a634593f42176a1d9e4c758824ab358c82542f (patch)
treec0ed70574cd26af8ea649d2674fc280e0948712d
downloadaur-10a634593f42176a1d9e4c758824ab358c82542f.tar.gz
Initial PKGBUILD for SLiM, a forwards-time population genetic simulator.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD52
2 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..1141ed62e53
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = slim-simulator
+ pkgdesc = A forwards-time population genetic simulator.
+ pkgver = 3.3.2.r166.ga7d4bb6d
+ pkgrel = 1
+ url = https://messerlab.org/slim/
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = cmake
+ depends = qt5-base
+ conflicts = slim
+ source = git+https://github.com/grahamgower/SLiM.git#branch=includes
+ md5sums = SKIP
+
+pkgname = slim-simulator
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3d95c8cfb67
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Graham Gower <graham dot gower at gmail dot com>
+_gitname=SLiM
+#_gittag=v3.3.2 # tag, branch, or commit; comment out to use latest
+pkgname=slim-simulator
+pkgver=3.3.2.r166.ga7d4bb6d
+pkgrel=1
+pkgdesc="A forwards-time population genetic simulator."
+arch=("x86_64")
+url="https://messerlab.org/slim/"
+license=('GPL3')
+depends=("qt5-base")
+makedepends=("git" "cmake")
+conflicts=("slim") # a display manager, also called SLiM
+#source=("git+https://github.com/MesserLab/${_gitname}.git#branch=qtslim")
+source=("git+https://github.com/grahamgower/${_gitname}.git#branch=includes")
+md5sums=('SKIP')
+
+prepare() {
+ if [ ! -z "$_gittag" ] ; then
+ cd "${srcdir}/${_gitname}"
+ git checkout $_gittag || (echo "Couldn't checkout '${_gittag}'"; exit 1)
+ cd ../..
+ fi
+ mkdir -p build
+}
+
+pkgver() {
+ cd "${srcdir}/${_gitname}"
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd build
+ cmake \
+ -D CMAKE_INSTALL_PREFIX=/usr \
+ -D BUILD_QTSLIM=ON \
+ ../${_gitname}
+ make
+}
+
+check() {
+ cd build
+ echo "Running 'slim -testEidos'..."
+ ./slim -testEidos || (echo "Eidos tests failed"; exit 1)
+ echo "Running 'slim -testSLiM'..."
+ ./slim -testSLiM || (echo "SLiM tests failed"; exit 1)
+}
+
+package() {
+ cd build
+ make DESTDIR="$pkgdir" install
+}