summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d1511fd4fe76381cc084c975e0efb6f03eee8770 (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
# Maintainer: Vincent von Schelm <aur at vncnt dot eu>

pkgname=('infrared-git')
pkgName=('Infrared-git')
pkgver=0.3.r7.gec411b9
pkgrel=2
pkgdesc="A generic C++/Python hybrid library for efficient (fixed-parameter tractable) Boltzmann sampling."
arch=('x86_64')
url="https://github.com/s-will/Infrared/"
license=('GPL3')
groups=('viennarna-package')
depends=('htd'
         'boost-libs')
makedepends=('git'
             'boost'
             'doxygen')
optdepends=('python-rna: required by redprint.py')
provides=('libinfrared.so' 'libhtdwrap.so' 'redprint.py')
conflicts=('infrared')
source=("Infrared::git+${url}#branch=master")
md5sums=('SKIP')

pkgver() {
  cd "${pkgName%-git}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${pkgName%-git}"
	#sed -ie '/PYTHON_VERSION/s/3.6/3.8/g' configure.ac
	autoreconf -i
}

build() {
  cd "${pkgName%-git}"
	./configure --with-htd=/usr --with-boost-python --prefix=/usr
	make
	make doxygen-doc
}

check() {
  cd "${pkgName%-git}"
	
}

package() {
	cd "${pkgName%-git}"
	make DESTDIR="$pkgdir" install
	
	# symlink to python site-packages
	local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
	mkdir -p "${pkgdir}${site_packages}" 
	ln -st "${pkgdir}${site_packages}" /usr/lib/libhtdwrap.so /usr/lib/libinfrared.so
}