Commit b41d5e18e330380c3f9311039fd765749f57ee46
1 parent
207a2fed
initial version
Showing
1 changed file
with
57 additions
and
0 deletions
ctatools.sh
0 → 100755
| 1 | +#! /bin/bash -f | |
| 2 | + | |
| 3 | +sourcedir=ctatools | |
| 4 | +installdir=$(pwd)/build | |
| 5 | + | |
| 6 | +echo "Remove existing folder" | |
| 7 | +rm -rf $sourcedir | |
| 8 | +#rm -rf $installdir | |
| 9 | + | |
| 10 | +echo "Checkout latest ctatools" | |
| 11 | +cvs -Q -d /home/cvs export -N -r HEAD "ctatools" | |
| 12 | + | |
| 13 | +echo "Create Makefile.in and configure scripts" | |
| 14 | +cd $sourcedir | |
| 15 | +# | |
| 16 | +mkdir m4 | |
| 17 | +aclocal -I m4 | |
| 18 | +libtoolize --copy | |
| 19 | +autoconf | |
| 20 | +autoheader | |
| 21 | +automake --add-missing --copy | |
| 22 | +# | |
| 23 | +rm -f autogen.sh | |
| 24 | +#rm -rf m4 | |
| 25 | +rm -rf autom4te.cache | |
| 26 | +#rm -f configure.ac | |
| 27 | +#rm -f Makefile.am | |
| 28 | +# | |
| 29 | +cd .. | |
| 30 | + | |
| 31 | +echo "Create ctatool_wrap.cpp and ctatool.py files for python binding (making swig obsolete)" | |
| 32 | +swig -c++ -python -Wall -includeall -I$installdir/share/gammalib/swig -o $sourcedir/pyext/ctatools_wrap.cpp -outdir $sourcedir/pyext $sourcedir/pyext/ctatools.i | |
| 33 | + | |
| 34 | +echo "Make files read/write" | |
| 35 | +chmod -R u+rw $sourcedir | |
| 36 | + | |
| 37 | +echo "Create tarball" | |
| 38 | +tar cvf - $sourcedir > $sourcedir.tar | |
| 39 | +rm -f $sourcedir.tar.gz | |
| 40 | +gzip $sourcedir.tar | |
| 41 | + | |
| 42 | +echo "Configure ctatools" | |
| 43 | +cd $sourcedir | |
| 44 | +export PKG_CONFIG_PATH=/home/knodlseder/export/gammalib_build/lib/pkgconfig | |
| 45 | +./configure --prefix=$installdir | |
| 46 | + | |
| 47 | +echo "Compile ctatools" | |
| 48 | +make -j4 | |
| 49 | + | |
| 50 | +echo "Install ctatools" | |
| 51 | +make install | |
| 52 | + | |
| 53 | +#echo "Check GammaLib" | |
| 54 | +#export PATH=$installdir/bin:$PATH | |
| 55 | +#export LD_LIBRARY_PATH=$installdir/lib:$LD_LIBRARY_PATH | |
| 56 | +#export PYTHONPATH=$installdir/lib/python2.5/site-packages:$PYTHONPATH | |
| 57 | +#make check | ... | ... |