updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / cfortran / PKGBUILD
blob7019b4a6a31d24aaaf08771a4cf45b81f870753e
1 ##参照了gentoo-portage###
2 ##Contributor: T.Cunly
4 pkgname=cfortran
5 pkgver=4.4_13
6 pkgrel=1
7 pkgdesc="Header file allowing to call Fortran routines from C and C++ " 
8 license=(GPL)
9 arch=('i686' 'x86_64')
10 url="http://www-zeus.desy.de/~burow/cfortran/"
11 install=(cfortran.install)
12 depends=(gcc) 
14 ###用debian的源码包和补丁
15 NETADDRESS=http://ftp.heanet.ie/debian/pool/main/c/cfortran/
16 ORIGINFILE=cfortran_4.4.orig.tar.gz
17 PATCHFILE=cfortran_4.4-13.diff.gz
19 source=("${NETADDRESS}/${ORIGINFILE}" "${NETADDRESS}/${PATCHFILE}") 
22 build() {
23     cd $startdir/src
24     patch -p0 <cfortran_4.4-13.diff
25     
26     INCLUDEDIR=$startdir/pkg/usr/local/include/cfortran
27     EXAMPLEDIR=$startdir/pkg/usr/local/examples/cfortran
28     DOCDIR=$startdir/pkg/usr/local/doc/cfortran
29     
30     [  -d $INCLUDEDIR ] || mkdir -p $INCLUDEDIR
31     [  -d $EXAMPLEDIR  ] || mkdir -p $EXAMPLEDIR
32     [  -d $DOCDIR ]  || mkdir -p $DOCDIR
33         
34     cd $startdir/src/cfortran-4.4
35     cp cfortran.h $INCLUDEDIR/
36        
37     cp cfortran.doc cfortran.html index.htm cfortest.c cfortest.f $DOCDIR/
38     
39     tar xfz cfortran.examples.tar.gz
40     cp -r eg/* $EXAMPLEDIR/