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-core_install.log"
8 /usr/X11R6/bin/fc-cache
16 RESOURCE_DIR=`dirname $0`
21 echo "Creating synfig-config script"
22 [ -d $PREFIX ] || mkdir $PREFIX
23 [ -d $PREFIX/bin ] || mkdir $PREFIX/bin
24 [ -d $PREFIX/include ] || mkdir $PREFIX/include
25 [ -d $PREFIX/lib ] || mkdir $PREFIX/lib
26 [ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin
28 echo "Cleaning up any previous installation"
29 [ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig
30 ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig
33 s:@exec_prefix@:/usr/local:g;
34 s:@prefix@:/usr/local:g;
35 s:@bindir@:$exec_prefix/bin:g;
36 s:@libdir@:$exec_prefix/lib:g;
37 s:@includedir@:$prefix/include:g;
38 s:@VERSION@:@_VERSION_@:g;
39 s:@PACKAGE@:@_PACKAGE_@:g;
41 s:@VERSION@:@_VERSION_@:;
42 s:@PACKAGE@:@_PACKAGE_@:;
43 s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:;
44 s:@synfig_LIBS@:-F/Library/Frameworks/synfig.framework:;
45 s:@CONFIG_CFLAGS@:-framework synfig:;
46 ' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config
47 chmod 775 $PREFIX/bin/synfig-config
49 echo "Precompiling Headers"
50 #/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p
52 echo "Moving synfig tool"
53 cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1
55 echo "Done with shell script"