diff options
author | Eric Hameleers <alien@slackware.com> | 2010-01-30 23:55:50 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2010-01-30 23:55:50 +0000 |
commit | 526a8a4ddd1e239c6cbac7332eb988ead82affc2 (patch) | |
tree | 97ede345d323d5e7add54471fb173f0e23e58f97 /tagtool/build | |
parent | 57ad210a45af49acf696b1627fe81f319c038e3e (diff) | |
download | asb-526a8a4ddd1e239c6cbac7332eb988ead82affc2.tar.gz asb-526a8a4ddd1e239c6cbac7332eb988ead82affc2.tar.xz |
Update for Slackware64
Diffstat (limited to 'tagtool/build')
-rwxr-xr-x | tagtool/build/tagtool.SlackBuild | 90 |
1 files changed, 36 insertions, 54 deletions
diff --git a/tagtool/build/tagtool.SlackBuild b/tagtool/build/tagtool.SlackBuild index b061fe99..e7a876f0 100755 --- a/tagtool/build/tagtool.SlackBuild +++ b/tagtool/build/tagtool.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2008 Eric Hameleers <alien@slackware.com> +# Copyright (c) 2008,2010 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -27,13 +27,15 @@ # By: Eric Hameleers <alien@slackware.com> # For: tagtool # Descr: manage tags in MP3 and Ogg Vorbis files -# URL: http://pwp.netcabo.pt/paol/tagtool/ +# URL: http://sourceforge.net/projects/tagtool/ # Needs: id3lib # Changelog: # 0.12.3-1: 22/Jun/2008 by Eric Hameleers <alien@slackware.com> # * Initial build. +# 0.12.3-2: 31/Jan/2010 by Eric Hameleers <alien@slackware.com> +# * Re-build for Slackware64. # -# Run 'sh tagtool.SlackBuild --cleanup' to build a Slackware package. +# Run 'sh tagtool.SlackBuild' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . # Install using 'installpkg'. # @@ -43,8 +45,7 @@ PRGNAM=tagtool VERSION=${VERSION:-0.12.3} -ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-alien} DOCS="ABOUT-NLS AUTHORS BUGS COPYING ChangeLog NEWS README THANKS TODO" @@ -64,38 +65,35 @@ SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.bz2" ## --- 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 @@ -135,11 +133,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} cd ${PRGNAM}-${VERSION} chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -148,24 +142,19 @@ echo Building ... LDFLAGS="$SLKLDFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \ -./configure --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --localstatedir=/var \ - --sysconfdir=/etc \ - --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 \ + --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 # Update the desktop menus after install: mkdir -p $PKG/install @@ -184,10 +173,8 @@ chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; # 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 @@ -210,8 +197,3 @@ if [ -f $PKG/install/slack-required ]; then cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep fi -# Clean up the extra stuff: -if [ "$P1" = "--cleanup" ]; then - rm -rf $TMP/tmp-$PRGNAM - rm -rf $PKG -fi |