summaryrefslogtreecommitdiffstats
path: root/system/unionfs-fuse/unionfs-fuse.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/unionfs-fuse/unionfs-fuse.SlackBuild')
-rw-r--r--system/unionfs-fuse/unionfs-fuse.SlackBuild28
1 files changed, 20 insertions, 8 deletions
diff --git a/system/unionfs-fuse/unionfs-fuse.SlackBuild b/system/unionfs-fuse/unionfs-fuse.SlackBuild
index 8b5241e008..673fa6435a 100644
--- a/system/unionfs-fuse/unionfs-fuse.SlackBuild
+++ b/system/unionfs-fuse/unionfs-fuse.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for unionfs-fuse.
#
# Yth | Pont-en-Royans, France | yth@ythogtha.org
@@ -20,10 +20,13 @@
# 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)
+
PRGNAM=unionfs-fuse
-VERSION=${VERSION:-2.1}
+VERSION=${VERSION:-3.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -33,22 +36,29 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686 -D_FILE_OFFSET_BITS=64"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686 -D_FILE_OFFSET_BITS=64"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2"
+ SLKCFLAGS="-O2 -D_FILE_OFFSET_BITS=64"
LIBDIRSUFFIX=""
fi
@@ -72,7 +82,9 @@ find -L . \
sed -i -e 's|share/man|man|' Makefile
sed -i -e 's|usr/local|usr|' Makefile
-make PREFIX=/usr CFLAGS_EXTRA="$SLKCFLAGS"
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+make PREFIX=/usr
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -89,4 +101,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE