summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0c1a9cb2761bb07614f34ad56fd68374dea89922 (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
51
52
53
# This is the PKGBUILD for ngs
# Maintainer: Aaron Baker <aa{last name}99{at}gmail{dt}org>
# Maintainer: Georgios Amanakis <g_amanakis{at}yahoo{dt}com>

pkgname=ngs
pkgver=2.10.0
pkgrel=2
pkgdesc="A new, domain-specific API for accessing reads, alignments and pileups produced from Next Generation Sequencing."
arch=('x86_64')
url="https://github.com/ncbi/ngs"
depends=('java-environment' 'perl-file-copy-recursive' 'zlib')
provides=('ngs')
license=('custom:PublicDomain')
source=("https://github.com/ncbi/ngs/archive/$pkgver.tar.gz" "$pkgname.patch")
sha256sums=('4139adff83af213d7880bc80d1c0f5ee9b00c6c4e615d00aa47aaa267e40ed25'
            '004eb006e9bbd9f4368c54663e7d991833aeae3e9c6583e61566340cd04d5bb6')

prepare(){
  cd "${pkgname}-${pkgver}"
  # ncbi build process frequently checks if we are root user which interferes 
  #   with makepkg use of fakeroot
  patch -p1 -i $srcdir/$pkgname.patch 
}

build(){
  cd "${pkgname}-${pkgver}"
  ./configure --prefix="$pkgdir/usr/" --build-prefix="$srcdir/build"
  make -C ngs-sdk
  make -C ngs-java
}

#check(){
#  cd "${pkgname}-${pkgver}"
#  make -k test
#}

package(){
  cd "$pkgname-$pkgver"
  # ncbi does not use autoconf/automake so there is no respect for DESTDIR
  #   but there is a ROOT(dir)
  #make "ROOT=$pkgdir" install
  make -C ngs-sdk install
  make -C ngs-java install

  # add license
  mkdir -p "$pkgdir/usr/share/licenses/${pkgname}"
  cp "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"

  # reorganize files from build process to fit Arch
  mv "$pkgdir/usr/lib64" "$pkgdir/usr/lib"
  mkdir -p "$pkgdir/usr/share/java"
  mv "$pkgdir/usr/jar" "$pkgdir/usr/share/java/$pkgname"
}