summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Vittal2018-10-27 14:12:22 -0400
committerChristopher Vittal2018-10-27 14:31:49 -0400
commit38b98b5baab08f0bbfda6c43ffb91156d0ea3977 (patch)
tree7a579e37099fb6d25e177ff99170fadfbc8177a4
downloadaur-38b98b5baab08f0bbfda6c43ffb91156d0ea3977.tar.gz
Create plink1.9-git AUR package
Use plink1.9 for the binary name following debian
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD37
-rw-r--r--bin-name.patch17
4 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e413ee91d878
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = plink1.9-git
+ pkgdesc = whole-genome association analysis toolset, version 1.9
+ pkgver = 1.9.r191.g927247b5
+ pkgrel = 1
+ url = https://www.cog-genomics.org/plink/1.9/
+ arch = x86_64
+ license = GPL3
+ depends = zlib>=1.2.4
+ depends = cblas
+ depends = lapack
+ source = plink1.9::git+https://github.com/chrchang/plink-ng.git
+ source = bin-name.patch
+ sha256sums = SKIP
+ sha256sums = 6d489d96f1c9f055dd5858ca3618db34d47adcb5f1eba2a12ad699ff787028ac
+
+pkgname = plink1.9-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..42d2de42124b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+plink1.9/
+*.pkg.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..423eff4dfc3b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Christopher Vittal <christopher dot vittal at gmail dot com>
+_pkgname='plink1.9'
+pkgname="$_pkgname-git"
+_pkgver=1.9
+pkgver=1.9.r191.g927247b5
+pkgrel=1
+pkgdesc="whole-genome association analysis toolset, version 1.9"
+arch=(x86_64)
+license=(GPL3)
+url="https://www.cog-genomics.org/plink/1.9/"
+source=('plink1.9::git+https://github.com/chrchang/plink-ng.git'
+ 'bin-name.patch')
+depends=('zlib>=1.2.4' 'cblas' 'lapack')
+sha256sums=(SKIP
+ 6d489d96f1c9f055dd5858ca3618db34d47adcb5f1eba2a12ad699ff787028ac)
+
+prepare() {
+ cd "$_pkgname/$_pkgver"
+ patch -i "${srcdir}/bin-name.patch"
+}
+
+build() {
+ cd "$_pkgname/$_pkgver"
+ CFLAGS+=' -DDYNAMIC_ZLIB' CXXFLAGS+=' -DDYNAMIC_ZLIB' \
+ BLASFLAGS=$(pkg-config --libs lapack blas cblas) ZLIB=-lz \
+ LDFLAGS+=' -lpthread -lm' BIN=$_pkgname make -f Makefile.std
+}
+
+package() {
+ cd "$_pkgname/$_pkgver"
+ BIN="$_pkgname" DESTDIR="$pkgdir" PREFIX=/usr make -f Makefile.std install
+}
+
+pkgver() {
+ cd "$_pkgname"
+ echo "$_pkgver"."$(git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^.*\.r/r/')"
+}
diff --git a/bin-name.patch b/bin-name.patch
new file mode 100644
index 000000000000..af658f8437fa
--- /dev/null
+++ b/bin-name.patch
@@ -0,0 +1,17 @@
+diff --git a/1.9/Makefile.std b/1.9/Makefile.std
+index d41d8c5d..83e619fa 100644
+--- a/1.9/Makefile.std
++++ b/1.9/Makefile.std
+@@ -72,10 +72,10 @@ OBJS = plink.o plink_assoc.o plink_calc.o plink_cluster.o plink_cnv.o plink_comm
+
+ all: $(BIN)
+
+-plink: $(OBJS)
++$(BIN): $(OBJS)
+ $(CXX) $(OBJS) $(LDFLAGS_EXTRA) $(BLASFLAGS) $(LDFLAGS) -L. $(ZLIB) -o $@
+
+-plinkw: $(OBJS)
++$(BIN)w: $(OBJS)
+ gfortran -O2 $(OBJS) $(LDFLAGS_EXTRA) -Wl,-Bstatic $(BLASFLAGS) $(LDFLAGS) -L. $(ZLIB) -o $@
+
+ install: