blob: 0a4c39c31ebeb7ec8e51c225b9294075c9ed7951 (
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
|
# Maintainer: Yngve Levinsen <yngve.levinsen@ess.eu>
pkgname=madx-git
pkgver=5.09.01.r3.geb495b4f
pkgrel=1
pkgdesc="Accelerator Optics simulation code, git master version"
url="http://cern.ch/mad"
license=("custom")
depends=('libx11' 'lapack')
conflicts=('madx-dev')
provides=('madx')
makedepends=('git' 'cmake')
arch=('i686' 'x86_64')
_gitname=MAD-X
source=("git+https://github.com/MethodicalAcceleratorDesign/${_gitname}.git")
sha256sums=('SKIP')
pkgver() {
cd $_gitname
git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
#printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd $srcdir/
[ -d "build" ] && rm -rf build
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=gcc \
-DCMAKE_Fortran_COMPILER=gfortran \
-DBLA_VENDOR=Generic \
-DMADX_STATIC=OFF \
-DMADX_ONLINE=OFF \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_FLAGS="-fvisibility=protected" \
-DCMAKE_INSTALL_PREFIX=/usr \
../$_gitname
make
}
package() {
cd ${srcdir}/build
make DESTDIR=${pkgdir} install
cd ${srcdir}/$_gitname
install -D -m644 License.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt
}
|