more packaging tweaks related to git/wscript/python
[ardour.git] / tools / linux_packaging / build
index 558fe43686feecefd13cbae0ee1c4146208093e7..93bbcc95b86ebb8fd4ca3672d83181c54de26af0 100755 (executable)
@@ -87,10 +87,10 @@ if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
     exit 1
 fi
 
-release_version=`grep -m 1 '^VERSION' ../../wscript | awk '{print $3}' | sed "s/'//g"`
-svn_version=`grep -m 1 'svn_revision =' ../../libs/ardour/svn_revision.cc | cut -d'"' -f 2`
-echo "Version is $release_version / $svn_version"
-info_string="$release_version/$svn_version built on `hostname` by `whoami` on `date`"
+release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{ print $3 }' | sed "s/'//g"`
+revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2 | sed -e "s/$release_version-//"`
+echo "Version is $release_version / $revision"
+info_string="$release_version/$revision built on `hostname` by `whoami` on `date`"
 echo "Info string is $info_string"
 
 # Figure out our CPU type
@@ -114,7 +114,7 @@ case `uname -m` in
 esac
 
 # Figure out the Build Type
-if grep -q "DEBUG = True" ../../build/c4che/default.cache.py; then
+if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then
        DEBUG="T"
 else
        DEBUG="F"
@@ -131,11 +131,11 @@ fi
 # setup directory structure
 
 if [ -z "${BUILDTYPE}" ]; then
-       APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version}
-       APP_VER_NAME=${APPNAME}-${release_version}_${svn_version}
+       APPDIR=${APPNAME}_${ARCH}-${release_version}-${revision}
+       APP_VER_NAME=${APPNAME}-${release_version}-${revision}
 else
-       APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version}-${BUILDTYPE}
-       APP_VER_NAME=${APPNAME}-${release_version}_${svn_version}-${BUILDTYPE}
+       APPDIR=${APPNAME}_${ARCH}-${release_version}-${revision}-${BUILDTYPE}
+       APP_VER_NAME=${APPNAME}-${release_version}-${revision}-${BUILDTYPE}
 fi
 
 APPBIN=$APPDIR/bin
@@ -318,7 +318,7 @@ rm pangorc
 gdk-pixbuf-query-loaders | sed "s?$GTKSTACK_ROOT/lib/gdk-pixbuf-2.0/2.10.0/?@ROOTDIR@/?" > $Etc/gdk-pixbuf.loaders.in
 
 # We rely on clearlooks, so include a version from our own build tree
-# this one is special - we will set GTK_PATH to $Libraries/clearlooks
+# this one is special - we will set GTK_PATH to $Libraries/gtkengines
 
 GTK_ENGINE_DIR=$Libraries/gtkengines/engines
 mkdir -p $GTK_ENGINE_DIR
@@ -328,7 +328,7 @@ cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.so $Libraries
 (cd $GTK_ENGINE_DIR && ln -s ../../libclearlooks.so . )
 
 cp $GTKSTACK_ROOT/lib/gtk-2.0/2.10.0/engines/libpixmap.so $Libraries
-(cd $$GTK_ENGINE_DIR && ln -s ../../libclearlooks.so . )
+(cd $GTK_ENGINE_DIR && ln -s ../../libpixmap.so . )
 
 # LADSPA
 if test x$WITH_LADSPA != x ; then
@@ -535,7 +535,7 @@ done
 #
 # Add the uninstaller
 #
-sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_BUILD%/${svn_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
+sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_BUILD%/${revision}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
 chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
 
 #Sanity Check file