X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fpkg-info%2Fmacosx%2Fcore-resources%2Fupgrade.sh;fp=synfig-core%2Fpkg-info%2Fmacosx%2Fcore-resources%2Fupgrade.sh;h=5a537ccfedc92265d451ca4ddc4997ff8a68eed3;hb=a095981e18cc37a8ecc7cd237cc22b9c10329264;hp=0000000000000000000000000000000000000000;hpb=9459638ad6797b8139f1e9f0715c96076dbf0890;p=synfig.git diff --git a/synfig-core/pkg-info/macosx/core-resources/upgrade.sh b/synfig-core/pkg-info/macosx/core-resources/upgrade.sh new file mode 100755 index 0000000..5a537cc --- /dev/null +++ b/synfig-core/pkg-info/macosx/core-resources/upgrade.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade +# inside the .pkg bundle +LOGFILE="/synfig_install.log" + +exit 0 + + +umask 022 + +RESOURCE_DIR=`dirname $0` +PREFIX=/usr/local + +cd $RESOURCE_DIR + +echo "Creating synfig-config script" +[ -d $PREFIX ] || mkdir $PREFIX +[ -d $PREFIX/bin ] || mkdir $PREFIX/bin +[ -d $PREFIX/include ] || mkdir $PREFIX/include +[ -d $PREFIX/lib ] || mkdir $PREFIX/lib +[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin + +echo "Cleaning up any previous installation" +[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig +ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig + +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +s:@VERSION@:@_VERSION_@:; +s:@PACKAGE@:@_PACKAGE_@:; +s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@SYNFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@CONFIG_CFLAGS@:-framework synfig:; +' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config +chmod 775 $PREFIX/bin/synfig-config + +echo "Precompiling Headers" +#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p + +echo "Moving synfig tool" +cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 + +echo "Done with shell script" + + +exit 0 + + +