summaryrefslogtreecommitdiff
path: root/source/l/liblastfm/liblastfm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/liblastfm/liblastfm.SlackBuild')
-rwxr-xr-xsource/l/liblastfm/liblastfm.SlackBuild21
1 files changed, 11 insertions, 10 deletions
diff --git a/source/l/liblastfm/liblastfm.SlackBuild b/source/l/liblastfm/liblastfm.SlackBuild
index b5d1a401..d87cf0da 100755
--- a/source/l/liblastfm/liblastfm.SlackBuild
+++ b/source/l/liblastfm/liblastfm.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for liblastfm
# Copyright 2009 Vincent Batts
+# Copyright 2011 Patrick J. Volkerding, Sebeka, MN, USA
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@@ -21,9 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM="liblastfm"
-VERSION=0.3.0
-BUILD=${BUILD:-2}
+PKGNAM="liblastfm"
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j6}
# Automatically determine the architecture we're building on:
@@ -38,7 +39,7 @@ fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-$PRGNAM
+PKG=$TMP/package-$PKGNAM
if [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
@@ -49,8 +50,8 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -77,10 +78,10 @@ if [ -d $PKG/usr/man ]; then
gzip -9 $PKG/usr/man/man?/*
fi
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- COPYING README \
- $PKG/usr/doc/$PRGNAM-$VERSION
+ COPYING* README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -89,5 +90,5 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz