summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: feb4fb6938339e52bdac4e15b765795b97d31e3c (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.6.1.r5.g866d2f6
pkgrel=1
pkgdesc='MIT Photonic-Bands: computation of photonic band structures in periodic media'
arch=('i686' 'x86_64')
url='https://github.com/stevengj/mpb'
license=('GPL2')
depends=('lapack' 'hdf5' 'fftw-mpi' 'libctl-git')
makedepends=('gcc-fortran')
optdepends=('h5utils: visualization and conversion of scientific data')
provides=('mpb')
conflicts=('mpb')
source=('git+https://github.com/stevengj/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
}