#!/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="ardour4" PACKAGE_EXT="xz" VERSION=${VERSION:=4.7} BUILD=${BUILD:=1} ARCH=$(uname -m) if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="ardour-$VERSION.tar.$PACKAGE_EXT" if [ ! -f $CWD/$SRC ]; then cd $TMP rm -rf ardour ardour-$VERSION git clone --recursive --branch $VERSION https://github.com/ardour/ardour cd ardour rm -R .gitignore rm -rf .git touch libs/ardour/revision.cc cd $TMP mv ardour ardour-$VERSION echo "Creating $SRC" tar cfJ $CWD/$SRC ardour-$VERSION cd $CWD fi unpack_source $SRC ardour-$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="--no-lv2" else lv2opt="--lv2" fi cat $CWD/ardour-${VERSION}-revision-naming.patch | patch -p1 CXXFLAGS="-std=c++11" \ ./waf configure \ --prefix=/usr \ --configdir=/etc \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --dist-target=${TARGET} \ --freedesktop \ --with-backends="jack,alsa" \ --libjack=weak \ --optimize \ --lxvst \ $lv2opt ./waf build -j5 ./waf install --destdir=$PKG mkdir -p $PKG/usr/share/applications/ cat $CWD/ardour4.desktop > $PKG/usr/share/applications/ardour4.desktop mkdir -p $DOCS cp -a COPYING PACKAGER_README README TRANSLATORS $DOCS cp $CWD/doinst.sh.in $CWD/doinst.sh 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