summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 116af78b28c04c38208828425ac665421f4f7dea (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
# Maintainer: Lucas H. Gabrielli <heitzmann@gmail.com>
pkgname=mpb-git
pkgver=1.11.1.r12.g84de012
pkgrel=1
pkgdesc='MIT Photonic-Bands: computation of photonic band structures in periodic media'
arch=('i686' 'x86_64')
url='https://github.com/NanoComp/mpb'
license=('GPL2')
depends=('lapack' 'hdf5' 'fftw' 'libctl-git')
makedepends=('gcc-fortran')
optdepends=('h5utils: visualization and conversion of scientific data')
provides=("mpb=${pkgver}")
conflicts=('mpb')
source=('git+https://github.com/NanoComp/mpb.git')
sha256sums=('SKIP')

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

build() {
	cd "$srcdir"
	cp -r mpb mpbi
	cp -r mpb mpb-mpi
	cp -r mpb mpbi-mpi

	cd mpb
	./autogen.sh \
		--prefix=/usr \
		--enable-shared \
		--mandir=/usr/share/man
	make

	cd ../mpbi
	./autogen.sh \
		--prefix=/usr \
		--enable-shared \
		--mandir=/usr/share/man \
		--with-inv-symmetry
	make

	cd ../mpb-mpi
	./autogen.sh \
		--prefix=/usr \
		--enable-shared \
		--mandir=/usr/share/man \
		--with-mpi
	make

	cd ../mpbi-mpi
	./autogen.sh \
		--prefix=/usr \
		--enable-shared \
		--mandir=/usr/share/man \
		--with-inv-symmetry \
		--with-mpi
	make
}

package() {
	cd "$srcdir"/mpb
	make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install

	cd ../mpbi
	make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install

	cd ../mpb-mpi
	make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install

	cd ../mpbi-mpi
	make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install
}