3 # script for pulling together a Linux app bundle.
5 # This will create a bundle for a single architecture.
6 # Execute this scirpt on both x86 and x86_64 and then use
7 # package to merge the 2 bundles into a final package with the
8 # installer. See "noderun" for a complete build script.
10 # where the GTK stack is installed
11 GTKSTACK_ROOT=$HOME/gtk/inst
12 # where the Ardour dependencies are installed
13 ARDOURSTACK_ROOT=$HOME/a3/inst
14 # the waf build tree to use when copying built/generated files
15 BUILD_ROOT=../../build
17 . ../define_versions.sh
19 # where harvid and xjadeo binaries are cached
20 if test -z "$CACHEDIR" -o ! -d "$CACHEDIR"; then
37 NOSTRIP="libsuil|libserd|libsord|liblilv|libsratom|liblrdf|libardour|libpbd|libevoral"
39 : ${HARRISONCHANNELSTRIP=harrison_channelstrip}
40 : ${HARRISONLV2=harrison_lv2s-n}
41 : ${HARRISONDSPURL=http://www.harrisonconsoles.com/plugins/releases/public}
43 if [ $# -eq 0 ] ; then
45 echo "ERROR - Please specify build type"
52 while [ $# -gt 0 ] ; do
57 # top level build targets
91 --test) STRIP= ; shift ;;
94 # specific build flags
97 --nojack) INTERNAL_JACK= ; shift ;;
98 --strip) STRIP=$2 ; shift ; shift ;;
99 --sysdeps) PRINT_SYSDEPS=1; shift ;;
100 --nls) WITH_NLS=1 ; shift ;;
101 --harvid) WITH_HARVID=1 ; shift ;;
102 --gcc5abi) GCC5ABI=true ; shift ;;
103 --chanstrip) HARRISONCHANNELSTRIP=$2 ; shift; shift ;;
106 #catch all for unknown arguments
108 echo "!!! ERROR !!! - Unknown argument $1"
115 if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
116 echo "Unknown strip option \"$STRIP\""
117 echo "Legal values are: all, none, some"
121 . ../define_versions.sh
122 lower_case_appname=`echo $APPNAME | tr '[:upper:]' '[:lower:]'`
124 echo "Version is $release_version"
125 if [ "x$commit" != "x" ] ; then
126 info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`"
128 info_string="$release_version built on `hostname` by `whoami` on `date`"
130 echo "Info string is $info_string"
132 # Figure out our CPU type
134 i[3456789]86|x86|i86pc)
135 echo "Architecture is x86"
140 MULTIARCH='i386-linux-gnu'
143 echo "Architecture is x86_64"
148 MULTIARCH='x86_64-linux-gnu'
152 echo "ERROR - Unknown architecture `uname -m`"
158 if [ x$DEBUG = xT ]; then
160 if [ x$STRIP = xall ] ; then
161 echo "A debug build with --strip all makes no sense - STRIP reset to \"some\""
166 # setup directory structure
168 if [ -z "${BUILDTYPE}" ]; then
169 APPDIR=${APPNAME}_${ARCH}-${release_version}
170 APP_VER_NAME=${APPNAME}-${release_version}
172 APPDIR=${APPNAME}_${ARCH}-${release_version}-${BUILDTYPE}
173 APP_VER_NAME=${APPNAME}-${release_version}-${BUILDTYPE}
182 Plugins=$APPLIB/plugins
183 Surfaces=$APPLIB/surfaces
184 Panners=$APPLIB/panners
185 Backends=$APPLIB/backends
187 Themes=$Shared/themes
188 Templates=$Shared/templates
189 PluginMetadata=$Shared/plugin_metadata
190 MixerSettings=$Shared/mixer_settings
191 ExportFormats=$Shared/export
192 Locale=$Shared/locale
193 MidiMaps=$Shared/midi_maps
194 PatchFiles=$Shared/patchfiles
195 LuaScripts=$Shared/scripts
196 MackieControl=$Shared/mcp
199 if [ x$PRINT_SYSDEPS != x ] ; then
201 # print system dependencies
204 for file in $APPBIN/* $Libraries/* $Plugins/*.so ; do
205 if ! file $file | grep -qs Mach-O ; then
208 otool -L $file | awk '{print $1}' | egrep -v "(^@executable_path|^Ardour[0-9][.0-9]*.app)"
213 echo "Removing old $APPDIR tree ..."
216 echo "Building new app directory structure ..."
218 # only bother to make the longest paths
231 mkdir -p $MackieControl
233 mkdir -p $ExportFormats
238 # maybe set variables
239 ENVIRONMENT=environment
243 if test x$MIXBUS != x ; then
244 echo export ARDOUR_MIXBUS=true >> $ENVIRONMENT
246 # current default for MIXBUS version is US keyboard layout without a keypad
248 echo export ARDOUR_KEYBOARD_LAYOUT=us-nokeypad >> $ENVIRONMENT
249 echo export ARDOUR_UI_CONF=ardour3_ui.conf >> $ENVIRONMENT
253 # if we're not going to bundle JACK, make sure we can find
254 # jack in the places where it might be
257 echo export 'PATH="/usr/local/bin:/opt/bin:$PATH"' >> $ENVIRONMENT
259 # create startup helper script
260 if test -d $BUILD_ROOT/vst; then
263 echo export INSTALL_DIR >> $ENVIRONMENT
268 sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' -e 's/%VER%/'"${release_version}"'/;s/%EXENAME%/'"${EXENAME}"'/;s/%WINE%/'"$WINEEXE"'/' < ardour.sh.in > $APPBIN/${EXENAME}${major_version}
269 rm $ENVIRONMENT && chmod 775 $APPBIN/${EXENAME}${major_version}
271 echo "Copying ardour executable ...."
272 if test -d $BUILD_ROOT/vst; then
273 #cp -v $BUILD_ROOT/gtk2_ardour/libgtk2_ardour.so $APPLIB/
274 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}-vst.exe.so $APPBIN/${EXENAME}-${release_version}
276 cp -v $BUILD_ROOT/gtk2_ardour/ardour-${release_version}* $APPBIN/${EXENAME}-${release_version}
279 if test x$STRIP = xall ; then
280 strip -s $APPBIN/${EXENAME}-${release_version}
284 # note that at present(feb 2011), the .mo files end up in the source tree which is
285 # not really as it should be.
286 if test x$WITH_NLS != x ; then
287 echo "NLS support ..."
288 echo "I hope you remembered to run scons msgupdate!"
291 for pkg in gtk2_ardour libs/ardour libs/gtkmm2ext ; do
292 files=`find ../../$pkg -name "*.mo"`
295 # the package name is appended with a number so that
296 # it can be parallel installed during a regular install
297 # with older (and newer) versions. it is just the major
298 # number of the release (i.e. leading digits)
301 vsuffix=`echo $release_version | sed 's/^\([0-9][0-9]*\).*/\1/'`
303 if [ -z "$files" ]; then
305 echo "!!!! WARNING !!!! - Did not find any .mo files in ../../$pkg"
312 lang=`basename $file | sed 's/\.mo//'`
313 mkdir -p $Locale/$lang/LC_MESSAGES
314 cp $file $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
315 echo copy $file to $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo
316 if echo $LINGUAS | grep $lang >/dev/null 2>&1 ; then
319 LINGUAS="$LINGUAS $lang"
324 GTK_MESSAGES="atk10.mo gdk-pixbuf.mo gtk20-properties.mo gtk20.mo atk10.mo glib20.mo"
325 LOCALEROOT=$GTKSTACK_ROOT/share/locale
327 for l in $LINGUAS ; do
328 echo "Copying GTK i18n files for $l..."
329 for MO in $GTK_MESSAGES ; do
330 if [ -f $LOCALEROOT/$l/LC_MESSAGES/$MO ] ; then
331 cp $LOCALEROOT/$l/LC_MESSAGES/$MO $Locale/$l/LC_MESSAGES
333 # try with just the language spec
334 just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'`
335 if [ -f $LOCALEROOT/$just_lang/LC_MESSAGES/$MO ] ; then
336 cp $LOCALEROOT/$just_lang/LC_MESSAGES/$MO $Locale/$just_lang/LC_MESSAGES
342 echo "Skipping NLS support"
346 # Copy stuff that may be dynamically loaded
349 cp -R $GTKSTACK_ROOT/etc/* $Etc
351 # We rely on clearlooks, so include a version from our own build tree
352 # this one is special - we will set GTK_PATH to $Libraries/gtkengines
354 GTK_ENGINE_DIR=$Libraries/gtkengines/engines
355 mkdir -p $GTK_ENGINE_DIR
357 echo "Copying GTK engines ..."
358 cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.so $Libraries
359 (cd $GTK_ENGINE_DIR && ln -s ../../libclearlooks.so . )
361 cp $GTKSTACK_ROOT/lib/gtk-2.0/2.10.0/engines/libpixmap.so $Libraries
362 (cd $GTK_ENGINE_DIR && ln -s ../../libpixmap.so . )
365 cp $BUILD_ROOT/libs/surfaces/*/libardour_*.so* $Surfaces
366 cp $BUILD_ROOT/libs/surfaces/control_protocol/libardourcp.so* $Libraries
369 # got to be careful with names here
370 for x in $BUILD_ROOT/../midi_maps/*.map ; do
375 # got to be careful with names here
376 for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
381 # got to be careful with names here
382 for x in $BUILD_ROOT/../scripts/*.lua ; do
384 if test "${BN:0:1}" = "_"; then
391 # got to be careful with names here
392 for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
393 cp "$x" $MackieControl
397 # got to be careful with names here
398 for x in $BUILD_ROOT/../osc/*.preset ; do
402 # Mixbus MixerSettings (if any)
403 for x in $BUILD_ROOT/../mixer_settings/*.lua ; do
404 mkdir -p $MixerSettings # create on demand
405 cp "$x" $MixerSettings
409 cp -av $BUILD_ROOT/../templates $Templates
412 cp -av $BUILD_ROOT/../plugin_metadata $PluginMetadata
415 # got to be careful with names here
416 for x in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
417 cp "$x" $ExportFormats
421 cp $BUILD_ROOT/libs/panners/*/lib*.so* $Panners
424 for backend in jack alsa dummy wavesaudio ; do
425 cp $BUILD_ROOT/libs/backends/$backend/lib*.so* $Backends
428 # VAMP plugins that we use
429 cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.so* $Libraries
431 # Suil modules (new dir 'build-stack')
432 if test -d $GTKSTACK_ROOT/lib/suil-0/ ; then
433 cp $GTKSTACK_ROOT/lib/suil-0/lib* $Libraries
436 # Suil modules (old dir 'build-ardour-stack')
437 if test -d $ARDOURSTACK_ROOT/lib/suil-0/ ; then
438 cp $ARDOURSTACK_ROOT/lib/suil-0/lib* $Libraries
441 # VST scanner app (both LXVST as well as WIN-VST, 2in1)
442 # (if build with wine: ardour-vst-scanner is a wrapper
443 # script for ardour-vst-scanner.exe.so, if VST is disabled
444 # neither binary nor script exists)
445 if test -d $BUILD_ROOT/libs/fst ; then
446 cp $BUILD_ROOT/libs/fst/ardour-vst-scanner* $APPLIB || true
447 if test x$STRIP = xall ; then
448 strip -s $APPLIB/ardour-vst-scanner*
453 if test -f $BUILD_ROOT/libs/vfork/ardour-exec-wrapper ; then
454 cp $BUILD_ROOT/libs/vfork/ardour-exec-wrapper $APPLIB
455 if test x$STRIP = xall ; then
456 strip -s $APPLIB/ardour-exec-wrapper
460 # ALSA device reservation tool (if available)
461 if test -f $BUILD_ROOT/libs/ardouralsautil/ardour-request-device; then
462 cp $BUILD_ROOT/libs/ardouralsautil/ardour-request-device $APPLIB/ || true
463 if test x$STRIP = xall ; then
464 strip -s $APPLIB/ardour-request-device
469 HAVE_SESSION_UTILS=false
470 for file in $BUILD_ROOT/session_utils/${lower_case_appname}${major_version}-*; do
473 if test x$STRIP = xall ; then
474 strip -s $APPLIB/${BN}
476 ln -s ../lib/ardour-util.sh $APPBIN/${BN}
477 HAVE_SESSION_UTILS=true
480 if test -x $BUILD_ROOT/tools/luadevel/luasession; then
481 BN=${lower_case_appname}${major_version}-lua
482 cp -v $BUILD_ROOT/tools/luadevel/luasession $APPLIB/$BN
483 if test x$STRIP = xall ; then
484 strip -s $APPLIB/${BN}
486 ln -s ../lib/ardour-util.sh $APPBIN/${BN}
487 HAVE_SESSION_UTILS=true
490 if test "$HAVE_SESSION_UTILS" = true ; then
491 cat >> $APPLIB/ardour-util.sh << EOF
494 BIN_DIR=\$(dirname \$(readlink -f \$0))
495 INSTALL_DIR=\$(dirname \$BIN_DIR)
497 export LD_LIBRARY_PATH=\$INSTALL_DIR/lib\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}
499 export ARDOUR_DATA_PATH=\$INSTALL_DIR/share
500 export ARDOUR_CONFIG_PATH=\$INSTALL_DIR/etc
501 export ARDOUR_DLL_PATH=\$INSTALL_DIR/lib
502 export VAMP_PATH=\$INSTALL_DIR/lib\${VAMP_PATH:+:\$VAMP_PATH}
504 SELF=\$(basename \$0)
505 exec "\$INSTALL_DIR/lib/\$SELF" "\$@"
507 chmod +x $APPLIB/ardour-util.sh
510 OURLIBDIR=$BUILD_ROOT/libs
511 OURLIBS=$OURLIBDIR/surfaces/control_protocol:$OURLIBDIR/ardour:$OURLIBDIR/midi++2:$OURLIBDIR/pbd:$OURLIBDIR/gtkmm2ext:$OURLIBDIR/glibmm2:$OURLIBDIR/canvas:$OURLIBDIR/widgets:$OURLIBDIR/waveview:$OURLIBDIR/evoral:$OURLIBDIR/evoral/src/libsmf:$OURLIBDIR/audiographer:$OURLIBDIR/temporal:$OURLIBDIR/libltc:$OURLIBDIR/qm-dsp:$OURLIBDIR/ardouralsautil:$OURLIBDIR/ptformat:$BUILD_ROOT/gtk2_ardour
513 echo $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
517 # these are dynamically loaded by NSS
518 deplibs="libfreeblpriv3.so libsoftokn3.so libnsspem.so"
519 cp -v $GTKSTACK_ROOT/lib/libsoftokn3.so $Libraries/
520 cp -v $GTKSTACK_ROOT/lib/libfreeblpriv3.so $Libraries/
521 cp -v $GTKSTACK_ROOT/lib/libnsspem.so $Libraries/
522 chrpath -r foo $Libraries/libsoftokn3.so
523 chrpath -r foo $Libraries/libfreeblpriv3.so
524 chrpath -r foo $Libraries/libnsspem.so
528 filelist=`find $APPLIB/ -type f`
529 filelist="$APPBIN/${EXENAME}-${release_version} $filelist"
531 for file in $filelist ; do
532 if ! file $file | grep -qs ELF ; then
536 # speed this up a bit by not checking things multiple times.
537 for i in "${depCheckedList[@]}"; do
538 if [ $i == $file ]; then
542 depCheckedList[$checkIdx]=$file
543 checkIdx=$(($checkIdx + 1))
545 # ignore suil/qt wrappers - the plugin will pull in QT4.
546 if echo $file | grep -qs 'libsuil_.*qt[45]' ; then continue; fi
548 # do not include libjack, nor libwine
549 deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | grep -v libwine.so | awk '{print $3}'`
552 for dep in $deps ; do
553 if test "not" = ${dep}; then
555 echo "!!! ERROR !!! - Missing dependant library for $file."
556 echo "Searched: " $OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
558 (LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file)
560 echo "!!! ERROR !!! - See Above"
564 # don't use anything mapped at a specific address
565 if echo $dep | grep -qs '0x' ; then continue; fi
567 if echo $dep | grep -qs "^/lib/" ; then continue; fi
569 if echo $dep | grep -qs libjack ; then continue; fi
571 if echo $dep | grep -qs libasound ; then continue; fi
572 # don't include any X Window libraries
573 if echo $dep | grep -qs libX\. ; then continue; fi
574 if echo $dep | grep -qs libxcb ; then continue; fi
575 if echo $dep | grep -qs libICE\. ; then continue; fi
576 if echo $dep | grep -qs libSM\. ; then continue; fi
578 if echo $dep | grep -qs 'libc\.' ; then continue; fi
579 # don't include libstdc++
580 if echo $dep | grep -qs libstdc++ ; then continue; fi
581 # don't include libdbus (alsa request device)
582 if echo $dep | grep -qs libdbus ; then continue; fi
583 # nor libudev (hidapi)
584 if echo $dep | grep -qs libudev ; then continue; fi
587 if ! test -f $Libraries/$base; then
588 parent=$(basename ${file})
589 if echo $dep | grep -sq '^libs' ; then
590 echo "Copying dependant lib $BUILD_ROOT/$dep (required by ${parent})"
591 cp $BUILD_ROOT/$dep $Libraries
593 echo "Copying dependant lib $dep (required by ${parent})"
596 chmod 755 $Libraries/`basename $dep`
598 # reset RPATH so that the runtime linker never looks
599 # in places we don't want it to
601 chrpath -r foo $Libraries/`basename $dep`
602 if echo $dep | grep -sq '^/' ; then
603 # absolute path, candidate for stripping
604 deplibs="$deplibs $base"
610 if test x$missing = xfalse ; then
611 # everything has been found
618 if test x$STRIP = xall ; then
619 echo Stripping all libraries
620 # Must be writable so that we can strip
621 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod u+w
623 find $APPLIB/ -name "*.so*" -print0 | xargs -0 strip -s
624 elif test x$STRIP = xsome ; then
625 echo Stripping dependent libraries
626 for l in $deplibs ; do
627 if echo "$l" | grep -qE "$NOSTRIP"; then
634 find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod a+rx
636 echo "Copying other stuff to $APPDIR ..."
638 # these are all generated by waf
639 cp $BUILD_ROOT/gtk2_ardour/ardour.keys $Etc
640 cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Etc
641 cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Etc
642 cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Etc
644 # Copied directly from source tree
646 mkdir ${Shared}/icons
647 mkdir ${Shared}/resources
648 cp ../../system_config $Etc/system_config
649 cp ../../gtk2_ardour/icons/*.png ${Shared}/icons
650 cp -r ../../gtk2_ardour/icons/cursor_* ${Shared}/icons/
651 cp ../../gtk2_ardour/ArdourMono.ttf $Shared
652 cp ../../gtk2_ardour/resources/${APPNAME}-* ${Shared}/resources/
654 # Themes: only install those named for this app
655 cp ../../gtk2_ardour/themes/*-${lower_case_appname}.colors $Themes
658 # put sooper sekrit ingredients here and they will be copied
661 if [ -d specialSauce ] ; then
662 cp -r specialSauce $Etc
665 # install bundled LV2s to <app>/lib/LV2/
666 cp -R $BUILD_ROOT/libs/LV2 $APPLIB/
668 # lv2 core, classifications etc - TODO check if we need the complete LV2 ontology
669 if test -d $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
670 mkdir -p $APPLIB/LV2/lv2core.lv2
671 cp -R $ARDOURSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
672 elif test -d $GTKSTACK_ROOT/lib/lv2/lv2core.lv2 ; then
673 mkdir -p $APPLIB/LV2/lv2core.lv2
674 cp -R $GTKSTACK_ROOT/lib/lv2/lv2core.lv2/*.ttl $APPLIB/LV2/lv2core.lv2/
677 # go through and recursively remove any .svn dirs in the bundle
678 for svndir in `find $APPDIR -name .svn -type d`; do
683 ################################################################################
684 ### Mixbus plugins, etc
685 if test x$WITH_HARRISON_LV2 != x ; then
686 echo "Adding Harrison LV2s"
689 curl -s -S --fail -# \
690 -z "${CACHEDIR}/${HARRISONLV2}.${HARCH}.zip" \
691 -o "${CACHEDIR}/${HARRISONLV2}.${HARCH}.zip" \
692 "${HARRISONDSPURL}/${HARRISONLV2}.${HARCH}.zip"
693 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/${HARRISONLV2}.${HARCH}.zip"
696 if test -n "$MIXBUS"; then
697 echo "Adding Mixbus Channelstrip"
699 mkdir -p $APPLIB/ladspa/strip/
700 curl -s -S --fail -# \
701 -z "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
702 -o "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
703 "${HARRISONDSPURL}/${HARRISONCHANNELSTRIP}.${HARCH}.so"
705 cp "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
706 $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
707 chmod +x $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
709 echo "Adding Harrison Vamp Plugins"
711 if test "$GCC5ABI" = "true"; then
712 VAMPARCH="${HARCH}gcc5"
716 curl -s -S --fail -# \
717 -z "${CACHEDIR}/harrison_vamp.${VAMPARCH}.so" \
718 -o "${CACHEDIR}/harrison_vamp.${VAMPARCH}.so" \
719 "${HARRISONDSPURL}/harrison_vamp.${VAMPARCH}.so"
721 cp "${CACHEDIR}/harrison_vamp.${VAMPARCH}.so" \
722 $APPLIB/harrison_vamp.so
723 chmod +x $APPLIB/harrison_vamp.so
729 echo "Adding General MIDI Synth LV2"
731 for proj in x42-gmsynth ; do
732 X42_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/${proj}.latest.txt)
733 rsync -a -q --partial \
734 rsync://x42-plugins.com/x42/linux/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip \
735 "${CACHEDIR}/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip"
736 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip"
741 if test x$WITH_X42_LV2 != x ; then
744 echo "Adding x42 Plugins"
746 for proj in x42-meters x42-midifilter x42-midimap x42-stereoroute x42-eq setBfree x42-avldrums x42-whirl x42-limiter; do
747 X42_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/${proj}.latest.txt)
748 rsync -a -q --partial \
749 rsync://x42-plugins.com/x42/linux/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip \
750 "${CACHEDIR}/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip"
751 unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/${proj}-lv2-linux-${WARCH}-${X42_VERSION}.zip"
755 ################################################################################
757 if test x$WITH_HARVID != x ; then
759 HARVID_VERSION=$(curl -s -S http://ardour.org/files/video-tools/harvid_version.txt)
760 XJADEO_VERSION=$(curl -s -S http://ardour.org/files/video-tools/xjadeo_version.txt)
763 rsync://ardour.org/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
764 "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz"
767 rsync://ardour.org/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
768 "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz"
771 --exclude=README --exclude=harvid.1 --strip-components=1 \
772 -f "$CACHEDIR/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz" || exit 1
775 --exclude=README --exclude=xjadeo.1 --strip-components=1 \
776 -f "$CACHEDIR/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz" || exit 1
781 ################################################################################
783 if test x$DEMO_SESSION_URL != x ; then
784 mkdir -p $Shared/sessions
785 DEMO_SESSIONS=$(curl -s -S --fail $DEMO_SESSION_URL/index.txt)
786 for demo in $DEMO_SESSIONS; do
787 curl -s -S --fail -# -o $Shared/sessions/$demo $DEMO_SESSION_URL/$demo
791 ################################################################################
794 # Add the uninstaller
796 sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
797 chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
800 # Add the stage2.run script
802 sed -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/;s/%REPLACE_PGM%/${APPNAME}/;s/%REPLACE_VENDOR%/${VENDOR}/;s/%REPLACE_EXE%/${EXENAME}/;s/%REPLACE_GCC5%/${GCC5ABI}/;s/%REPLACE_WINE%/${USEWINE}/" < stage2.run.in > stage2.run
807 if [ -e $BUILD_ROOT/tools/sanity_check/sanityCheck ]; then
808 cp $BUILD_ROOT/tools/sanity_check/sanityCheck $APPBIN
810 echo "!!!ERROR !!! sanityCheck program is missing. packager will exit without being complete"
814 echo "Building tarball ..."
817 tar -cf $APPDIR.tar $APPDIR
819 echo "Calculating bundle size"
820 du -sb $APPDIR/ | awk '{print $1}' > $APPDIR.size
822 ( cd $APPDIR ; find . ) > file_list.txt