updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / accelerator-ml-uap / PKGBUILD
blob5feda4fdb3a1d43f40832972190d5d0ad41ed369
1 # Maintainer: Yngve Inntjore Levinsen <yngve.inntjore.levinsen@cern.ch>
4 pkgname=accelerator-ml-uap
5 pkgver=377
6 pkgrel=2
7 _antlrver=2.7.0
8 pkgdesc="Accelerator Markup Language: Universal Accelerator Parser"
10 _svntrunk=https://accelerator-ml.svn.sourceforge.net/svnroot/accelerator-ml/uap/trunk
11 _svnmod=amluap
13 makedepends=('doxygen' 'g95')
14 #optdepends=()
15 # statically linked at the moment..
16 depends=("xerces-c-2") 
18 #conflicts=('antlr')
19 #provides=("antlr=${_antlrver}")
20 arch=('x86_64' 'i686')
21 license=('LGPL3')
22 url="http://www.lns.cornell.edu/~dcs/aml/"
24 source=("notbuildantlr.patch")
25 md5sums=('6cd2f01e4801de18aee8e9b6856ddac9')
26        
27 build() {
28   #!/bin/sh -e
29     if [ -d $_svnmod/.svn ]; then
30       (cd $_svnmod && svn up -r $pkgver)
31     else
32       svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
33     fi
35     msg "SVN checkout done or server timeout"
36     msg "Starting make..."
38     if [ -d "$srcdir/$_svnmod-build" ]; then
39      rm -rf "$srcdir/$_svnmod-build"
40     fi
41     cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
42     cd "$srcdir/$_svnmod-build"
43     
44     # patching:
45     # AML not compatible with arch linux antlr version at the moment..
46     #patch -p0 -u -i ../notbuildantlr.patch
48     export UAP_FORTRAN_COMPILER=G95
49     #make noantlr
50     make
51     
52     #create documentation:
53     doxygen doc/Doxyfile.cfg
56 package() {
57     cd "$srcdir/$_svnmod-build"
59     #install supporting documentation
60     mkdir -p ${pkgdir}/usr/share/doc/${pkgname}/
61     cp -r doc ${pkgdir}/usr/share/doc/${pkgname}/
62     cp -r test_files ${pkgdir}/usr/share/doc/${pkgname}/
63     cp -r README ${pkgdir}/usr/share/doc/${pkgname}/
64     #delete all svn folders...
65     rm -rf ${pkgdir}/usr/share/doc/${pkgname}/.svn/
66     rm -rf ${pkgdir}/usr/share/doc/${pkgname}/*/.svn/
67     rm -rf ${pkgdir}/usr/share/doc/${pkgname}/*/*/.svn/
68     
69     #install main files
70     mkdir -p ${pkgdir}/usr/bin/
71     mkdir -p ${pkgdir}/usr/lib/
72     install -D -m755 bin/* ${pkgdir}/usr/bin/
73     install -D -m644 lib/* ${pkgdir}/usr/lib/
74   
75     # Remove ANTLR library (conflict with other package)
76     rm -f ${pkgdir}/usr/lib/libantlr*