updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cfortran / PKGBUILD
blob7f1d6f8cdfb740f694206c500bc9aeaf411c8b4f
1 ##Contributor: T.Cunly
3 pkgname=cfortran
4 pkgver=4.4_13
5 pkgrel=3
6 pkgdesc="Header file allowing to call Fortran routines from C and C++ " 
7 license=(GPL)
8 arch=('any')
9 url="http://www-zeus.desy.de/~burow/cfortran/"
10 install=(cfortran.install)
11 md5sums=('d6a335899e838231bad3f222cff184c7'
12          'a7a14e15070e13571eafb894d2931c9c')
14 NETADDRESS=http://ftp.heanet.ie/debian/pool/main/c/cfortran/
15 ORIGINFILE=cfortran_4.4.orig.tar.gz
16 PATCHFILE=cfortran_4.4-13.diff.gz
18 source=("${NETADDRESS}/${ORIGINFILE}" "${NETADDRESS}/${PATCHFILE}") 
21 build() {
22     cd $srcdir
23     patch -p0 <cfortran_4.4-13.diff
24     
25     INCLUDEDIR=$pkgdir/usr/include/cfortran
26     DOCDIR=$pkgdir/usr/share/doc/cfortran
27     EXAMPLEDIR=$DOCDIR/examples
28     
29     [  -d $INCLUDEDIR ] || mkdir -p $INCLUDEDIR
30     [  -d $EXAMPLEDIR  ] || mkdir -p $EXAMPLEDIR
31     [  -d $DOCDIR ]  || mkdir -p $DOCDIR
32         
33     cd $srcdir/cfortran-4.4
34     cp cfortran.h $INCLUDEDIR/
35        
36     cp cfortran.doc cfortran.html index.htm cfortest.c cfortex.f $DOCDIR/
38     tar xfz cfortran.examples.tar.gz
39     cp -r eg/* $EXAMPLEDIR/
41     # fix example symlinks
42     cd $EXAMPLEDIR/sz1 && ln -sf sz1.c sz1.C
43     cd $EXAMPLEDIR/pz && ln -sf pz.c pz.C