aboutsummaryrefslogtreecommitdiff
path: root/network/unfs3/unfs3.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/unfs3/unfs3.SlackBuild')
-rw-r--r--network/unfs3/unfs3.SlackBuild31
1 files changed, 23 insertions, 8 deletions
diff --git a/network/unfs3/unfs3.SlackBuild b/network/unfs3/unfs3.SlackBuild
index 1589c8085c39a..8e19ad07b98fe 100644
--- a/network/unfs3/unfs3.SlackBuild
+++ b/network/unfs3/unfs3.SlackBuild
@@ -5,13 +5,16 @@
# Modified by the SlackBuilds.org project
-set -e
+# This program is free software. It comes without any warranty.
+# Granted WTFPL, Version 2, as published by Sam Hocevar. See
+# http://sam.zoy.org/wtfpl/COPYING for more details.
PRGNAM=unfs3
-VERSION=0.9.17
+VERSION=0.9.21
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -21,13 +24,17 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
+set -e # Exit on most errors
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -38,12 +45,22 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --enable-cluster
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --enable-cluster \
+ --disable-static \
+ --build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
-( cd $PKG/usr/man
+# Add the init script
+install -D -m 0755 unfsd.init $PKG/etc/rc.d/rc.unfsd.new
+
+# Precreate lock directory, as the init script expects that to exist
+mkdir -p $PKG/var/lock/subsys
+
+( cd $PKG/usr/man || exit 1
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
@@ -51,9 +68,7 @@ make install-strip DESTDIR=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a [A-Z][A-Z]* doc/* contrib $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/etc/rc.d
-cat $CWD/rc.unfsd >$PKG/etc/rc.d/rc.unfsd.new
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc