42e2b02723ea3e36a77894032de506b861621b2e
[synfig.git] /
1 #!/bin/sh
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"
7
8 /usr/X11R6/bin/fc-cache
9 /usr/X11R6/bin/fc-list
10
11 exit 0
12
13
14 umask 022
15
16 RESOURCE_DIR=`dirname $0`
17 PREFIX=/usr/local
18
19 cd $RESOURCE_DIR
20
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
27
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
31
32 sed '
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;
40 s:@LIBS@::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
48
49 echo "Precompiling Headers"
50 #/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p
51
52 echo "Moving synfig tool"
53 cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1
54
55 echo "Done with shell script"
56
57
58 exit 0
59
60
61