2 # finish up the installation
3 # this script should be executed using the sudo command
4 # this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade
5 # inside the .pkg bundle
6 LOGFILE="/synfig_install.log"
13 RESOURCE_DIR=`dirname $0`
18 echo "Creating synfig-config script"
19 [ -d $PREFIX ] || mkdir $PREFIX
20 [ -d $PREFIX/bin ] || mkdir $PREFIX/bin
21 [ -d $PREFIX/include ] || mkdir $PREFIX/include
22 [ -d $PREFIX/lib ] || mkdir $PREFIX/lib
23 [ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin
25 echo "Cleaning up any previous installation"
26 [ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig
27 ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig
30 s:@exec_prefix@:/usr/local:g;
31 s:@prefix@:/usr/local:g;
32 s:@bindir@:$exec_prefix/bin:g;
33 s:@libdir@:$exec_prefix/lib:g;
34 s:@includedir@:$prefix/include:g;
35 s:@VERSION@:@_VERSION_@:g;
36 s:@PACKAGE@:@_PACKAGE_@:g;
38 s:@VERSION@:@_VERSION_@:;
39 s:@PACKAGE@:@_PACKAGE_@:;
40 s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:;
41 s:@SYNFIG_LIBS@:-F/Library/Frameworks/synfig.framework:;
42 s:@CONFIG_CFLAGS@:-framework synfig:;
43 ' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config
44 chmod 775 $PREFIX/bin/synfig-config
46 echo "Precompiling Headers"
47 #/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p
49 echo "Moving synfig tool"
50 cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1
52 echo "Done with shell script"