summaryrefslogtreecommitdiffstats
path: root/id3lib
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-01-30 23:59:36 +0000
committer Eric Hameleers <alien@slackware.com>2010-01-30 23:59:36 +0000
commit22e7529588764a7462c2b0421bc7b5c99c14bdcc (patch)
tree8c2a3248578d0d0ee241b76e09d050e10ef9a7dc /id3lib
parent7576c0aa96719463c86bcc92c296e76610c1677f (diff)
downloadasb-22e7529588764a7462c2b0421bc7b5c99c14bdcc.tar.gz
asb-22e7529588764a7462c2b0421bc7b5c99c14bdcc.tar.xz
Updated for Slackware64
Diffstat (limited to 'id3lib')
-rwxr-xr-xid3lib/build/id3lib.SlackBuild92
1 files changed, 37 insertions, 55 deletions
diff --git a/id3lib/build/id3lib.SlackBuild b/id3lib/build/id3lib.SlackBuild
index 17873649..4fe09ce0 100755
--- a/id3lib/build/id3lib.SlackBuild
+++ b/id3lib/build/id3lib.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2007-2008 Eric Hameleers <alien@slackware.com>
+# Copyright (c) 2007,2008,2010 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,8 +36,10 @@
# * Revamped SlackBuild
# 3.8.3-3: 21/jun/2008 by Eric Hameleers <alien@slackware.com>
# * Revamped SlackBuild again
+# 3.8.3-4: 31/jan/2010 by Eric Hameleers <alien@slackware.com>
+# * Rebuilt for Slackware64.
#
-# Run 'sh id3lib.SlackBuild --cleanup' to build a Slackware package.
+# Run 'sh id3lib.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
@@ -47,8 +49,7 @@
PRGNAM=id3lib
VERSION=${VERSION:-3.8.3}
-ARCH=${ARCH:-i486}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-alien}
DOCS="AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO doc/*"
@@ -68,38 +69,35 @@ SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz"
## --- with a little luck, you won't have to edit below this point --- ##
##
-# Exit the script on errors:
-set -e
-trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
-# Catch unitialized variables:
-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
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
fi
case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- s390) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- powerpc) SLKCFLAGS="-O2"
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64) SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
- athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
+ *) SLKCFLAGS="-O2"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
esac
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
# Create working directories:
mkdir -p $OUTPUT # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
@@ -140,11 +138,7 @@ 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}
chown -R root:root *
chmod -R u+w,go+r-w,a-s *
@@ -158,26 +152,21 @@ echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --enable-static=no \
- --enable-debug=no \
- --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 \
+ --enable-static=no \
+ --enable-debug=no \
+ --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
-# Use installwatch if available, to produce a logfile of the installation
-# process that is more easily readable:
-if $(which installwatch > /dev/null 2>&1); then
- installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install
-else
- make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
-fi
+make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Make the docs
make docs
@@ -207,10 +196,8 @@ if [ -d $PKG/usr/man ]; then
fi
# Strip binaries:
-cd $PKG
-find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-cd -
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Add a package description:
mkdir -p $PKG/install
@@ -224,8 +211,3 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
-# Clean up the extra stuff:
-if [ "$P1" = "--cleanup" ]; then
- rm -rf $TMP/tmp-$PRGNAM
- rm -rf $PKG
-fi