aboutsummaryrefslogtreecommitdiff
path: root/media/sound
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2008-09-03 03:50:43 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2008-09-03 03:50:43 +0000
commitdda36349496e0987f0ccf4f23929f7870ba11813 (patch)
tree1b469ee961c93e7f3565a52a6c50a0caba9afa9c /media/sound
parentb1c576dfbc932afc7c1ecc09348df2dcc5ac3fc7 (diff)
downloadslackbuilds-dda36349496e0987f0ccf4f23929f7870ba11813.tar.gz
slackbuilds-dda36349496e0987f0ccf4f23929f7870ba11813.tar.bz2
merging with changes made since 21th May
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1903 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'media/sound')
-rwxr-xr-xmedia/sound/ardour/ardour.SlackBuild269
-rw-r--r--media/sound/ardour/slack-required26
-rwxr-xr-xmedia/sound/audacity/audacity.SlackBuild22
-rwxr-xr-xmedia/sound/camp/camp.SlackBuild224
-rwxr-xr-xmedia/sound/cmt/cmt.SlackBuild217
-rw-r--r--media/sound/cmt/slack-required5
-rwxr-xr-xmedia/sound/darkice/darkice.SlackBuild224
-rw-r--r--media/sound/darkice/slack-required9
-rwxr-xr-xmedia/sound/darksnow/darksnow.SlackBuild141
-rw-r--r--media/sound/darksnow/slack-required5
-rwxr-xr-xmedia/sound/envy24control/envy24control.SlackBuild208
-rw-r--r--media/sound/hydrogen/hydrogen-0.9.3.diff1088
-rwxr-xr-xmedia/sound/hydrogen/hydrogen.SlackBuild218
-rw-r--r--media/sound/hydrogen/slack-required5
-rwxr-xr-xmedia/sound/jack-rack/jack-rack.SlackBuild260
-rw-r--r--media/sound/jack-rack/slack-required7
-rwxr-xr-xmedia/sound/jack/jack.SlackBuild17
-rwxr-xr-xmedia/sound/lame/lame.SlackBuild15
-rwxr-xr-xmedia/sound/lmms/lmms.SlackBuild209
-rw-r--r--media/sound/lmms/slack-required5
-rwxr-xr-xmedia/sound/mp3blaster/mp3blaster.SlackBuild220
-rw-r--r--media/sound/pulseaudio/pulseaudio-0.9.10.diff22
-rwxr-xr-xmedia/sound/pulseaudio/pulseaudio.SlackBuild193
-rwxr-xr-xmedia/sound/qjackctl/qjackctl.SlackBuild218
-rw-r--r--media/sound/qjackctl/slack-required6
-rwxr-xr-xmedia/sound/tempest_for_eliza/tempest_for_eliza.SlackBuild2
-rwxr-xr-xmedia/sound/twolame/twolame.SlackBuild220
27 files changed, 2592 insertions, 1463 deletions
diff --git a/media/sound/ardour/ardour.SlackBuild b/media/sound/ardour/ardour.SlackBuild
index b6befdfb..336cf1ec 100755
--- a/media/sound/ardour/ardour.SlackBuild
+++ b/media/sound/ardour/ardour.SlackBuild
@@ -1,61 +1,246 @@
#!/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
-#
-# SlackBuild script to call ardour.build with correct settings
-#
-
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building ardour are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
+# 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
+#
+# slackbuild for ardour, by Silvio Rhatto
+# requires: scons raptor liblrdf ladspa libsamplerate libsndfile jack libgnomecanvas liblo fftw boost aubio
+# tested: ardour-2.5
+#
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="ardour"
-VERSION=${VERSION:=2.4.1}
-ARCH="${ARCH:=i486}"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="ardour"
+PKG_NAME="ardour"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=2.5}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
-rm -rf $TMP/$PACKAGE
-mkdir -p $SRC_DIR/$PACKAGE $TMP/$PACKAGE
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
-export PACKAGE VERSION ARCH BUILD SRC_DIR TMP REPOS
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-if which simpletrack &> /dev/null; then
- simpletrack $PACKAGE.build
-else
- slacktrack -b $REPOS -x $TMP,$SRC_DIR,/dev -jefkzp "$PACKAGE-$VERSION-$ARCH-$BUILD.tgz" "./$PACKAGE.build"
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.bz2"
+URL="http://ardour.org/files/releases/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP/$PACKAGE
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
+
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
fi
+# Compile
+
+# This section and the install section uses code from
+# http://slackbuilds.org/slackbuilds/12.1/audio/ardour/ardour.SlackBuild,
+# which licence is:
+
+# Copyright 2008 Heinz Wiesinger <hmwiesinger@gmx.at>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+scons PREFIX=/usr \
+ DIST_TARGET="none" \
+ ARCH="$(echo $SLKCFLAGS)" \
+ FREEDESKTOP=1 || exit $ERROR_MAKE
+
+# Install
+scons \
+ PREFIX=/usr \
+ DIST_TARGET="none" \
+ ARCH="$(echo $SLKCFLAGS)" \
+ FREEDESKTOP=0 \
+ DESTDIR=$PKG \
+ install || exit $ERROR_INSTALL
+
+# We'll have to install the freedesktop stuff manually
+# See the FREEDESKTOP target in $srcdir/gtk2_ardour/Sconscript
+# to be sure this is synced with future releases
+cd gtk2_ardour
+ # First, install the icons
+ mkdir -p $PKG/usr/share/icons/hicolor/{16x16,22x22,32x32,48x48}/apps
+ install -m 0644 icons/ardour_icon_16px.png \
+ $PKG/usr/share/icons/hicolor/16x16/apps/ardour2.png || exit $ERROR_INSTALL
+ install -m 0644 icons/ardour_icon_22px.png \
+ $PKG/usr/share/icons/hicolor/22x22/apps/ardour2.png || exit $ERROR_INSTALL
+ install -m 0644 icons/ardour_icon_32px.png \
+ $PKG/usr/share/icons/hicolor/32x32/apps/ardour2.png || exit $ERROR_INSTALL
+ install -m 0644 icons/ardour_icon_48px.png \
+ $PKG/usr/share/icons/hicolor/48x48/apps/ardour2.png || exit $ERROR_INSTALL
+ # Next, install the mime xml file
+ mkdir -p $PKG/usr/share/mime/packages
+ install -m 0644 ardour2.xml $PKG/usr/share/mime/packages || exit $ERROR_INSTALL
+ # Now install the mimetype icons
+ mkdir -p $PKG/usr/share/icons/hicolor/{16x16,22x22,32x32,48x48}/mimetypes
+ install -m 0644 icons/application-x-ardour_16px.png \
+ $PKG/usr/share/icons/hicolor/16x16/mimetypes/application-x-ardour2.png || exit $ERROR_INSTALL
+ install -m 0644 icons/application-x-ardour_22px.png \
+ $PKG/usr/share/icons/hicolor/22x22/mimetypes/application-x-ardour2.png || exit $ERROR_INSTALL
+ install -m 0644 icons/application-x-ardour_32px.png \
+ $PKG/usr/share/icons/hicolor/32x32/mimetypes/application-x-ardour2.png || exit $ERROR_INSTALL
+ install -m 0644 icons/application-x-ardour_48px.png \
+ $PKG/usr/share/icons/hicolor/48x48/mimetypes/application-x-ardour2.png || exit $ERROR_INSTALL
+ # Finally, install the desktop file
+ mkdir -p $PKG/usr/share/applications
+ install -m 0644 ardour2.desktop.in \
+ $PKG/usr/share/applications/ardour2.desktop || exit $ERROR_INSTALL
+cd -
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="AUTHORS AUTHORS.es BUILD CONTRIBUTORS FAQ README TRANSLATORS"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-------------------------------------------------------|
+ardour: ardour (Digital Audio Workstation)
+ardour:
+ardour: Ardour is a professional multitrack/multichannel audio recorder and
+ardour: DAW for Linux, using ALSA-supported audio interfaces. It supports
+ardour: up to 32 bit samples, 24+ channels at up to 96kHz, full MMC control,
+ardour: a non-destructive, non-linear editor, and LADSPA plugins.
+ardour:
+ardour:
+ardour:
+ardour:
+ardour:
+EODESC
+
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
+fi
diff --git a/media/sound/ardour/slack-required b/media/sound/ardour/slack-required
index 1a5394ff..822da591 100644
--- a/media/sound/ardour/slack-required
+++ b/media/sound/ardour/slack-required
@@ -1,11 +1,15 @@
-scons
-raptor
-liblrdf
-ladspa
-libsamplerate
-libsndfile
-jack
-libgnomecanvas
-liblo
-fftw
-boost
+# Dependency list to ardour
+#
+# dependency [condition] [version]]
+scons
+raptor
+liblrdf
+ladspa
+libsamplerate
+libsndfile
+jack
+libgnomecanvas
+liblo
+fftw
+boost
+aubio
diff --git a/media/sound/audacity/audacity.SlackBuild b/media/sound/audacity/audacity.SlackBuild
index 4b9afa22..3f0a831f 100755
--- a/media/sound/audacity/audacity.SlackBuild
+++ b/media/sound/audacity/audacity.SlackBuild
@@ -10,13 +10,13 @@
# 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
+# 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
#
# slackbuild for audacity, by Silvio Rhatto
-# requires: wxWidgets
-# tested: audacity-1.3.4
+# requires: wxWidgets
+# tested: audacity-1.3.5
#
# Look for slackbuildrc
@@ -31,7 +31,7 @@ CWD="$(pwd)"
SRC_NAME="audacity-src"
PKG_NAME="audacity"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=1.3.4}
+SRC_VERSION=${VERSION:=1.3.5}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
@@ -55,8 +55,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
# Set error codes (used by createpkg)
@@ -83,11 +84,10 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-
# Untar
cd "$PKG_WORK"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
-PKG_SRC=`ls -l | awk '/^d/ { print $8 }'`
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
# Configure
@@ -123,9 +123,9 @@ done
mkdir -p "$PKG/install" || exit $ERROR_MKDIR
cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
diff --git a/media/sound/camp/camp.SlackBuild b/media/sound/camp/camp.SlackBuild
index 2b2b301b..63e2ed59 100755
--- a/media/sound/camp/camp.SlackBuild
+++ b/media/sound/camp/camp.SlackBuild
@@ -1,115 +1,170 @@
#!/bin/bash
#
-# camp.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.
+# camp.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.
#
-# camp.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.
+# camp.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
+# 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
#
-# slackbuild script for camp
-# by rhatto at riseup.net
+# slackbuild for camp, by Silvio Rhatto
+# requires:
+# tested: camp-1.5.3455
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building camp are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="camp"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="camp"
+PKG_NAME="camp"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=1.5.3455}
+SRC_VERSION=${VERSION:=1.5.3455}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-# ------- error codes for createpkg --------------
+# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
-ERROR_PATCH=40
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-RTOOL="wget"
-PACKAGE_EXT="gz"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://www.sector7.nu/camp/$SRC"
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://www.sector7.nu/camp/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
-
-tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
-cd $PACKAGE-$VERSION
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF
-make || exit $ERROR_MAKE
-
-CWD="`pwd`"
-
-mkdir -p $TMP/package-$PACKAGE
-cd $TMP/package-$PACKAGE
-
-mkdir -p usr/bin usr/share/$PACKAGE
-
-cp $CWD/camp usr/bin
-cp $CWD/camp.ini usr/share/$PACKAGE
-
-( cd usr/share/$PACKAGE && tar xvf $CWD/skins.tar )
-
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+mkdir -p $PKG/usr/bin $PKG/usr/share/$PKG_NAME
+cp camp $PKG/usr/bin
+cp camp.ini $PKG/usr/share/$PKG_NAME
+tar -C $PKG/usr/share/$PKG_NAME -xvf skins.tar
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="CREDITS ChangeLog Compatibility Players.info RCLayout.txt README Skin-HOWTO.txt tip.txt"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
-mkdir install
-cat << EOF > install/slack-desc
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler---------------------------------------------------------|
camp: camp (cursed mp3 player)
camp:
camp: Console Ansi Mpeg Player interface.
@@ -121,20 +176,13 @@ camp:
camp:
camp:
camp:
-EOF
+EODESC
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
-
-DOCS="CREDITS ChangeLog Compatibility Players.info RCLayout.txt README Skin-HOWTO.txt tip.txt"
-
-for file in $DOCS; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/cmt/cmt.SlackBuild b/media/sound/cmt/cmt.SlackBuild
index ff20822a..c82d6b7c 100755
--- a/media/sound/cmt/cmt.SlackBuild
+++ b/media/sound/cmt/cmt.SlackBuild
@@ -1,118 +1,178 @@
#!/bin/bash
#
-# cmt.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.
+# cmt.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.
#
-# cmt.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.
+# cmt.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
+# 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
#
-# slackbuild script for cmt
-# by rhatto at riseup.net
+# slackbuild for cmt, by Silvio Rhatto
+# requires: ladspa
+# tested: cmt-1.16
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building cmt are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="cmt"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="cmt_src"
+PKG_NAME="cmt"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=1.15}
+SRC_VERSION=${VERSION:=1.16}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-# ------- error codes for createpkg --------------
+# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
-ERROR_TAR=37; ERROR_MKPKG=38
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-RTOOL="wget"
-PACKAGE_EXT="tgz"
-SRC="$PACKAGE"_src_"$VERSION.$PACKAGE_EXT"
-URL="http://www.ladspa.org/download/$SRC"
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
+# Dowload source if necessary
+SRC="$SRC_NAME"_"$VERSION.tgz"
+URL="http://www.ladspa.org/download/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
-
-tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
-cd $PACKAGE
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
fi
+# Configure
cd src
-sed -e 's/\/usr\/local\/lib\/ladspa\//\/usr\/lib\/ladspa\//' makefile > makefile.tmp || exit $ERROR_CONF
+sed -e 's/\/usr\/local\/lib\/ladspa\//\/usr\/lib\/ladspa\//' \
+ -e 's/\/usr\/local\/bin\//\/usr\/bin\//' makefile > makefile.tmp || exit $ERROR_CONF
-echo "PREFIX = $TMP/package-$PACKAGE" >> makefile.tmp || exit $ERROR_CONF
+echo "PREFIX = $PKG" >> makefile.tmp || exit $ERROR_CONF
+
+sed -e 's/$(INSTALL_PLUGINS_DIR)/$(PREFIX)\/$(INSTALL_PLUGINS_DIR)/g' \
+ -e 's/$(INSTALL_INCLUDE_DIR)/$(PREFIX)\/$(INSTALL_INCLUDE_DIR)/g' \
+ -e 's/$(INSTALL_BINARY_DIR)/$(PREFIX)\/$(INSTALL_BINARY_DIR)/g' makefile.tmp > makefile || exit $ERROR_CONF
sed -e 's/cp $(PLUGIN_LIB) $(INSTALL_PLUGINS_DIR)/cp $(PLUGIN_LIB) $(PREFIX)\/$(INSTALL_PLUGINS_DIR)/g' \
makefile.tmp > makefile || exit $ERROR_CONF
-mkdir -p $TMP/package-$PACKAGE/usr/lib/ladspa
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
-make || exit $ERROR_MAKE
-make install || exit $ERROR_INSTALL
+# Install
+mkdir -p $PKG/usr/lib/ladspa
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
cd ..
-CWD="`pwd`"
-
-cd $TMP/package-$PACKAGE
-
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="README doc/*"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
-mkdir install
-cat << EOF > install/slack-desc
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler----------------------------------------------------------|
cmt: cmt (ladspa plugin package)
cmt:
cmt: The Computer Music Toolkit (CMT) is a collection of LADSPA plugins
@@ -124,20 +184,13 @@ cmt:
cmt:
cmt:
cmt:
-EOF
+EODESC
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
-
-DOCS="COPYING *html"
-
-for file in $DOCS; do
- cp $CWD/docs/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/cmt/slack-required b/media/sound/cmt/slack-required
index 6c92f463..6839f3e8 100644
--- a/media/sound/cmt/slack-required
+++ b/media/sound/cmt/slack-required
@@ -1 +1,4 @@
-ladspa
+# Dependency list to cmt_src
+#
+# dependency [condition] [version]]
+ladspa
diff --git a/media/sound/darkice/darkice.SlackBuild b/media/sound/darkice/darkice.SlackBuild
index e24d3fd3..48c18a40 100755
--- a/media/sound/darkice/darkice.SlackBuild
+++ b/media/sound/darkice/darkice.SlackBuild
@@ -1,112 +1,167 @@
#!/bin/bash
#
-# darkice.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.
+# darkice.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.
#
-# darkice.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.
+# darkice.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
+# 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
#
-# slackbuild script for darkice
-# by rhatto at riseup.net
+# slackbuild for darkice, by Silvio Rhatto
+# requires: lame jack twolame
+# tested: darkice-0.19
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building darkice are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="darkice"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="darkice"
+PKG_NAME="darkice"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=0.18.1}
+SRC_VERSION=${VERSION:=0.19}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-RTOOL="wget"
-PACKAGE_EXT="gz"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://darkice.tyrell.hu/dist/$VERSION/darkice-$VERSION.tar.gz"
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
-fi
-
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
-
-tar xvf$tarflag $SRC_DIR/$SRC
-cd $PACKAGE-$VERSION
-
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
-fi
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://darkice.tyrell.hu/dist/0.19/$SRC"
-if [ "$ARCH" == "x86_64" ] && [ -f "$CWD/$PACKAGE-$VERSION-x86_64.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION-x86_64.diff
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
-
-CWD="`pwd`"
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-cd $TMP/package-$PACKAGE
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
+fi
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="AUTHORS COPYING ChangeLog FAQ NEWS README TODO"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
-mkdir install
-cat << EOF > install/slack-desc
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler------------------------------------------------------|
darkice: darkice (an icecast and shoutcast streaming originator)
darkice:
darkice: DarkIce is an IceCast, IceCast2 and ShoutCast live audio streamer.
@@ -118,18 +173,13 @@ darkice:
darkice:
darkice:
darkice:
-EOF
-
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
+EODESC
-for file in AUTHORS COPYING ChangeLog FAQ INSTALL INSTALL.lame INSTALL.vorbis NEWS README TODO; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/darkice/slack-required b/media/sound/darkice/slack-required
index b63aeae6..839b3d85 100644
--- a/media/sound/darkice/slack-required
+++ b/media/sound/darkice/slack-required
@@ -1,3 +1,6 @@
-lame
-jack
-twolame
+# Dependency list to darkice
+#
+# dependency [condition] [version]]
+lame
+jack
+twolame
diff --git a/media/sound/darksnow/darksnow.SlackBuild b/media/sound/darksnow/darksnow.SlackBuild
index dd102e48..df929eb2 100755
--- a/media/sound/darksnow/darksnow.SlackBuild
+++ b/media/sound/darksnow/darksnow.SlackBuild
@@ -1,95 +1,112 @@
#!/bin/bash
#
-# darksnow.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.
+# darksnow.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.
#
-# darksnow.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.
+# darksnow.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
+# 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
#
-# slackbuild script for darksnow
-# by rhatto at riseup.net
+# slackbuild for darksnow, by Silvio Rhatto
+# requires: darkice
+# tested: darksnow-0.6.1
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building darksnow are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="darksnow"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="darksnow"
+PKG_NAME="darksnow"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=0.6.1}
+SRC_VERSION=${VERSION:=0.6.1}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-RTOOL="wget"
-PACKAGE_EXT="gz"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://darksnow.radiolivre.org/$SRC"
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://darksnow.radiolivre.org/$SRC"
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
-tar xvf$tarflag $SRC_DIR/$SRC
-cd $PACKAGE-$VERSION
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
-fi
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR
-make || exit 32
+# Install
strip darksnow
make make_pkg
-mv *-1rd.tgz $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+# Build the package
+mv *-1rd.tgz $REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/darksnow/slack-required b/media/sound/darksnow/slack-required
index e91d07df..bd6b8736 100644
--- a/media/sound/darksnow/slack-required
+++ b/media/sound/darksnow/slack-required
@@ -1 +1,4 @@
-darkice
+# Dependency list to darksnow
+#
+# dependency [condition] [version]]
+darkice
diff --git a/media/sound/envy24control/envy24control.SlackBuild b/media/sound/envy24control/envy24control.SlackBuild
index 2f9fc14e..a79fa14c 100755
--- a/media/sound/envy24control/envy24control.SlackBuild
+++ b/media/sound/envy24control/envy24control.SlackBuild
@@ -1,108 +1,167 @@
#!/bin/bash
#
-# envy24control.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.
+# envy24control.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.
#
-# envy24control.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.
+# envy24control.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
+# 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
#
-# slackbuild script for envy24control
-# by rhatto at riseup.net
+# slackbuild for envy24control, by Silvio Rhatto
+# requires:
+# tested: envy24control-1.0.17
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building envy24control are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="envy24control"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="alsa-tools"
+PKG_NAME="envy24control"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=1.0.16}
+SRC_VERSION=${VERSION:=1.0.17}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-# ------- error codes for createpkg --------------
+# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
-ERROR_PATCH=40
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-RTOOL="wget"
-PACKAGE_EXT="bz2"
-SRC="alsa-tools-$VERSION.tar.$PACKAGE_EXT"
-URL="ftp://ftp.alsa-project.org/pub/tools/$SRC"
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-SRC_DIR="$SRC_DIR/alsa-tools"
-mkdir -p $SRC_DIR
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.bz2"
+URL="ftp://ftp.alsa-project.org/pub/tools/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
-
-tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
-cd alsa-tools-$VERSION/$PACKAGE
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC/$PKG_NAME"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF
-make || exit $ERROR_MAKE
-make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
-CWD="`pwd`"
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
-cd $TMP/package-$PACKAGE
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
-mkdir install
-cat << EOF > install/slack-desc
+# Install documentation
+DOCS="AUTHORS COPYING README"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler------------------------------------------------|
envy24control: envy24control (Control tool for Envy24 (ice1712) based soundcards)
envy24control:
envy24control: Envy24control is a graphical utility for controlling cards based on
@@ -114,20 +173,13 @@ envy24control: level meter for each input and output channel.
envy24control:
envy24control:
envy24control:
-EOF
-
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
+EODESC
-DOCS="AUTHORS COPYING README"
-
-for file in $DOCS; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/hydrogen/hydrogen-0.9.3.diff b/media/sound/hydrogen/hydrogen-0.9.3.diff
index d47db8d9..1f0dc30a 100644
--- a/media/sound/hydrogen/hydrogen-0.9.3.diff
+++ b/media/sound/hydrogen/hydrogen-0.9.3.diff
@@ -1,83 +1,599 @@
---- hydrogen-0.9.3/src/lib/xml/tinyxml.h~ 2006-03-15 15:43:13.000000000 +0000
-+++ hydrogen-0.9.3/src/lib/xml/tinyxml.h 2006-03-15 15:43:33.000000000 +0000
-@@ -823,9 +823,9 @@
- #endif
-
- /// Construct.
-- TiXmlDeclaration::TiXmlDeclaration( const char * _version,
-- const char * _encoding,
-- const char * _standalone );
-+ TiXmlDeclaration( const char * _version,
-+ const char * _encoding,
-+ const char * _standalone );
+diff -Naur hydrogen-0.9.3.orig/Makefile.in hydrogen-0.9.3/Makefile.in
+--- hydrogen-0.9.3.orig/Makefile.in 2005-11-10 16:00:08.000000000 -0200
++++ hydrogen-0.9.3/Makefile.in 2008-07-24 19:43:46.000000000 -0300
+@@ -225,7 +225,7 @@
+ mkdir -p $(DESTDIR)$(prefix)/share/hydrogen/data/
+ cp -R data $(DESTDIR)$(prefix)/share/hydrogen
+ mkdir -p $(DESTDIR)$(prefix)/share/hydrogen/data/
+- @install -vD hydrogen.desktop $(DESTDIR)$(prefix)/share/applications/hydrogen.desktop
++ @install -vD -m 644 hydrogen.desktop $(DESTDIR)$(prefix)/share/applications/hydrogen.desktop
+ cd plugins;make install;cd ..
+
+
+diff -Naur hydrogen-0.9.3.orig/configure.in hydrogen-0.9.3/configure.in
+--- hydrogen-0.9.3.orig/configure.in 2006-01-18 20:02:37.000000000 -0200
++++ hydrogen-0.9.3/configure.in 2008-07-24 19:43:40.000000000 -0300
+@@ -367,6 +367,8 @@
+ echo "--- Checking for PortAudio -------------------------------------"
- virtual ~TiXmlDeclaration() {}
+ portaudio_support=false
++AC_ARG_ENABLE(portaudio, [ --disable-portaudio Compile without portaudio support], [want_portaudio=$enableval])
++if test "x$want_portaudio" != "xno"; then
+ AC_MSG_CHECKING([whether PORTAUDIOPATH environment variable is set])
+ if test "x$PORTAUDIOPATH" = "x"; then
+ AC_MSG_RESULT(PORTAUDIOPATH is not set. No PortAudio support.)
+@@ -389,6 +391,7 @@
+ echo "-----------------------------------------------------------------"
+ echo ""
-
---- hydrogen-0.9.3/src/tools/HydrogenPlayer.cpp~ 2007-04-01 21:01:06.000000000 +0000
-+++ hydrogen-0.9.3/src/tools/HydrogenPlayer.cpp 2007-04-01 21:01:28.000000000 +0000
-@@ -25,6 +25,7 @@
++fi
- #include <qapplication.h>
-+#include <cstdlib>
- #include <iostream>
- #include <stdio.h>
- #include <string>
---- hydrogen-0.9.3/src/gui/DrumkitManager.cpp~ 2007-04-01 21:03:50.000000000 +0000
-+++ hydrogen-0.9.3/src/gui/DrumkitManager.cpp 2007-04-01 21:03:58.000000000 +0000
-@@ -22,6 +22,7 @@
- *
- */
- #include <qcursor.h>
-+#include <cstdlib>
-
- #include "config.h"
- #include "Skin.h"
---- hydrogen-0.9.3/src/gui/HydrogenApp.cpp~ 2007-04-01 21:04:29.000000000 +0000
-+++ hydrogen-0.9.3/src/gui/HydrogenApp.cpp 2007-04-01 21:04:37.000000000 +0000
-@@ -46,6 +46,7 @@
- #include "LadspaFXProperties.h"
- #include "SongEditor/SongEditorPanel.h"
-
-+#include <cstdlib>
- #include <qdockwindow.h>
- #include <qsplitter.h>
- #include <qhbox.h>
---- hydrogen-0.9.3/src/gui/main.cpp~ 2007-04-01 21:05:56.000000000 +0000
-+++ hydrogen-0.9.3/src/gui/main.cpp 2007-04-01 21:06:04.000000000 +0000
-@@ -42,6 +42,7 @@
- #include "lib/DataPath.h"
- #include "lib/Exception.h"
-
-+#include <cstdlib>
- #include <iostream>
- using namespace std;
-
---- hydrogen-0.9.3/src/lib/FLACFile.cpp
-+++ hydrogen-0.9.3/src/lib/FLACFile.cpp
-@@ -39,6 +39,8 @@
- #undef LEGACY_FLAC
- #endif
-+#include <cstring>
+diff -Naur hydrogen-0.9.3.orig/configure.in~ hydrogen-0.9.3/configure.in~
+--- hydrogen-0.9.3.orig/configure.in~ 1969-12-31 21:00:00.000000000 -0300
++++ hydrogen-0.9.3/configure.in~ 2006-01-18 20:02:37.000000000 -0200
+@@ -0,0 +1,557 @@
++d added Qt .dylib search for OS X systems (2004/12/17 Jonathan Dempsey)
+
-
- /// Reads a FLAC file...not optimized yet
- class FLACFile_real : public FLAC::Decoder::File, public Object
---- hydrogen-0.9.3/src/lib/drivers/OssDriver.cpp
-+++ hydrogen-0.9.3/src/lib/drivers/OssDriver.cpp
-@@ -31,6 +31,8 @@
-
- #include <pthread.h>
-
-+#include <cstring>
+
- audioProcessCallback ossDriver_audioProcessCallback;
- bool ossDriver_running;
- pthread_t ossDriverThread;
---- hydrogen-0.9.3/src/lib/FLACFile.cpp.old 2007-02-11 20:12:34.000000000 +0100
-+++ hydrogen-0.9.3/src/lib/FLACFile.cpp 2007-02-11 20:18:25.000000000 +0100
++dnl Process this file with autoconf to produce a configure script.
++AC_INIT(README)
++#AC_PREREQ(2.58)
++
++extra_version=""
++hydrogenVersion="0.9.3$extra_version"
++
++echo "
++
++-----------------------------------------------------------------
++Starting Hydrogen $hydrogenVersion configuration...
++-----------------------------------------------------------------
++
++"
++#ac_qmake_lflags="-static"
++#AC_SUBST(ac_qmake_lflags)
++
++
++# static build
++#ac_libraries=-static
++
++
++AC_DEFINE_UNQUOTED(VERSION, "${hydrogenVersion}", [Version])
++
++
++AC_CONFIG_HEADER(config.h)
++
++dnl Set default installation prefix.
++AC_PREFIX_DEFAULT(/usr/local)
++ac_prefix=$prefix
++if test "x$ac_prefix" = "xNONE"; then
++ ac_prefix=$ac_default_prefix
++fi
++AC_SUBST(ac_prefix)
++AC_DEFINE_UNQUOTED(CONFIG_PREFIX, ["$ac_prefix"], [Default installation prefix.])
++
++
++AC_ARG_ENABLE(profile, [ --enable-profile enable profile info (default=no)], [useProfile="yes"], [useProfile="no"])
++if test "x$useProfile" = "xyes"; then
++ ac_qmake_cflags="-pg"
++ ac_qmake_cxxflags="-pg"
++ ac_qmake_lflags="-pg"
++ AC_SUBST(ac_qmake_cflags)
++ AC_SUBST(ac_qmake_cxxflags)
++ AC_SUBST(ac_qmake_lflags)
++fi
++
++dnl Enable debugging argument option.
++AC_ARG_ENABLE(debug, [ --enable-debug enable debugging (default=no)], [ac_debug="debug"], [ac_debug="release"])
++AC_SUBST(ac_debug)
++if test "x$ac_debug" = "xdebug"; then
++ AC_DEFINE(CONFIG_DEBUG, 1, [Define if debugging is enabled.])
++ features_list="${features_list} (Debug)"
++ echo " * Debug mode enabled."
++# CXXFLAGS="${CXXFLAGS} -g -O3"
++#else
++# CXXFLAGS="${CXXFLAGS} -O3"
++fi
++
++ladspa_enabled=yes
++AC_ARG_ENABLE(ladspa, [ --disable-ladspa disable LADSPA support (default=no)], [ladspa_enabled=$enableval])
++
++if test "x$ladspa_enabled" = "xyes"; then
++ AC_DEFINE(LADSPA_SUPPORT, 1, [Define if LADSPA support is enabled.])
++else
++ echo " * LADSPA support disabled."
++fi
++
++
++dnl Checks for programs.
++AC_PROG_CC
++AC_PROG_CPP
++AC_PROG_CXX
++AC_PROG_CXXCPP
++AC_PROG_GCC_TRADITIONAL
++
++dnl Checks for languages.
++AC_LANG_C
++AC_LANG_CPLUSPLUS
++
++
++
++########################
++#
++# QT
++#
++#####################
++echo ""
++echo "--- Checking for QT Libs ----------------------------------------"
++
++#dnl Check for QTDIR environment variable.
++AC_MSG_CHECKING([whether QTDIR environment variable is set])
++if test "x$QTDIR" = "x"; then
++ # is not set
++ AC_MSG_RESULT([no])
++ AC_MSG_WARN([QTDIR must be properly set.])
++
++ echo " * Searching for Qt library"
++ ac_qtlib=""
++ for X in /usr/share/qt /usr/share/qt3 /usr/lib/qt3 /usr/lib/qt-3.1; do
++ if test "x$ac_qtlib" = "x"; then
++ if test -f $X/lib/libqt-mt.so -o -f $X/lib/libqt-mt.a -o -f $X/lib/libqt-mt.dylib; then
++ ac_qtlib=$X
++ QTDIR=$X
++ echo " |-> searching QT in $X *** Found ***"
++ else
++ echo " |-> searching QT in $X *** Not found ***"
++ fi
++ fi
++ done
++else
++ AC_MSG_RESULT([$QTDIR])
++ echo " * Searching for Qt library"
++ ac_qtlib=""
++ if test "x$ac_qtlib" = "x"; then
++ if test -f $QTDIR/lib/libqt-mt.so -o -f $QTDIR/lib/libqt-mt.a -o -f $QTDIR/lib/libqt-mt.dylib; then
++ ac_qtlib=$QTDIR
++ echo " |-> searching QT in $QTDIR *** Found ***"
++ else
++ echo " |-> searching QT in $QTDIR *** Not found ***"
++ fi
++ fi
++fi
++
++#dnl Checks for Qt library.
++#AC_CACHE_CHECK([for Qt library],
++# ac_qtlib, [
++# for X in qt-mt qt; do
++# if test "x$ac_qtlib" = "x"; then
++# if test -f $QTDIR/lib/lib$X.so -o -f $QTDIR/lib/lib$X.a; then
++# ac_qtlib=$X
++# fi
++# fi
++# done
++#])
++
++if test "x$ac_qtlib" = "x"; then
++ AC_MSG_WARN([Qt library not found. Maybe QTDIR isn't properly set.])
++fi
++AC_SUBST(ac_qtlib)
++
++
++#dnl Check for Qt multi-thread support.
++#if test "x$ac_qtlib" = "xqt-mt"; then
++# ac_thread="thread"
++#fi
++#AC_SUBST(ac_thread)
++#
++CFLAGS="$CFLAGS -I$QTDIR/include"
++CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
++LIBS="-L$QTDIR/lib -L/usr/X11R6/lib"
++
++#AC_CACHE_CHECK([for Qt library version >= 3.1.1],
++# ac_qtlib_version, [
++# AC_TRY_LINK([#include "qglobal.h"], [
++#if QT_VERSION < 0x030101
++#error Qt library 3.1.1 or greater required.
++#endif
++# ],
++# ac_qtlib_version="yes", [
++# echo "no; Qt 3.1.1 or greater is required"
++# exit
++# ])
++#])
++
++dnl A common error message:
++ac_qtdir_errmsg="not found in current PATH. Maybe QT development environment isn't available (qt3-devel)."
++
++# Check for Qt qmake utility.
++#AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin:${PATH})
++AC_PATH_PROG(ac_qmake, qmake, [no], $QTDIR/bin)
++if test "x$ac_qmake" = "xno"; then
++ AC_MSG_ERROR([qmake $ac_qtdir_errmsg])
++fi
++AC_SUBST(ac_qmake)
++
++# Check for Qt moc utility.
++#AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin:${PATH})
++AC_PATH_PROG(ac_moc, moc, [no], $QTDIR/bin)
++if test "x$ac_moc" = "xno"; then
++ AC_MSG_ERROR([moc $ac_qtdir_errmsg])
++fi
++AC_SUBST(ac_moc)
++
++# Check for Qt uic utility.
++#AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin:${PATH})
++AC_PATH_PROG(ac_uic, uic, [no], $QTDIR/bin)
++if test "x$ac_uic" = "xno"; then
++ AC_MSG_ERROR([uic $ac_qtdir_errmsg])
++fi
++AC_SUBST(ac_uic)
++
++
++
++echo ""
++echo "-----------------------------------------------------------------"
++echo "Checking for libraries.."
++echo "-----------------------------------------------------------------"
++
++
++
++dnl Checks for libraries.
++AC_CHECK_LIB(m, main)
++AC_CHECK_LIB(X11, main)
++AC_CHECK_LIB(Xext, main)
++AC_CHECK_LIB($ac_qtlib, main)
++
++dnl Checks for header files.
++AC_HEADER_STDC
++AC_HEADER_SYS_WAIT
++AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h poll.h)
++
++dnl Checks for library functions.
++AC_CHECK_FUNCS(system)
++
++
++
++#################################
++#
++# libSndFile
++#
++#################################
++echo ""
++echo "--- Checking for libsndfile -------------------------------------"
++sndfile_found=false
++AC_CHECK_LIB([sndfile], sf_open, sndfile_found=yes)
++#PKG_CHECK_MODULES(LIBSNDFILE, sndfile, sndfile_found=true, sndfile_found=false)
++if test "$sndfile_found" = "false"; then
++ AC_MSG_ERROR("sndfile library not found. Website: http://www.mega-nerd.com/libsndfile/")
++else
++ ac_libraries="${ac_libraries} $( pkg-config --libs sndfile )"
++fi
++echo "-----------------------------------------------------------------"
++echo ""
++
++
++
++
++######################
++#
++# FLAC
++#
++########################
++echo ""
++echo "--- Checking for FLAC++ Libs ------------------------------------"
++flac_support=yes
++AC_ARG_ENABLE(flac_support, [ --disable-flac-support Compile without FLAC support], [flac_support=$enableval])
++
++if test "$flac_support" != "no"; then
++
++ flac_found=no
++ #AC_CHECK_HEADERS(FLAC/file_decoder.h)
++ #AC_CHECK_LIB(FLAC, FLAC__file_decoder_new, flac_found=yes)
++
++ AC_CHECK_HEADERS(FLAC++/all.h, flac_found=yes)
++ #AC_CHECK_LIB(FLAC++, FLAC::Decoder::File, flac_found=yes)
++
++ if test "$flac_found" = "no"; then
++ AC_MSG_ERROR("FLAC++ library not found. FLAC website: http://flac.sourceforge.net")
++ else
++ AC_DEFINE(FLAC_SUPPORT, 1, [Define to enable FLAC support])
++ ac_libraries="${ac_libraries} -lFLAC++ -lFLAC"
++ features_list="${features_list} (FLAC)"
++ fi
++else
++ AC_MSG_WARN("FLAC++ library disabled. WARNING: Many drumkits will not work without FLAC support!!")
++fi
++
++echo "-----------------------------------------------------------------"
++echo ""
++
++
++
++
++##############################
++#
++# JACK SUPPORT
++#
++################################
++echo ""
++echo "--- Checking for JACK -------------------------------------------"
++jack_support=yes
++AC_ARG_ENABLE(jack-support, [ --disable-jack-support Compile without JACK support], [jack_support=$enableval])
++
++JACK_SUPPORT=0
++
++if test "$jack_support" != "no"; then
++ AC_CHECK_LIB(jack, main, [ac_jack_lib="yes"], [ac_jack_lib="no"])
++ if test "x$ac_jack_lib" = "xno"; then
++ AC_MSG_WARN([ *** Could not find the JACK library, disabling JACK driver])
++ else
++ JACK_SUPPORT=1
++ AC_DEFINE(JACK_SUPPORT, 1, [Define to enable JACK driver])
++ features_list="${features_list} (Jack)"
++ ac_libraries="${ac_libraries} -ljack"
++ fi
++else
++ echo "JACK support disabled"
++fi
++echo "-----------------------------------------------------------------"
++echo ""
++
++##########################
++#
++# ALSA
++#
++##########################
++echo ""
++echo "--- Checking for ALSA Libs --------------------------------------"
++
++use_alsa=yes
++
++AC_ARG_ENABLE(alsa, [ --disable-alsa Compile without ALSA support], [use_alsa=$enableval])
++if test "$use_alsa" = "yes"; then
++ alsa_found=no
++ AC_CHECK_HEADERS(alsa/asoundlib.h)
++dnl if test "x${ac_cv_header_alsa_asoundlib_h}" = xyes ; then
++dnl fi
++
++ AC_CHECK_LIB(asound, snd_seq_open, alsa_found=yes)
++ if test "$alsa_found" = "no" ; then
++ AC_MSG_WARN([ *** Could not find the ALSA library, disabling ALSA support])
++ else
++ AC_DEFINE( ALSA_SUPPORT, 1, [Define to use ALSA Audio support])
++ features_list="${features_list} (Alsa)"
++ ac_libraries="${ac_libraries} -lasound"
++ fi
++else
++ echo "ALSA support disabled."
++fi
++
++echo "-----------------------------------------------------------------"
++echo ""
++
++
++##########################
++#
++# OSS SUPPORT
++#
++##########################
++echo ""
++echo "--- Checking for OSS --------------------------------------------"
++oss_support=yes
++
++AC_ARG_ENABLE(oss-support, [ --disable-oss-support Compile without OSS support], [oss_support=$enableval])
++if test "$oss_support" = "yes"; then
++ AC_DEFINE(OSS_SUPPORT, 1, [Define to enable OSS driver])
++ features_list="${features_list} (OSS)"
++else
++ echo "OSS support disabled."
++fi
++
++echo "-----------------------------------------------------------------"
++echo ""
++
++
++
++#################################
++#
++# PortAudio
++#
++#################################
++echo ""
++echo "--- Checking for PortAudio -------------------------------------"
++
++portaudio_support=false
++AC_MSG_CHECKING([whether PORTAUDIOPATH environment variable is set])
++if test "x$PORTAUDIOPATH" = "x"; then
++ AC_MSG_RESULT(PORTAUDIOPATH is not set. No PortAudio support.)
++else
++ AC_MSG_RESULT("[$PORTAUDIOPATH]")
++ if test -f $PORTAUDIOPATH/pa_unix_oss/libportaudio.so; then
++ echo " |-> searching PortAudio in $PORTAUDIOPATH *** Found ***"
++ ac_libraries="${ac_libraries} -L${PORTAUDIOPATH}/pa_unix_oss -lportaudio"
++ features_list="${features_list} (PortAudio)"
++ AC_DEFINE(PORTAUDIO_SUPPORT, 1, [Define to enable PortAudio driver])
++
++ ac_qmake_cxxflags="$ac_qmake_cxxflags -I$PORTAUDIOPATH/pa_common"
++ AC_SUBST(ac_qmake_cxxflags)
++ portaudio_support=true
++ else
++ echo " |-> searching PortAudio in $PORTAUDIOPATH *** Not found ***"
++ fi
++
++fi
++echo "-----------------------------------------------------------------"
++echo ""
++
++
++
++
++#################################
++#
++# PortMidi
++#
++#################################
++echo ""
++echo "--- Checking for PortMidi -------------------------------------"
++portmidi_support=false
++AC_MSG_CHECKING([whether PORTMIDIPATH environment variable is set])
++if test "x$PORTMIDIPATH" = "x"; then
++ AC_MSG_RESULT(PORTMIDIPATH is not set. No PortMidi support.)
++else
++ AC_MSG_RESULT("[$PORTMIDIPATH]")
++ if test -f $PORTMIDIPATH/pm_linux/libportmidi.a; then
++ echo " |-> searching PortMidi in $PORTMIDIPATH *** Found ***"
++ ac_libraries="${ac_libraries} ${PORTMIDIPATH}/pm_linux/libportmidi.a ${PORTMIDIPATH}/porttime/libporttime.a"
++ features_list="${features_list} (PortMidi)"
++ AC_DEFINE(PORTMIDI_SUPPORT, 1, [Define to enable PortMidi driver])
++
++ ac_qmake_cxxflags="$ac_qmake_cxxflags -I$PORTMIDIPATH/pm_common -I$PORTMIDIPATH/porttime"
++ AC_SUBST(ac_qmake_cxxflags)
++ portmidi_support=true
++ else
++ echo " |-> searching PortMidi in $PORTMIDIPATH *** Not found ***"
++ fi
++
++fi
++
++echo "-----------------------------------------------------------------"
++echo ""
++
++
++
++
++##################################
++#
++# LRDF
++#
++###################################
++echo ""
++echo "--- Checking for LRDF -------------------------------------------"
++LRDF_SUPPORT=0
++lrdf_check=yes
++AC_ARG_ENABLE(lrdf-support, [ --disable-lrdf-support Compile without LRDF support], [lrdf_check=$enableval])
++if test "$lrdf_check" = "yes"; then
++ lrdf_found=no
++ AC_CHECK_HEADERS(lrdf.h, lrdf_found=yes)
++# AC_CHECK_LIB(lrdf, lrdf_init, lrdf_found=yes)
++ if test "$lrdf_found" = "no" ; then
++ AC_MSG_WARN([ *** Could not find the LRDF library])
++ else
++ LRDF_SUPPORT=1
++ AC_DEFINE(LRDF_SUPPORT, 1, [Define to enable LRDF support])
++ ac_libraries="${ac_libraries} -llrdf -lraptor -lxml2"
++ features_list="${features_list} (LRDF)"
++ fi
++fi
++echo "-----------------------------------------------------------------"
++echo ""
++
++
++
++##################################
++#
++# define the DATA path
++#
++###################################
++AC_DEFINE_UNQUOTED(DATA_PATH, "${ac_prefix}/share/hydrogen/data", [Data dir])
++AC_DEFINE_UNQUOTED(COMPILED_FEATURES, "${features_list}", [Compiled features])
++
++
++
++
++AC_SUBST(ac_libraries)
++
++
++AC_OUTPUT(
++Makefile
++hydrogen.pro
++hydrogenPlayer.pro
++hydrogenBenchmark.pro
++hydrogen2Midi.pro
++hydrogenCUI.pro
++hydrogen.desktop
++plugins/Makefile
++plugins/wasp/Makefile
++)
++
++
++echo "
++
++-----------------------------------------------------------------
++ Hydrogen ${hydrogenVersion} configuration:
++-----------------------------------------------------------------
++
++ Source code location: ${srcdir}
++ Prefix ${ac_prefix}
++ Data path ${ac_prefix}/share/hydrogen
++ LDFLAGS ${ac_libraries}
++"
++if test "x$ac_debug" = "xdebug"; then
++ echo " Debug messages: yes"
++else
++ echo " Debug messages: no"
++fi
++
++if test "${flac_found}" = "yes"; then
++ echo " FLAC: yes"
++else
++ echo " FLAC: no"
++fi
++
++if test "${LRDF_SUPPORT}" = "1"; then
++ echo " LRDF: yes"
++else
++ echo " LRDF: no"
++fi
++
++echo ""
++
++if test "${JACK_SUPPORT}" = "1"; then
++ echo " Jack: yes"
++else
++ echo " Jack: no"
++fi
++
++if test "${alsa_found}" = "yes"; then
++ echo " ALSA : yes"
++else
++ echo " ALSA : no"
++fi
++
++if test "${oss_support}" = "yes"; then
++ echo " OSS: yes"
++else
++ echo " OSS: no"
++fi
++
++
++if test "${portaudio_support}" = "true"; then
++ echo " PortAudio yes"
++else
++ echo " PortAudio no"
++fi
++
++if test "${portmidi_support}" = "true"; then
++ echo " PortMidi: yes"
++else
++ echo " PortMidi: no"
++fi
++
++
++echo "
++ Features list = ${features_list}
++
++-----------------------------------------------------------------
++Now type make to build Hydrogen.
++-----------------------------------------------------------------
++
++If you're not a member of hydrogen-dev mailing list yet, please join.
++Please see http://www.hydrogen-music.org for details.
++
++"
+diff -Naur hydrogen-0.9.3.orig/src/lib/FLACFile.cpp hydrogen-0.9.3/src/lib/FLACFile.cpp
+--- hydrogen-0.9.3.orig/src/lib/FLACFile.cpp 2005-11-08 07:31:22.000000000 -0200
++++ hydrogen-0.9.3/src/lib/FLACFile.cpp 2008-07-24 19:43:59.000000000 -0300
@@ -33,6 +33,13 @@
//#include "FLAC/file_decoder.h"
#include <FLAC++/all.h>
@@ -120,416 +636,16 @@
+#endif
}
---- a/hydrogen-0.9.3/data/demo_songs/TR808kit-demo.h2song 2005-10-18 00:32:04.000000000 +0200
-+++ b/hydrogen-0.9.3/data/demo_songs/TR808kit-demo.h2song 2007-06-05 15:33:19.000000000 +0200
-@@ -1,5 +1,5 @@
- <song>
-- <version>0.9.2-cvs</version>
-+ <version>0.9.3</version>
- <bpm>125</bpm>
- <volume>0.71</volume>
- <metronomeVolume>0.5</metronomeVolume>
-@@ -7,10 +7,14 @@
- <author>ArtemioLabs</author>
- <notes>Demo patterns for the TR-808 Emulation Kit.</notes>
- <loopEnabled>true</loopEnabled>
-- <mode>song</mode>
-+ <mode>pattern</mode>
- <humanize_time>0</humanize_time>
- <humanize_velocity>0</humanize_velocity>
- <swing_factor>0</swing_factor>
-+ <delayFXEnabled>false</delayFXEnabled>
-+ <delayFXWetLevel>1</delayFXWetLevel>
-+ <delayFXFeedback>0.4</delayFXFeedback>
-+ <delayFXTime>48</delayFXTime>
- <instrumentList>
- <instrument>
- <id>0</id>
-@@ -18,8 +22,10 @@
- <name>Kick Long</name>
- <volume>1</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -44,8 +50,10 @@
- <name>Kick Short</name>
- <volume>1</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -70,8 +78,10 @@
- <name>Snare 1</name>
- <volume>1</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -96,8 +106,10 @@
- <name>Snare 2</name>
- <volume>1</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -122,8 +134,10 @@
- <name>Clap</name>
- <volume>1</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -148,8 +162,10 @@
- <name>Tom Low</name>
- <volume>0.77</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>0.52</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -174,8 +190,10 @@
- <name>Tom Mid</name>
- <volume>0.79</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -200,8 +218,10 @@
- <name>Tom Hi</name>
- <volume>0.79</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>0.48</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -226,8 +246,10 @@
- <name>Closed Hat</name>
- <volume>1</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -252,8 +274,10 @@
- <name>Pedal Hat</name>
- <volume>1</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -278,8 +302,10 @@
- <name>Open Hat</name>
- <volume>1</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -304,8 +330,10 @@
- <name>Cymbal</name>
- <volume>0.82</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -330,8 +358,10 @@
- <name>Shaker</name>
- <volume>0.84</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -356,8 +386,10 @@
- <name>Conga</name>
- <volume>0.88</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>0.9</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -382,8 +414,10 @@
- <name>Clave</name>
- <volume>0.84</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>0.96</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -408,8 +442,10 @@
- <name>Cowbell</name>
- <volume>0.85</volume>
- <isMuted>false</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>0.96</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -434,8 +470,10 @@
- <name>17</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -453,8 +491,10 @@
- <name>18</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -472,8 +512,10 @@
- <name>19</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -491,8 +533,10 @@
- <name>20</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -510,8 +554,10 @@
- <name>21</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -529,8 +575,10 @@
- <name>22</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -548,8 +596,10 @@
- <name>23</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -567,8 +617,10 @@
- <name>24</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -586,8 +638,10 @@
- <name>25</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -605,8 +659,10 @@
- <name>26</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -624,8 +680,10 @@
- <name>27</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -643,8 +701,10 @@
- <name>28</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -662,8 +722,10 @@
- <name>29</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -681,8 +743,10 @@
- <name>30</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -700,8 +764,10 @@
- <name>31</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -719,8 +785,10 @@
- <name>32</name>
- <volume>0.8</volume>
- <isMuted>true</isMuted>
-+ <isLocked>false</isLocked>
- <pan_L>1</pan_L>
- <pan_R>1</pan_R>
-+ <gain>1</gain>
- <FX1Level>0</FX1Level>
- <FX2Level>0</FX2Level>
- <FX3Level>0</FX3Level>
-@@ -1602,15 +1670,6 @@
- <length>-1</length>
- <instrument>9</instrument>
- </note>
-- <note>
-- <position>168</position>
-- <velocity>0.8</velocity>
-- <pan_L>1</pan_L>
-- <pan_R>1</pan_R>
-- <pitch>0</pitch>
-- <length>-1</length>
-- <instrument>9</instrument>
-- </note>
- </noteList>
- </sequence>
- <sequence>
-@@ -1792,7 +1851,17 @@
- <noteList />
- </sequence>
- <sequence>
-- <noteList />
-+ <noteList>
-+ <note>
-+ <position>156</position>
-+ <velocity>0.8</velocity>
-+ <pan_L>1</pan_L>
-+ <pan_R>1</pan_R>
-+ <pitch>0</pitch>
-+ <length>-1</length>
-+ <instrument>26</instrument>
-+ </note>
-+ </noteList>
- </sequence>
- <sequence>
- <noteList />
-
+
+diff -Naur hydrogen-0.9.3.orig/src/lib/xml/tinyxml.h hydrogen-0.9.3/src/lib/xml/tinyxml.h
+--- hydrogen-0.9.3.orig/src/lib/xml/tinyxml.h 2005-10-17 20:32:04.000000000 -0200
++++ hydrogen-0.9.3/src/lib/xml/tinyxml.h 2008-07-24 19:44:04.000000000 -0300
+@@ -823,7 +823,7 @@
+ #endif
+
+ /// Construct.
+- TiXmlDeclaration::TiXmlDeclaration( const char * _version,
++ TiXmlDeclaration( const char * _version,
+ const char * _encoding,
+ const char * _standalone );
+
diff --git a/media/sound/hydrogen/hydrogen.SlackBuild b/media/sound/hydrogen/hydrogen.SlackBuild
index fda2692b..11f4b7b7 100755
--- a/media/sound/hydrogen/hydrogen.SlackBuild
+++ b/media/sound/hydrogen/hydrogen.SlackBuild
@@ -1,104 +1,163 @@
#!/bin/bash
#
-# hydrogen.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.
+# hydrogen.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.
#
-# hydrogen.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.
+# hydrogen.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
+# 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
#
-# slackbuild script for hydrogen
-# by rhatto at riseup.net
+# slackbuild for hydrogen, by Silvio Rhatto
+# requires: libsndfile
+# tested: hydrogen-0.9.3
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building hydrogen are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="hydrogen"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="hydrogen"
+PKG_NAME="hydrogen"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=0.9.3}
+SRC_VERSION=${VERSION:=0.9.3}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-RTOOL="wget"
-PACKAGE_EXT="gz"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://easynews.dl.sourceforge.net/sourceforge/hydrogen/$SRC"
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
-
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
-fi
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://downloads.sourceforge.net/hydrogen/$SRC"
-tar xvf$tarflag $SRC_DIR/$SRC
-cd $PACKAGE-$VERSION
-
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
-
-CWD="`pwd`"
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-cd $TMP/package-$PACKAGE
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
+fi
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="AUTHORS COPYING ChangeLog README"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
-mkdir install
-cat << EOF > install/slack-desc
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
@@ -114,18 +173,13 @@ hydrogen: pan capabilities, and import of samples in wave, au, and aiff format.
hydrogen:
hydrogen:
hydrogen:
-EOF
+EODESC
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
-
-for file in AUTHORS COPYING ChangeLog INSTALL README; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/hydrogen/slack-required b/media/sound/hydrogen/slack-required
index 7d55e12e..c98af1ab 100644
--- a/media/sound/hydrogen/slack-required
+++ b/media/sound/hydrogen/slack-required
@@ -1 +1,4 @@
-libsndfile
+# Dependency list to hydrogen
+#
+# dependency [condition] [version]]
+libsndfile
diff --git a/media/sound/jack-rack/jack-rack.SlackBuild b/media/sound/jack-rack/jack-rack.SlackBuild
index 2f277018..9e352499 100755
--- a/media/sound/jack-rack/jack-rack.SlackBuild
+++ b/media/sound/jack-rack/jack-rack.SlackBuild
@@ -1,108 +1,211 @@
#!/bin/bash
#
-# jack-rack.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.
+# jack-rack.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.
#
-# jack-rack.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.
+# jack-rack.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
+# 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
#
-# slackbuild script for jack-rack
-# by rhatto at riseup.net
+# slackbuild for jack-rack, by Silvio Rhatto
+# requires: jack ladspa
+# tested: jack-rack-1.4.7
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building jack-rack are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="jack-rack"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="jack-rack"
+PKG_NAME="jack-rack"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=1.4.4}
+SRC_VERSION=${VERSION:=1.4.7}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-RTOOL="wget"
-PACKAGE_EXT="bz2"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://easynews.dl.sourceforge.net/sourceforge/jack-rack/$SRC"
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
-
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
-fi
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.bz2"
+URL="http://downloads.sourceforge.net/jack-rack/$SRC"
-tar xvf$tarflag $SRC_DIR/$SRC
-cd $PACKAGE-$VERSION
+if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+# Import minimized signing key from
+if echo [[SIGNING KEY URL]] | grep -q -v "SIGNING KEY URL"; then
+ lynx -dump [[SIGNING KEY URL]] | gpg --import || exit $ERROR_GPG
+elif echo B94D2E95 | grep -q -v "SIGNING KEY ID"; then
+ gpg --recv-keys B94D2E95 || exit $ERROR_GPG
+else
+ gpg --import << EOKEY || exit $ERROR_GPG
+[[SIGNING KEY]]
+EOKEY
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
+# Download source's signature if necessary and check it
+if echo http://downloads.sourceforge.net/jack-rack/jack-rack-1.4.7.tar.bz2.asc | grep -q -v "SIGNING URL"; then
+ SIGNATURE="`basename http://downloads.sourceforge.net/jack-rack/jack-rack-1.4.7.tar.bz2.asc`"
+ if [ ! -s "$SRC_DIR/$SIGNATURE" ]; then
+ wget "http://downloads.sourceforge.net/jack-rack/jack-rack-1.4.7.tar.bz2.asc" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET
+ fi
+else
+ if [ -s "$SRC_DIR/$SRC.sig" ]; then
+ SIGNATURE="$SRC.sig"
+ elif [ -s "$SRC_DIR/$SRC.asc" ]; then
+ SIGNATURE="$SRC.asc"
+ else
+ echo Trying to get signature file from $URL.sig...
+ if wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"; then
+ SIGNATURE="$SRC.sig"
+ else
+ rm $SRC_DIR/$SRC.sig
+ echo Trying to get signature file from $URL.asc...
+ if wget "$URL.asc" -O "$SRC_DIR/$SRC.asc"; then
+ SIGNATURE="$SRC.asc"
+ else
+ rm $SRC_DIR/$SRC.asc
+ echo "Error getting source's signature file"
+ exit $ERROR_GPG
+ fi
+ fi
+ fi
+fi
-CWD="`pwd`"
+echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE...
+gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG
+echo Success.
+
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-cd $TMP/package-$PACKAGE
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
+fi
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="ABOUT-NLS AUTHORS BUGS COPYING ChangeLog NEWS README THANKS TODO"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
-mkdir install
-cat << EOF > install/slack-desc
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler----------------------------------------------------|
jack-rack: jack-rack
jack-rack:
jack-rack: JACK Rack is a LADSPA effects rack for the JACK audio API. It
@@ -114,18 +217,13 @@ jack-rack:
jack-rack:
jack-rack:
jack-rack:
-EOF
-
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
+EODESC
-for file in ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/jack-rack/slack-required b/media/sound/jack-rack/slack-required
index 1a3011d8..db6dcdb1 100644
--- a/media/sound/jack-rack/slack-required
+++ b/media/sound/jack-rack/slack-required
@@ -1,2 +1,5 @@
-jack
-ladspa
+# Dependency list to jack-rack
+#
+# dependency [condition] [version]]
+jack
+ladspa
diff --git a/media/sound/jack/jack.SlackBuild b/media/sound/jack/jack.SlackBuild
index b5975dfc..b7ccaa22 100755
--- a/media/sound/jack/jack.SlackBuild
+++ b/media/sound/jack/jack.SlackBuild
@@ -10,13 +10,13 @@
# 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
+# 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
#
# slackbuild for jack, by Rudson R. Alves
# requires: libsndfile libfreebob
-# tested: jack-0.109.0
+# tested: jack-0.109.2
#
# Look for slackbuildrc
@@ -55,8 +55,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
# Set error codes (used by createpkg)
@@ -86,7 +87,7 @@ fi
# Untar
cd "$PKG_WORK"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
-PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`"
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
# Configure
@@ -122,9 +123,9 @@ done
mkdir -p "$PKG/install" || exit $ERROR_MKDIR
cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
diff --git a/media/sound/lame/lame.SlackBuild b/media/sound/lame/lame.SlackBuild
index f7529143..040339d8 100755
--- a/media/sound/lame/lame.SlackBuild
+++ b/media/sound/lame/lame.SlackBuild
@@ -10,9 +10,9 @@
# 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
+# 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
#
# slackbuild for lame, by Rudson R. Alves
# requires:
@@ -55,8 +55,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2"
+ SLKCFLAGS="-O2 -fPIC"
LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
# Set error codes (used by createpkg)
@@ -86,7 +87,7 @@ fi
# Untar
cd "$PKG_WORK"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
-PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`"
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
# Configure
@@ -122,9 +123,9 @@ done
mkdir -p "$PKG/install" || exit $ERROR_MKDIR
cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
diff --git a/media/sound/lmms/lmms.SlackBuild b/media/sound/lmms/lmms.SlackBuild
index c8f6e5c6..9bbe776c 100755
--- a/media/sound/lmms/lmms.SlackBuild
+++ b/media/sound/lmms/lmms.SlackBuild
@@ -1,107 +1,167 @@
#!/bin/bash
#
-# lmms.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.
+# lmms.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.
#
-# lmms.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.
+# lmms.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
+# 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
#
-# slackbuild script for lmms
-# by rhatto at riseup.net
+# slackbuild for lmms, by Silvio Rhatto
+# requires: ladspa
+# tested: lmms-0.3.2
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building lmms are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="lmms"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="lmms"
+PKG_NAME="lmms"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=0.2.1}
+SRC_VERSION=${VERSION:=0.3.2}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-# ------- error codes for createpkg --------------
+# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
-ERROR_TAR=37; ERROR_MKPKG=38
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-RTOOL="wget"
-PACKAGE_EXT="bz2"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://easynews.dl.sourceforge.net/sourceforge/lmms/$SRC"
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.bz2"
+URL="http://downloads.sourceforge.net/lmms/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
-
-tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR
-cd $PACKAGE-$VERSION
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF
-make || exit $ERROR_MAKE
-make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
-CWD="`pwd`"
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
-cd $TMP/package-$PACKAGE
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
-mkdir install
-cat << EOF > install/slack-desc
+# Install documentation
+DOCS="AUTHORS COPYING ChangeLog INSTALL README TODO"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler---------------------------------------------------------|
lmms: lmms (Linux MultiMedia Studio)
lmms:
lmms: LMMS aims to be a free alternative to popular (but commercial and
@@ -113,20 +173,13 @@ lmms:
lmms:
lmms:
lmms:
-EOF
+EODESC
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
-
-DOCS="AUTHORS COPYING ChangeLog INSTALL README TODO"
-
-for file in $DOCS; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/lmms/slack-required b/media/sound/lmms/slack-required
index 6c92f463..6aa881a8 100644
--- a/media/sound/lmms/slack-required
+++ b/media/sound/lmms/slack-required
@@ -1 +1,4 @@
-ladspa
+# Dependency list to lmms
+#
+# dependency [condition] [version]]
+ladspa
diff --git a/media/sound/mp3blaster/mp3blaster.SlackBuild b/media/sound/mp3blaster/mp3blaster.SlackBuild
index 172ca66f..91da9532 100755
--- a/media/sound/mp3blaster/mp3blaster.SlackBuild
+++ b/media/sound/mp3blaster/mp3blaster.SlackBuild
@@ -1,108 +1,167 @@
#!/bin/bash
#
-# mp3blaster.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.
+# mp3blaster.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.
#
-# mp3blaster.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.
+# mp3blaster.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
+# 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
#
-# slackbuild script for mp3blaster
-# by rhatto at riseup.net
+# slackbuild for mp3blaster, by Silvio Rhatto
+# requires:
+# tested: mp3blaster-3.2.0
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building mp3blaster are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="mp3blaster"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="mp3blaster"
+PKG_NAME="mp3blaster"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=3.2.0}
+SRC_VERSION=${VERSION:=3.2.0}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:="--enable-newthreads"}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-RTOOL="wget"
-PACKAGE_EXT="gz"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://www.stack.nl/%7Ebrama/mp3blaster/src/$SRC"
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
-
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
-fi
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://www.stack.nl/~brama/mp3blaster/src/$SRC"
-tar xvf$tarflag $SRC_DIR/$SRC
-cd $PACKAGE-$VERSION
-
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --enable-newthreads
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
-
-CWD="`pwd`"
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-cd $TMP/package-$PACKAGE
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
+fi
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="AUTHORS BUGS COPYING CREDITS ChangeLog FAQ NEWS README TODO"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
-mkdir install
-cat << EOF > install/slack-desc
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler---------------------------------------------------|
mp3blaster: mp3blaster (a ncurses based audio player)
mp3blaster:
mp3blaster: MP3Blaster is a text console based program for playing mainly mp3
@@ -114,18 +173,13 @@ mp3blaster:
mp3blaster:
mp3blaster:
mp3blaster:
-EOF
+EODESC
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
-
-for file in AUTHORS BUGS COPYING CREDITS ChangeLog FAQ NEWS README TODO; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/pulseaudio/pulseaudio-0.9.10.diff b/media/sound/pulseaudio/pulseaudio-0.9.10.diff
new file mode 100644
index 00000000..ae593e2b
--- /dev/null
+++ b/media/sound/pulseaudio/pulseaudio-0.9.10.diff
@@ -0,0 +1,22 @@
+--- src/daemon/caps.h.old 2008-06-29 20:37:31.000000000 -0300
++++ src/daemon/caps.h 2008-06-29 20:38:09.000000000 -0300
+@@ -25,7 +25,7 @@
+ ***/
+
+ void pa_drop_root(void);
+-void pa_drop_caps(void);
++int pa_drop_caps(void);
+ int pa_limit_caps(void);
+
+ #endif
+--- src/daemon/caps.c.old 2008-06-29 20:37:24.000000000 -0300
++++ src/daemon/caps.c 2008-06-29 20:38:07.000000000 -0300
+@@ -113,7 +113,7 @@
+ }
+
+ /* Drop all capabilities, effectively becoming a normal user */
+-void pa_drop_caps(void) {
++int pa_drop_caps(void) {
+ cap_t caps;
+
+ pa_assert_se(prctl(PR_SET_KEEPCAPS, 0, 0, 0, 0) == 0);
diff --git a/media/sound/pulseaudio/pulseaudio.SlackBuild b/media/sound/pulseaudio/pulseaudio.SlackBuild
new file mode 100755
index 00000000..ac6c0180
--- /dev/null
+++ b/media/sound/pulseaudio/pulseaudio.SlackBuild
@@ -0,0 +1,193 @@
+#!/bin/bash
+#
+# pulseaudio.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.
+#
+# pulseaudio.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
+#
+# slackbuild for pulseaudio, by Rafael Diniz
+# requires:
+# tested: pulseaudio-0.9.10
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="pulseaudio"
+PKG_NAME="pulseaudio"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=0.9.10}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
+BUILD=${BUILD:=1rd}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
+TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
+REPOS=${REPOS:=$TMP}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=" --with-system-user=pulseaudio --with-system-group=pulseaudio --with-access-group=users "}
+NUMJOBS=${NUMJOBS:="-j3"}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
+
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Creating build user and group
+if ! grep -qe "^$PKG_NAME:" /etc/group; then
+ groupadd $PKG_NAME
+fi
+if ! grep -qe "^$PKG_NAME:" /etc/passwd; then
+ useradd $PKG_NAME -g $PKG_NAME
+fi
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://0pointer.de/lennart/projects/pulseaudio/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np0 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np0 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np0 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np0 || exit $ERROR_PATCH
+ fi
+done
+
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np0 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np0 || exit $ERROR_PATCH
+ else
+ patch -Np0 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
+fi
+
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler---------------------------------------------------|
+pulseaudio: pulseaudio (sound server daemon)
+pulseaudio:
+pulseaudio: PulseAudio is a sound server for POSIX and Win32 systems.
+pulseaudio:
+pulseaudio:
+pulseaudio:
+pulseaudio:
+pulseaudio:
+pulseaudio:
+pulseaudio: http://www.pulseaudio.org/
+pulseaudio:
+EODESC
+
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
+fi
diff --git a/media/sound/qjackctl/qjackctl.SlackBuild b/media/sound/qjackctl/qjackctl.SlackBuild
index e93b4c42..6817779e 100755
--- a/media/sound/qjackctl/qjackctl.SlackBuild
+++ b/media/sound/qjackctl/qjackctl.SlackBuild
@@ -1,104 +1,163 @@
#!/bin/bash
#
-# qjackctl.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.
+# qjackctl.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.
#
-# qjackctl.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.
+# qjackctl.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
+# 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
#
-# slackbuild script for qjackctl
-# by rhatto at riseup.net
+# slackbuild for qjackctl, by Silvio Rhatto
+# requires: jack
+# tested: qjackctl-0.2.23
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building qjackctl are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="qjackctl"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="qjackctl"
+PKG_NAME="qjackctl"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=0.2.21}
+SRC_VERSION=${VERSION:=0.2.23}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-RTOOL="wget"
-PACKAGE_EXT="gz"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://easynews.dl.sourceforge.net/sourceforge/qjackctl/$SRC"
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
-
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
-fi
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://downloads.sourceforge.net/qjackctl/$SRC"
-tar xvf$tarflag $SRC_DIR/$SRC
-cd $PACKAGE-$VERSION
-
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
-
-CWD="`pwd`"
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-cd $TMP/package-$PACKAGE
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
+fi
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="AUTHORS COPYING ChangeLog README TODO"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
-mkdir install
-cat << EOF > install/slack-desc
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
@@ -114,18 +173,13 @@ qjackctl:
qjackctl:
qjackctl:
qjackctl:
-EOF
+EODESC
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
-
-for file in AUTHORS COPYING ChangeLog INSTALL README TODO; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/media/sound/qjackctl/slack-required b/media/sound/qjackctl/slack-required
index c052c249..405e3b6d 100644
--- a/media/sound/qjackctl/slack-required
+++ b/media/sound/qjackctl/slack-required
@@ -1,2 +1,4 @@
-jack
-qt
+# Dependency list to qjackctl
+#
+# dependency [condition] [version]]
+jack
diff --git a/media/sound/tempest_for_eliza/tempest_for_eliza.SlackBuild b/media/sound/tempest_for_eliza/tempest_for_eliza.SlackBuild
index 113f01a9..a0bab82e 100755
--- a/media/sound/tempest_for_eliza/tempest_for_eliza.SlackBuild
+++ b/media/sound/tempest_for_eliza/tempest_for_eliza.SlackBuild
@@ -43,7 +43,7 @@ REPOS=${REPOS:=$TMP}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=}
-NUMJOBS=${NUMJOBS:=}
+NUMJOBS=${NUMJOBS:=-j3}
# Set optmization flags based on $ARCH
if [ "$ARCH" = "i386" ]; then
diff --git a/media/sound/twolame/twolame.SlackBuild b/media/sound/twolame/twolame.SlackBuild
index ababd174..c43ef3c9 100755
--- a/media/sound/twolame/twolame.SlackBuild
+++ b/media/sound/twolame/twolame.SlackBuild
@@ -1,108 +1,167 @@
#!/bin/bash
#
-# twolame.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.
+# twolame.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.
#
-# twolame.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.
+# twolame.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
+# 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
#
-# slackbuild script for twolame
-# by rhatto at riseup.net
+# slackbuild for twolame, by Silvio Rhatto
+# requires:
+# tested: twolame-0.3.12
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building twolame are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD="`pwd`"
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE="twolame"
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="twolame"
+PKG_NAME="twolame"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=0.3.10}
+SRC_VERSION=${VERSION:=0.3.12}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
-
-if [ "$ARCH" == "x86_64" ]; then
- export LDFLAGS="-L/lib64 -L/usr/lib64"
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
fi
-RTOOL="wget"
-PACKAGE_EXT="gz"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-URL="http://easynews.dl.sourceforge.net/sourceforge/twolame/$SRC"
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
-
-if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
-fi
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-TMP="$TMP/$PACKAGE"
-rm -rf $TMP
-mkdir -p $TMP
-cd $TMP
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
+URL="http://downloads.sourceforge.net/twolame/$SRC"
-tar xvf$tarflag $SRC_DIR/$SRC
-cd $PACKAGE-$VERSION
-
-if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
-
-CWD="`pwd`"
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches="
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ fi
+done
-cd $TMP/package-$PACKAGE
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+ for patch_url in [[PATCH URLS]]; do
+ patch="`basename $patch_url`"
+ if [ ! -s "$SRC_DIR/$patch" ]; then
+ wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+ fi
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ done
+fi
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Configure
+CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF
+
+# Compile
+make $NUMJOBS || exit $ERROR_MAKE
+
+# Install
+make install DESTDIR="$PKG" || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Install documentation
+DOCS="AUTHORS COPYING ChangeLog README TODO"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
-mkdir install
-cat << EOF > install/slack-desc
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
+# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler------------------------------------------------------|
twolame: twolame
twolame:
twolame: TwoLAME is an optimised MPEG Audio Layer 2 (MP2) encoder based on
@@ -114,18 +173,13 @@ twolame:
twolame:
twolame:
twolame:
-EOF
+EODESC
-# docs
-mkdir -p usr/doc/$PACKAGE-$VERSION
-
-for file in AUTHORS COPYING ChangeLog README TODO; do
- cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
-done
-
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+# Build the package
+cd "$PKG"
+makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+ rm -rf "$PKG_WORK" "$PKG"
fi
-