1 ##参照了http://people.debian.org/~kmccarty/cernlib/faq.html###
8 pkgdesc="Large collection of general purpose libraries and modules maintained and offered in both source and object code form on the CERN central computers. "
10 arch=('i686' 'x86_64')
11 url="http://cernlib.web.cern.ch/cernlib/"
12 ##由于是初次试验,依赖关系可能不全,自己看编译出错信息,把依赖关系自己加上。
13 depends=(gcc cfortran lapack openmotif imake pkgconfig)
15 install=cernlib2006.install
17 NETADDRESS=http://ftp.heanet.ie/debian/pool/main/c/cernlib
18 ORIGINFILE=cernlib_2006.dfsg.2.orig.tar.gz
19 PATCHFILE=cernlib_2006.dfsg.2-14.diff.gz
21 source=("${NETADDRESS}/${ORIGINFILE}" "${NETADDRESS}/${PATCHFILE}")
25 cd $startdir/src/cernlib-2006.dfsg.2.orig
26 rm src/include/cfortran/cfortran.h
28 cp $startdir/cernlib_2006.dfsg.2-14.diff.gz ./
29 gunzip -c cernlib_2006.dfsg.2-14.diff.gz |patch -p1
31 cp debian/add-ons/Makefile ./Makefile
34 sed -i -e "s:\$(exec_prefix)/lib$:\$(exec_prefix)/lib/cernlib:" debian/add-ons/cernlib.mk || return 1
35 sed -i -e "s:\$(prefix)/include$:\$(prefix)/include/cernlib:" debian/add-ons/cernlib.mk || return 1
37 cd $startdir/src/cernlib-2006.dfsg.2.orig
43 make DESTDIR=$startdir/pkg/ install || echo "cernlib install failed"