update external plugin UI handling
[ardour.git] / tools / linux_packaging / build
index af795f89835d345272613121356d80a328c70661..72e60257f028af414d4b4ee189b90112ad0d45a0 100755 (executable)
@@ -14,9 +14,14 @@ ARDOURSTACK_ROOT=$HOME/a3/inst
 # the waf build tree to use when copying built/generated files
 BUILD_ROOT=../../build
 
+# where harvid and xjadeo binaries are cached
+if test -z "$CACHEDIR" -o ! -d "$CACHEDIR"; then
+       CACHEDIR=`pwd`
+fi
+
 MIXBUS=
 WITH_LADSPA=0
-WITH_HARVID=0
+WITH_HARVID=
 STRIP=all
 PRINT_SYSDEPS=
 WITH_NLS=
@@ -24,6 +29,7 @@ EXTERNAL_JACK=
 VENDOR=Ardour ;
 BUILDTYPE=""
 
+
 if [ $# -eq 0 ] ; then
        echo ""  
        echo "ERROR - Please specify build type"
@@ -89,7 +95,7 @@ if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
     exit 1
 fi
 
-. ./define_versions.sh
+. ../define_versions.sh
 
 echo "Version is $version / $commit"
 info_string="$version ($commit) built on `hostname` by `whoami` on `date`"
@@ -192,7 +198,6 @@ mkdir -p $MackieControl
 mkdir -p $ExportFormats
 mkdir -p $Panners
 mkdir -p $Templates
-mkdir -p $Shared/templates
 mkdir -p $Shared/doc
 
 # maybe set variables
@@ -221,8 +226,7 @@ echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
 
 sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' -e 's/%VER%/'"${release_version}"'/' < ardour.sh.in > $APPBIN/ardour3
 rm $ENVIRONMENT && chmod 775 $APPBIN/ardour3
-# the 3.0 here is not the same as "release-version" because the latter may include "-betaN" etc.
-MAIN_EXECUTABLE=ardour-3.0
+MAIN_EXECUTABLE=ardour-${release_version}
 
 echo "Copying ardour executable ...."
 cp $BUILD_ROOT/gtk2_ardour/$MAIN_EXECUTABLE $APPBIN
@@ -363,11 +367,11 @@ for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
 done
 
 # Templates
-for f in $BUILD_ROOT/../templates/* ; do 
-    if [ -d "$f" ] ; then
-       echo Template: $f ; cp -r "$f" $Templates ; 
-    fi
-done
+#for f in $BUILD_ROOT/../templates/* ; do 
+#    if [ -d "$f" ] ; then
+#      echo Template: $f ; cp -r "$f" $Templates ; 
+#    fi
+#done
 
 # ExportFormats
 # got to be careful with names here
@@ -531,9 +535,25 @@ done
 
 if test x$WITH_HARVID != x ; then
        cd $APPBIN
-       HARVID_VERSION="v0.7.0" # todo make 'latest' symlink on github work somehow.
-       curl -L http://x42.github.com/harvid/releases/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
-               | tar -x -z --exclude=README --exclude=harvid.1 --strip-components=1 || exit 1
+       HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
+       XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
+
+       rsync -Pa \
+               rsync://ardour.org/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
+               "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz"
+
+       rsync -Pa \
+               rsync://ardour.org/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
+               "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz"
+
+       tar -x -z \
+               --exclude=README --exclude=harvid.1 --strip-components=1 \
+               -f "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz" || exit 1
+
+       tar -x -z \
+               --exclude=README --exclude=xjadeo.1 --strip-components=1 \
+               -f "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz" || exit 1
+       mv xjadeo xjremote
        cd -
 fi