summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c0c9a047b5a7575a3f61c987295b7ea5aa44100d (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
# Maintainer: Frank Siegert <frank.siegert@googlemail.com>
pkgname=rivet-hg
pkgver=r7248.4e530be4f27e
pkgrel=1
pkgdesc="A particle physics package for data analysis and validation of Monte Carlo event generators -- latest build from hg-repo"
arch=('x86_64' 'i686')
url="http://rivet.hepforge.org"
license=('GPL3')
conflicts=('rivet')
provides=('rivet')
depends=('python' 'yoda' 'fastjet' 'gsl' 'hepmc' 'fastjet-contrib')
optdepends=('texlive-core: Plotting functionality'
            'ghostscript: PDF plot output'
            'imagemagick: PNG plot output'
            'python2: For Python2 module in addition to Python3')
makedepends=('cython')
source=('rivet::hg+https://phab.hepforge.org/source/rivethg#branch=multiweight-merge27')
md5sums=('SKIP')

build() {
	cd "$srcdir/rivet"
        autoreconf -i
	./configure --prefix=/usr
	make
}

package() {
	cd "$srcdir/rivet"
	make DESTDIR="$pkgdir/" install

        # If python2 is present, also build a library for it
        if [ -x /usr/bin/python2 ]; then
          PYTHON=/usr/bin/python2 ./configure --prefix=/usr
          make DESTDIR="$pkgdir/" install
        fi
        
        mkdir -p $pkgdir/etc/bash_completion.d
        mv $pkgdir/usr/share/Rivet/rivet-completion $pkgdir/etc/bash_completion.d
}

pkgver() {
	cd "$srcdir/rivet"
	printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}