summaryrefslogtreecommitdiff
path: root/audio/TiMidity++/TiMidity++.SlackBuild
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2010-05-12 23:27:44 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 23:27:44 +0200
commit57757fc46fb6f37dc98a7b88eb6abdb137aac10f (patch)
tree117c87d18eca34cd86643fb936f95e0f78c92ffc /audio/TiMidity++/TiMidity++.SlackBuild
parentd9486fe88906567a3dc46f4011997d5202cd91aa (diff)
downloadslackbuilds-57757fc46fb6f37dc98a7b88eb6abdb137aac10f.tar.gz
audio/TiMidity++: Added to 12.2 repository
Diffstat (limited to 'audio/TiMidity++/TiMidity++.SlackBuild')
-rw-r--r--audio/TiMidity++/TiMidity++.SlackBuild101
1 files changed, 101 insertions, 0 deletions
diff --git a/audio/TiMidity++/TiMidity++.SlackBuild b/audio/TiMidity++/TiMidity++.SlackBuild
new file mode 100644
index 0000000000..ce60b14524
--- /dev/null
+++ b/audio/TiMidity++/TiMidity++.SlackBuild
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+# Slackware build script for TiMidity++
+# Written by Kyle Guinn <elyk03@gmail.com>
+
+# Changes for Slackware 12.1 by Richard Hoyle <hoyle.richard@gmail.com>
+# Modified by Michiel van Wessem. <michiel.van.wessem@gmail.com>
+
+PRGNAM="TiMidity++"
+VERSION="2.13.2"
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-3}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM-$VERSION
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="AUTHORS COPYING ChangeLog* INSTALL* NEWS README* TODO doc/C/README* doc/C/FAQ doc/C/CHANGES.02i"
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# The patches here include most of those in Debian's 2.13.2-19
+# patch set, minus some gross (in both senses of the word) changes
+# to the autoconf build scripts to reflect merges of libOggFLAC
+# into libFLAC++ since FLAC-1.1.3. ===RAH
+for patch in $CWD/patches/* ; do
+ patch -p1 < $patch
+done
+
+# Regenerate files for automake/autoconf.
+# This removes much of the cruft in Debian's patch set.
+autoreconf
+
+# Uncomment /etc/timidity.cfg as the default config file location
+sed -i "s|/\* #define CONFIG_FILE \"/etc/timidity.cfg\" \*/|#define CONFIG_FILE \"/etc/timidity.cfg\"|" timidity/timidity.h
+
+EXTRACFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --with-module-dir=/usr/lib${LIBDIRSUFFIX}/timidity \
+ --enable-audio=alsa,oss,arts,esd,ao,vorbis,flac \
+ --enable-dynamic=gtk,ncurses,motif,tcltk,emacs,vt100,alsaseq \
+ --enable-server \
+ --enable-network \
+ --enable-spectrogram \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+# Create a default timidity.cfg
+# TiMidity++ will complain if this file is missing.
+mkdir -p $PKG/etc
+cat > $PKG/etc/timidity.cfg.new << EOF
+# This is the default configuration file for TiMidity++.
+# See timidity.cfg(5) for details.
+EOF
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz