1 # Contributor: Graziano Giuliani <graziano.giuliani@poste.it>
5 pkgdesc="ECMWF Interpolation Library"
7 url="http://www.ecmwf.int/products/data/software/interpolation.html"
11 source=(http://www.ecmwf.int/products/data/software/download/software_files/${pkgname}_$pkgver.tar.gz)
12 md5sums=('b3dfa25010ea8f6de183bb0c1e867b73' )
15 cd "$startdir/src/${pkgname}_$pkgver"
17 export ARCHFLAGS=$CFLAGS
21 target=`uname -s | tr '[A-Z]' '[a-z]'`
24 [ "$arch" = x86_64 ] && { A64="A64"; R64=; }
25 cat Makefile.in | sed s:reals:$R64: > Makefile
26 for subdirs in gribex pbio bufrdc bufrtables crexdc interpolation fft
28 cat $subdirs/Makefile.in | sed s:reals:$R64: | \
29 sed s:arch:$target: | \
32 sed s:comp:$CNAME: > $subdirs/Makefile
34 for subdirs in examples/gribex examples/bufr \
35 examples/crex examples/interpolation examples/fft
37 cat $subdirs/Makefile.in | sed s:reals:$R64: | \
38 sed s:arch:$target: | \
40 sed s:comp:$CNAME: > $subdirs/Makefile
42 cat config/config.$target$CNAME$R64$A64.in | \
43 sed s:emos:/usr/share/emos: > config/config.$target$CNAME$R64$A64
44 make ARCH=linux CNAME=_gfortran A64=$A64 R64=$R64
46 ls bufrtables/*000* > .list/bufrtables
47 mkdir -p $startdir/pkg/usr/lib
48 mkdir -p $startdir/pkg/usr/share/emos
50 INSTALL_DIR=$startdir/pkg/usr/lib
51 install -m 644 libemos$R64.a $startdir/pkg/usr/lib/libemos.a
52 for d in gribtables bufrtables crextables land_sea_mask gribtemplates ; do
53 mkdir -p $startdir/pkg/usr/share/emos/$d
54 find $d -type d -exec mkdir -p $startdir/pkg/usr/share/emos/{} \;
55 for i in `cat .list/$d` ; do
56 rsync -a $i $startdir/pkg/usr/share/emos/$i
61 # vim:set ts=2 sw=2 et: