updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / madx-svn / PKGBUILD
blobcfdddec8372f248464942753bd394491686c34f1
1 # Maintainer: Yngve Inntjore Levinsen <yngve.inntjore.levinsen@cern.ch>
3 pkgname=madx-svn
4 pkgver=2805
5 pkgrel=1
6 pkgdesc="Accelerator Optics simulation code, svn trunk version"
7 url="http://cern.ch/mad"
8 license=("custom")
9 depends=('gcc-libs' 'libx11')
10 conflicts=('madx-dev')
11 provides=('madx')
12 makedepends=('subversion' 'cmake' 'python2' 'cython')
13 arch=('i686' 'x86_64')
15 _svntrunk=http://svnweb.cern.ch/guest/madx/trunk/
16 _svnmod=madx
18 build() {
19     if [ -d $_svnmod/.svn ]; then
20       (cd $_svnmod && svn up -r $pkgver)
21     else
22       svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
23     fi
25     msg "SVN checkout done or server timeout"
26     msg "Starting make..."
27     
28     cd $srcdir/$_svnmod/
29     [ -d "build" ] && rm -rf build
30     mkdir build
31     cd build
33       
34     cmake -DCMAKE_C_COMPILER=gcc \
35           -DCMAKE_Fortran_COMPILER=gfortran \
36           -DMADX_STATIC=OFF \
37           -DMADX_ONLINE=OFF \
38           -DBUILD_SHARED_LIBS=ON \
39           -DCMAKE_INSTALL_PREFIX=/usr \
40           -DCMAKE_BUILD_TYPE=Release \
41          ../madX
43       make
46 package() {
47     cd ${srcdir}/${_svnmod}/build
48     make DESTDIR=${pkgdir} install
50     cd ${srcdir}/${_svnmod}/madX
51     install -D -m644 License.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt