summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 973671348f8089e7d22ac6ace1c315f4fda8121e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Maƫl Kerbiriou <m431.kerbiriou@gmail.com>

pkgname=bwa-mem2-git
_pkgname=bwa-mem2
pkgver=r183.d43752d
pkgrel=1
pkgdesc="The next version of Burrows-Wheeler Aligner MEM algorithm"
arch=('i686' 'x86_64')
url="https://github.com/bwa-mem2/bwa-mem2"
license=('custom')
depends=('gcc-libs' 'zlib')
source=("git+https://github.com/bwa-mem2/bwa-mem2"
        "git+https://github.com/intel/safestringlib.git")
md5sums=('SKIP' 'SKIP')

# For compiling for native instruction set only, set this to false:
MULTI=${MULTI:-true}

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir/$_pkgname"
  git submodule init
  git config submodule.ext/safestringlib.url ${srcdir}/safestringlib
  git submodule update
}

build() {
  cd "$srcdir/$_pkgname"
  if [ "$MULTI" = true ] ; then
    make multi
  else
    make arch=native
  fi
}

package() {
  cd "$srcdir/$_pkgname"
  install -Dm755 bwa-mem2 "$pkgdir/usr/bin/bwa-mem2"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  if [ "$MULTI" = true ] ; then
    install -Dm755 bwa-mem2.avx2      "$pkgdir/usr/bin/bwa-mem2.avx2"
    install -Dm755 bwa-mem2.avx512bw  "$pkgdir/usr/bin/bwa-mem2.avx512bw"
    install -Dm755 bwa-mem2.sse41     "$pkgdir/usr/bin/bwa-mem2.sse41"
  fi
}