summaryrefslogtreecommitdiffstats
path: root/graphics/farbfeld/farbfeld.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/farbfeld/farbfeld.SlackBuild')
-rw-r--r--graphics/farbfeld/farbfeld.SlackBuild75
1 files changed, 24 insertions, 51 deletions
diff --git a/graphics/farbfeld/farbfeld.SlackBuild b/graphics/farbfeld/farbfeld.SlackBuild
index 74cac1f10d..1792d213c4 100644
--- a/graphics/farbfeld/farbfeld.SlackBuild
+++ b/graphics/farbfeld/farbfeld.SlackBuild
@@ -2,31 +2,23 @@
# Slackware build script for ferbfeld
-# Copyright 2022 Brandon Pribula, BC Canada
-# 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.
+# Original author: 2022 Brandon Pribula, BC Canada.
+# Now maintained by B. Watson (urchlay@slackware.uk).
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20230914 bkw: BUILD=2
+# - take over maintenance.
+# - relicense as WTFPL.
+# - tweak README and slack-desc.
+# - remove some template cruft.
+# - use our flags (reinstate -O2).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=farbfeld
VERSION=${VERSION:-4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -47,20 +39,14 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Keep the optimization flag as upstream intended,
-# so remove -O2 from SLKCFLAGS.
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-fPIC"
- LIBDIRSUFFIX="64"
+ SLKCFLAGS="-O2 -fPIC"
else
- SLKCFLAGS=""
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2"
fi
set -e
@@ -72,31 +58,18 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+chmod 644 *
-# Modify config.mk so CFLAGS can be prepended.
-sed -i '/CFLAGS/s/=/+=/' config.mk
+sed -i "/CFLAGS/s,-Os,$SLKCFLAGS," config.mk
-CFLAGS="$SLKCFLAGS" \
make
-make install \
- PREFIX=/usr \
- MANPREFIX=/usr/man \
- DESTDIR=$PKG
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-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
+make install PREFIX=/usr MANPREFIX=/usr/man DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a FORMAT LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a FORMAT LICENSE README $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc