Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions BioArchLinux/plink1.9/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Maintainer: Adityarup Laha <me@adityaruplaha.me>
pkgname='plink1.9'
_pkgver=1.9
pkgver=1.9.b.7.11.r64.gacb45ef4
pkgrel=1
pkgdesc="whole-genome association analysis toolset, version 1.9"
arch=(x86_64)
license=(GPL-3.0-only)
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')
makedepends=('git')
provides=('plink1.9')
sha256sums=(SKIP
24f570e751f51b6ab05c29f92cad4a57b0a54b7bb4a81dd067cf1cdc1c887327)

prepare() {
cd "$_pkgname/$_pkgver"
patch -i "${srcdir}/bin-name.patch"
}

build() {
cd "$_pkgname/$_pkgver"
CFLAGS+=" -DDYNAMIC_ZLIB $(pkg-config --cflags lapack blas cblas)" CXXFLAGS+=' -DDYNAMIC_ZLIB'\
BLASFLAGS=$(pkg-config --libs lapack blas cblas) ZLIB=-lz \
LDFLAGS+=' -lpthread -lm' BIN=$_pkgname make -f Makefile
}

package() {
cd "$_pkgname/$_pkgver"
BIN="$_pkgname" DESTDIR="$pkgdir" PREFIX=/usr make -f Makefile install
}

pkgver() {
cd "$_pkgname"
echo "$_pkgver"."$(git describe --tags --long --match "v1.9*" | sed -E 's/^[^-]+-([^-]+)-([0-9]+)-(g[a-f0-9]+)/\1.r\2.\3/')"
}
16 changes: 16 additions & 0 deletions BioArchLinux/plink1.9/bin-name.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --color -ura src/plink1.9/1.9/Makefile src/plink1.9-patched/1.9/Makefile
--- src/plink1.9/1.9/Makefile 2024-07-26 14:43:56.962588763 +0530
+++ src/plink1.9-patched/1.9/Makefile 2024-07-26 14:45:39.865461011 +0530
@@ -77,10 +77,10 @@

all: $(BIN)

-plink: $(OBJS)
+$(BIN): $(OBJS)
$(CXX) $(OBJS) $(LDFLAGS_EXTRA) $(BLASFLAGS) $(LDFLAGS) $(ZLIB) -o $@

-plinkw: $(OBJS)
+$(BIN)w: $(OBJS)
gfortran -O2 $(OBJS) $(LDFLAGS_EXTRA) -Wl,-Bstatic $(BLASFLAGS) $(LDFLAGS) $(ZLIB) -o $@

install:
12 changes: 12 additions & 0 deletions BioArchLinux/plink1.9/lilac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
build_prefix: extra-x86_64
maintainers:
- github: adityaruplaha
email: me@adityaruplaha.me
post_build_script: |
git_pkgbuild_commit()
update_on:
- source: github
github: chrchang/plink-ng
use_max_tag: true
include_regex: '^v1\.9\..*'
prefix: 'v'