summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 59c02abb52e7a7a465025ad302c0f3c7d66665a3 (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
# Maintainer: Gavin Ridley <gavin.keith.ridley@gmail.com>
pkgname=openmc-git
pkgver=r11702.e91a6aac1
pkgrel=1
pkgdesc="Community-developed Monte Carlo neutron and photon transport simulation code"
arch=('any')
url="https://github.com/openmc-dev/openmc"
license=('MIT')
makedepends=('cmake' 'git' 'python-setuptools')
depends=('hdf5-cpp-fortran' 'python-numpy' 'python-matplotlib' 'python-scipy'
    'python-pandas' 'python-h5py' 'python-uncertainties' 'python-lxml')
provides=("${pkgname%-git}" "libopenmc.so")
conflicts=("${pkgname%-git}" 'pugixml' 'fmt')
source=("${pkgname}::git+${url}.git")
noextract=()
sha1sums=('SKIP')
pkgver() {
	cd "${srcdir}/${pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
    printf "build"
    printf "%s" "${pkgname}"
    printf "%s" "${pkgname%-git}"
	cd "${srcdir}/${pkgname}"
    git submodule update --init --recursive
    python setup.py build
    mkdir -p build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=/usr ..
    make
}
package() {
	cd "${srcdir}/${pkgname}/build"
	make DESTDIR="${pkgdir}" install
    cd ..
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}