#!/bin/bash # # ardour.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # ardour.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="ardour" PACKAGE_EXT="bz2" VERSION=${VERSION:=2.8.16} BUILD=${BUILD:=3} ARCH=$(uname -m) if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="http://www.liwjatan.at/files/src/ardour/$SRC" get_source $SRC $URL unpack_source $SRC $PACKAGE-$VERSION if [ "$ARCH" == "i486" ] || [ "$ARCH" == "i686" ]; then TARGET="i686" fi if [ "$ARCH" == "x86_64" ]; then TARGET="x86_64" fi if [ "${LV2:-no}" = "yes" ]; then lv2opt="LV2=0 LV2_UI=0" else lv2opt="LV2=1 LV2_UI=1" fi if [ "${WIIMOTE:-no}" = "no" ]; then wiiopt="WIIMOTE=0" else wiiopt="WIIMOTE=1" fi if [ "${VST:-no}" = "no" ]; then vstopt="VST=0" else vstopt="VST=1" fi # Make FREEDESKTOP work with DESTDIR patch -d gtk2_ardour -p0 -i $CWD/SConscript.diff # Omit -O3 from the CFLAGS patch -p1 < $CWD/SConstruct.diff # Patch for lilv > 0.14.4 patch -p1 < $CWD/lilv.patch # Temoline crash fix, backport from ardour3 patch -p1 < $CWD/tempoline_crash.patch scons \ PREFIX=/usr \ LIBDIR=/usr/lib${LIBDIRSUFFIX} \ DIST_TARGET="$TARGET" \ ARCH="$(echo $SLKCFLAGS)" \ FREEDESKTOP=1 \ SYSLIBS=1 \ $wiiopt \ $lv2opt \ $vstopt || exit 1 scons \ --implicit-deps-unchanged \ PREFIX=/usr \ LIBDIR=/usr/lib${LIBDIRSUFFIX} \ DIST_TARGET="$TARGET" \ ARCH="$(echo $SLKCFLAGS)" \ FREEDESKTOP=1 \ SYSLIBS=1 \ $wiiopt \ $lv2opt \ $vstopt \ DESTDIR=$PKG \ install || exit 1 mkdir -p $DOCS cp -a COPYING PACKAGER_README README $DOCS cp $CWD/doinst.sh.in $CWD/doinst.sh # Let's not clobber config files cd $PKG/etc/ardour2 for i in * ; do mv $i $i.new echo "config etc/ardour2/$i.new" >> $CWD/doinst.sh done cd - fixup_package $PKG rm -f $CWD/doinst.sh # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi