summaryrefslogtreecommitdiffstats
path: root/source/ap/sox
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/sox')
-rw-r--r--source/ap/sox/slack-desc10
-rwxr-xr-xsource/ap/sox/sox.SlackBuild28
2 files changed, 27 insertions, 11 deletions
diff --git a/source/ap/sox/slack-desc b/source/ap/sox/slack-desc
index 1c7754679..940a5422b 100644
--- a/source/ap/sox/slack-desc
+++ b/source/ap/sox/slack-desc
@@ -1,19 +1,19 @@
# 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
-# make exactly 11 lines for the formatting to be correct. It's also
+# 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------------------------------------------------------|
sox: sox (universal sound sample translator)
sox:
-sox: Sox is a universal sound converter, player, and recorder. It can
+sox: Sox is a universal sound converter, player, and recorder. It can
sox: play, record, and convert between several sound file formats such as
sox: .au, .snd, .voc and .wav.
sox:
sox:
sox:
sox:
-sox: Homepage: http://sox.sourceforge.net/
+sox: Homepage: http://sox.sourceforge.net/
sox:
diff --git a/source/ap/sox/sox.SlackBuild b/source/ap/sox/sox.SlackBuild
index d7ce00154..b666d426f 100755
--- a/source/ap/sox/sox.SlackBuild
+++ b/source/ap/sox/sox.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,10 +20,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sox
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-5}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -51,7 +52,19 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
+# If this package is being built for ALSA (no PulseAudio), use the _alsa $TAG:
+if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then
+ TAG="_alsa"
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD$TAG.txz"
+ exit 0
+fi
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -75,11 +88,14 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--disable-static \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -115,5 +131,5 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD$TAG.txz