#!/bin/bash # # ladspa.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. # # ladspa.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="ladspa_sdk" PACKAGE_EXT="tgz" VERSION=${VERSION:=1.17} BUILD=${BUILD:=1} POPT="-O3" if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="${PACKAGE}_${VERSION}.$PACKAGE_EXT" URL="http://www.ladspa.org/download/$SRC" get_source $SRC $URL unpack_source $SRC ${PACKAGE}_${VERSION} # Arch patch for a plugin underlinking bug: https://bugs.archlinux.org/task/76259 cat $CWD/ladspa-1.17-plugin_underlinking.patch | patch -p1 --verbose export LDFLAGS="$SLKLDFLAGS" export CXXFLAGS="$SLKCFLAGS" export CFLAGS="$SLKCFLAGS" # Make should respect our LDFLAGS: sed -e "s,-O2,${CFLAGS} ${LDFLAGS}," -i src/Makefile make -C src targets $NUMJOBS make -C src install \ INSTALL_PLUGINS_DIR=${PKG}/usr/lib${LIBDIRSUFFIX}/ladspa/ \ INSTALL_INCLUDE_DIR=${PKG}/usr/include/ \ INSTALL_BINARY_DIR=${PKG}/usr/bin/ mkdir -p $DOCS cp -a README doc/* $DOCS mkdir -p $PKG/etc/profile.d # Add profiles cat << EOF > $PKG/etc/profile.d/ladspa.sh #!/bin/sh export LADSPA_PATH=/usr/lib${LIBDIRSUFFIX}/ladspa EOF cat << EOF > $PKG/etc/profile.d/ladspa.csh #!/bin/csh setenv LADSPA_PATH /usr/lib${LIBDIRSUFFIX}/ladspa EOF chmod 0755 $PKG/etc/profile.d/ladspa.* fixup_package $PKG rm -f $TMP/test.wav # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/${PACKAGE}_sdk rm -rf $PKG fi