summaryrefslogtreecommitdiffstats
path: root/source/a/reiserfsprogs/reiserfsprogs.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/reiserfsprogs/reiserfsprogs.SlackBuild')
-rwxr-xr-xsource/a/reiserfsprogs/reiserfsprogs.SlackBuild37
1 files changed, 28 insertions, 9 deletions
diff --git a/source/a/reiserfsprogs/reiserfsprogs.SlackBuild b/source/a/reiserfsprogs/reiserfsprogs.SlackBuild
index 71c2b92db..1b88550a2 100755
--- a/source/a/reiserfsprogs/reiserfsprogs.SlackBuild
+++ b/source/a/reiserfsprogs/reiserfsprogs.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,32 +20,44 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=reiserfsprogs
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-reiserfs
+PKG=$TMP/package-reiserfsprogs
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
rm -rf $PKG
@@ -62,12 +74,15 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Yes, --disable-shared is intentional
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sbindir=/sbin \
--mandir=/usr/man \
- --build=$ARCH-slackware-linux
+ --disable-shared \
+ --build=$ARCH-slackware-linux || exit 1
if [ "$ARCH" = "x86_64" ]; then
# To prevent compilation errors due to broken header:
@@ -77,6 +92,10 @@ fi
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# We're building without the shared libreiserfs so that we don't have to
+# ship the libraries or headers:
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX} $PKG/usr/include
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null