summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aaf2096fe97356b2b6bd0a7a2ae184938e8a1a12 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Maintainer: Ronny Lorenz <ronny at tbi dot univie dot ac dot at>

pkgbase=viennarna
pkgname=('viennarna' 'python-rna' 'perl-rna')
pkgver=2.7.0
pkgrel=2
pkgdesc="RNA Secondary Structure Prediction and Comparison"
arch=('x86_64' 'i686')
license=('Custom')
url="https://www.tbi.univie.ac.at/RNA"
groups=('viennarna-package')
makedepends=( 'perl'
              'python'
              'libtool'
              'check'
              'mpfr'
              'gsl'
              'lapack'
              'lapacke'
              'blas'
              'gcc-fortran')

source=(http://www.tbi.univie.ac.at/RNA/packages/source/ViennaRNA-${pkgver}.tar.gz)

options=('staticlibs' '!strip')
sha256sums=('32aa599bc4e8982d173fa638def5a96781322ad53b4ff2013e429a9961cad0e7')

prepare() {
  cd "${srcdir}/ViennaRNA-${pkgver}"
  ./configure \
      --with-cluster \
      --with-kinwalker \
      --prefix=/usr \
      INSTALLDIRS=vendor
}

build() {
  cd "${srcdir}/ViennaRNA-${pkgver}"
  make
}

check() {
  cd "$srcdir/ViennaRNA-${pkgver}"
  export LC_ALL=C
  make check
}

package_viennarna() {
  depends=('perl'
           'mpfr'
           'gsl'
           'lapack'
           'blas')
  optdepends=('gri: create 2D plots of secondary structure landscape with RNA2Dfold')
  provides=('Kinfold=1.4'
            'RNAforester=2.0'
            'kinwalker=2.0'
            'RNAxplorer=0.9'
            "viennarna2=${pkgver}"
            "libRNA=${pkgver}")
  conflict=('kinwalker')

  cd "${srcdir}/ViennaRNA-${pkgver}"

  # install executables
  cd src/bin/
  make DESTDIR="${pkgdir}" install
  cd ../Kinfold
  make DESTDIR="${pkgdir}" install
  cd ../RNAforester
  install -Dm755 src/RNAforester "${pkgdir}/usr/bin/"
  install -Dm644 man/RNAforester.1* "${pkgdir}/usr/share/man/man1/"
  cd ../Utils
  make DESTDIR="${pkgdir}" install
  cd ../Cluster
  make DESTDIR="${pkgdir}" install
  cd ../Kinwalker
  make DESTDIR="${pkgdir}" install
  cd ../RNAlocmin
  make DESTDIR="${pkgdir}" install
  cd ../RNAxplorer
  make DESTDIR="${pkgdir}" install
  cd ../..

  # install library and header files
  cd src/ViennaRNA
  make DESTDIR="${pkgdir}" install
  cd ../..

  # install manpages, documentation, examples, and misc files
  cd man
  make DESTDIR="${pkgdir}" install
  cd ../doc
  make DESTDIR="${pkgdir}" install
  cd ../examples
  make DESTDIR="${pkgdir}" install
  cd ../misc
  make DESTDIR="${pkgdir}" install
  cd ..

  # install pkg-config file
  install -Dm644 RNAlib2.pc "$pkgdir/usr/lib/pkgconfig/RNAlib2.pc"

  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  # cleanup after dirty install ...
  install -dm755 "$pkgdir"/usr/bin/vendor_perl
  for perlscript in "$pkgdir"/usr/share/ViennaRNA/bin/*.pl ; do
    mv "$perlscript" "$pkgdir/usr/bin/vendor_perl/"
  done

  # no need for that file it is outdated anyway
  rm $pkgdir/usr/share/info/dir
}

package_python-rna() {
  depends=('python' viennarna="${pkgver}")
  cd "${srcdir}/ViennaRNA-${pkgver}"
  cd interfaces/Python
  make DESTDIR="${pkgdir}" install
}

package_perl-rna() {
  depends=('perl' viennarna="${pkgver}")
  cd "${srcdir}/ViennaRNA-${pkgver}"
  cd interfaces/Perl
  make DESTDIR="${pkgdir}" install
}