summaryrefslogtreecommitdiffstats
path: root/aften
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2021-12-29 11:34:11 +0000
committer Eric Hameleers <alien@slackware.com>2021-12-29 11:34:11 +0000
commit1dfcff116e1407afc19bf3afa872bcfe10609541 (patch)
tree270d0cc3464cce4f4e64ca9057d376d102f64265 /aften
parent659caf084c20715eec0e08450705d8ae2e2fa957 (diff)
downloadasb-1dfcff116e1407afc19bf3afa872bcfe10609541.tar.gz
asb-1dfcff116e1407afc19bf3afa872bcfe10609541.tar.xz
aften: rebuilt for Slackware 15.0
Diffstat (limited to 'aften')
-rwxr-xr-xaften/build/aften.SlackBuild52
1 files changed, 34 insertions, 18 deletions
diff --git a/aften/build/aften.SlackBuild b/aften/build/aften.SlackBuild
index 99ef2eb9..70de54b9 100755
--- a/aften/build/aften.SlackBuild
+++ b/aften/build/aften.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2009,2010 Eric Hameleers, Eindhoven, NL
+# Copyright (c) 2009,2010, 2021 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,9 +36,11 @@
# * Re-build.
# 0.0.8-3: 02/jun/2010 by Eric Hameleers <alien@slackware.com>
# * Rebuilt for Slackware 13.1.
+# 0.0.8-4: 29/dec/2021 by Eric Hameleers <alien@slackware.com>
+# * Rebuilt for Slackware 15.0.
#
# Run 'sh aften.SlackBuild' to build a Slackware package.
-# The package (.tgz) and .txt file as well as build logs are created in /tmp .
+# The package (.txz) and .txt file as well as build logs are created in /tmp .
# Install it using 'installpkg'.
#
# -----------------------------------------------------------------------------
@@ -47,8 +49,8 @@
PRGNAM=aften
VERSION=${VERSION:-0.0.8}
-BUILD=${BUILD:-3}
-NUMJOBS=${NUMJOBS:" -j4 "}
+BUILD=${BUILD:-4}
+NUMJOBS=${NUMJOBS:-" -j$(nproc) "}
TAG=${TAG:-alien}
DOCS="COPYING Changelog README"
@@ -70,21 +72,34 @@ SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tar.bz2"
# 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 ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" ; LIBDIRSUFFIX=""
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- x86_64) SLKCFLAGS="-O2 -fPIC" ; LIBDIRSUFFIX="64"
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
- *) SLKCFLAGS="-O2" ; LIBDIRSUFFIX=""
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
esac
# Exit the script on errors:
@@ -109,12 +124,13 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
# Source file availability:
if ! [ -f ${SOURCE} ]; then
+ echo "Source '$(basename ${SOURCE})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
+ if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi
if ! [ "x${SRCURL}" == "x" ]; then
- # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
- echo "Source '$(basename ${SOURCE})' not available yet..."
echo "Will download file to $(dirname $SOURCE)"
- wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
+ wget --no-check-certificate -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
@@ -143,7 +159,7 @@ echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
-chmod -R u+w,go+r-w,a+X-s .
+chmod -R u+w,go+r-w,a+rX-st .
echo Building ...
# Since the LIBDIR can not be specified on the cmake commandline:
@@ -181,9 +197,9 @@ cat $SRCDIR/slack-desc > $PKG/install/slack-desc
# Build the package:
cd $PKG
-makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
-md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
+md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt