summaryrefslogtreecommitdiff
path: root/games/sl/sl.SlackBuild
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2012-01-05 07:01:13 -0600
committerErik Hanson <erik@slackbuilds.org>2012-01-05 07:01:13 -0600
commitc28b3e7500b1b3a8864b3e7d1351d515a07e2ebb (patch)
treed8c4f10da5eedf3d41e910c99d87ffcc30865c6f /games/sl/sl.SlackBuild
parentb86f64d3d32fdb684a911506a521ab5579111016 (diff)
downloadslackbuilds-c28b3e7500b1b3a8864b3e7d1351d515a07e2ebb.tar.gz
games/sl: New maintainer, script clean-up.
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'games/sl/sl.SlackBuild')
-rw-r--r--games/sl/sl.SlackBuild70
1 files changed, 44 insertions, 26 deletions
diff --git a/games/sl/sl.SlackBuild b/games/sl/sl.SlackBuild
index 8d81ad906c..b41c0d171b 100644
--- a/games/sl/sl.SlackBuild
+++ b/games/sl/sl.SlackBuild
@@ -1,23 +1,42 @@
#!/bin/sh
# Slackware build script for sl.
-# This script builds the version of sl maintained by the Debian project.
-# Written by V'yacheslav Stetskevych
+# Copyright 2010 V'yacheslav Stetskevych
+# Copyright 2012 Niels Horn, Rio de Janeiro, RJ, Brazil
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# revision date: 2012/01/05
PRGNAM=sl
-VERSION=${VERSION:-3.03}
-PATCHLEVEL=${PATCHLEVEL:-16}
-SRCVERSION=${SRCVERSION:-3.03.orig}
+VERSION=${VERSION:-3.03_16}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
+ORIGVERSION=$(echo $VERSION | cut -d_ -f1)
+PATCHLEVEL=$(echo $VERSION | cut -d_ -f2)
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -46,18 +65,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$SRCVERSION
-tar xvf $CWD/${PRGNAM}_$SRCVERSION.tar.gz
-cd $PRGNAM-$SRCVERSION
-# Apply the debian patchset, which creates the "debian" directory
-echo "Applying debian patchset..."
-zcat $CWD/sl_$VERSION-$PATCHLEVEL.diff.gz | patch -p1
-# Apply individual debian patches
-echo "Patching project files..."
-for file in debian/patches/*.dpatch; do
- patch -p1 < "$file"
-done
-
+rm -rf $PRGNAM-$ORIGVERSION.orig
+tar xvf $CWD/${PRGNAM}_$ORIGVERSION.orig.tar.gz
+cd $PRGNAM-$ORIGVERSION.orig
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -65,6 +75,15 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Apply the debian patchset, which creates the "debian" directory
+echo "Applying debian patchset..."
+zcat $CWD/sl_$ORIGVERSION-$PATCHLEVEL.diff.gz | patch -p1
+# Apply individual debian patches
+echo "Patching project files..."
+for file in debian/patches/*.dpatch; do
+ patch -p1 < "$file"
+done
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-lcurses" \
@@ -90,17 +109,16 @@ mkdir -p $PKG/usr/man # man pages
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-mkdir -p $PKG/usr/doc/$PRGNAM-${VERSION}_$PATCHLEVEL
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a debian/README* debian/changelog debian/copyright \
- $PKG/usr/doc/$PRGNAM-${VERSION}_$PATCHLEVEL
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-${VERSION}_$PATCHLEVEL/$PRGNAM.SlackBuild
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_$PATCHLEVEL-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}