summaryrefslogtreecommitdiffstats
path: root/libsndfile
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2009-06-13 21:04:35 +0000
committer Eric Hameleers <alien@slackware.com>2009-06-13 21:04:35 +0000
commitda392b126a6f36f005701fa91cdd583fe03d5f74 (patch)
tree7c7238dfb13245279280b8ce7905b4cba53e2e63 /libsndfile
parentd409015ca5bc51f2be20562b085a07800401c53c (diff)
downloadasb-da392b126a6f36f005701fa91cdd583fe03d5f74.tar.gz
asb-da392b126a6f36f005701fa91cdd583fe03d5f74.tar.xz
Updated for 1.0.20
Diffstat (limited to 'libsndfile')
-rwxr-xr-xlibsndfile/build/libsndfile.SlackBuild97
1 files changed, 37 insertions, 60 deletions
diff --git a/libsndfile/build/libsndfile.SlackBuild b/libsndfile/build/libsndfile.SlackBuild
index 04fa31a9..bbfce4ec 100755
--- a/libsndfile/build/libsndfile.SlackBuild
+++ b/libsndfile/build/libsndfile.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2006-2008 Eric Hameleers <alien@slackware.com>
+# Copyright 2006-2009 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,8 +36,10 @@
# * Update, also for a rework of the SlackBuild
# 1.0.17-2: 13/Mar/2008 by Eric Hameleers <alien@slackware.com>
# * Apply patch for flac > 1.1.2
+# 1.0.20-1: 13/jun/2009 by Eric Hameleers <alien@slackware.com>
+# * Update
#
-# Run 'sh libsndfile.SlackBuild --cleanup' to build a Slackware package.
+# Run 'sh libsndfile.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
@@ -46,23 +48,20 @@
# Set initial variables:
PRGNAM=libsndfile
-VERSION=${VERSION:-1.0.17}
+VERSION=${VERSION:-1.0.20}
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
-DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO"
+DOCS="AUTHORS COPYING* ChangeLog NEWS README"
# Where do we look for sources?
-CWD=`pwd`
-SRCDIR=`dirname $0`
-[ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR}
+SRCDIR=$(cd $(dirname $0); pwd)
# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Input URL: http://www.mega-nerd.com/libsndfile/libsndfile-1.0.17.tar.gz
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
SRCURL="http://www.mega-nerd.com/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
@@ -77,18 +76,8 @@ trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
set -u
P1=${1:-1}
-# Slackware 11 and up need other option (gcc > 3.3.x)
-if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then
- MOPT=tune
-else
- MOPT=cpu
-fi
-
case "$ARCH" in
- i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
s390) SLKCFLAGS="-O2"
@@ -109,7 +98,7 @@ esac
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
mkdir -p $PKG # place for the package to be built
-rm -rf $PKG/* # We always erase old package's contents
+rm -rf $PKG/* # erase old package's contents
mkdir -p $OUTPUT # place for the package to be saved
# Source file availability:
@@ -144,34 +133,32 @@ echo "++"
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
-if $(file ${SOURCE} | grep -q ": bzip2"); then
- tar -xjvf ${SOURCE}
-elif $(file ${SOURCE} | grep -q ": gzip"); then
- tar -xzvf ${SOURCE}
-fi
+tar -xvf ${SOURCE}
cd ${PRGNAM}-${VERSION}
-# Apply patch for flac > 1.1.2 where the API changed:
-if [ $(flac -v | cut -f2 -d' ' | tr -d '.') -gt 112 ]; then
- patch -p1 < $SRCDIR/${PRGNAM}_flac.patch \
- 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
-fi
-chown -R root.root .
+## Apply patch for flac > 1.1.2 where the API changed:
+#if [ $(flac -v | cut -f2 -d' ' | tr -d '.') -gt 112 ]; then
+# patch -p1 < $SRCDIR/${PRGNAM}_flac.patch \
+# 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
+#fi
+chown -R root:root .
chmod -R u+w,go+r-w,a-s .
echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --disable-static \
- --program-prefix="" \
- --program-suffix="" \
- --build=$ARCH-slackware-linux \
- 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=$ARCH-slackware-linux \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
# Install all the needed stuff to the package dir
@@ -185,9 +172,8 @@ fi
# Add package documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
-mv $PKG/usr/share/doc/libsndfile1-dev/html \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/doc/libsndfile1-dev/html $PKG/usr/doc/$PRGNAM-$VERSION
rm -rf $PKG/usr/share/doc
find $PKG/usr/doc -type f -exec chmod 644 {} \;
@@ -196,27 +182,18 @@ find $PKG/usr/doc -type f -exec chmod 644 {} \;
find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
# 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
-)
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
-if [ -f $SRCDIR/doinst.sh ]; then
- cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
-fi
# Build the package:
cd $PKG
-makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz \
- 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
-(cd $OUTPUT && md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5)
+/sbin/makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+cd $OUTPUT
+md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5
+cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt
-# Clean up the extra stuff:
-if [ "$P1" = "--cleanup" ]; then
- rm -rf $TMP/tmp-$PRGNAM
- rm -rf $PKG
-fi