summaryrefslogtreecommitdiff
path: root/system/conserver/conserver.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/conserver/conserver.SlackBuild')
-rw-r--r--system/conserver/conserver.SlackBuild83
1 files changed, 37 insertions, 46 deletions
diff --git a/system/conserver/conserver.SlackBuild b/system/conserver/conserver.SlackBuild
index c416c0a4f8..2fc521fab0 100644
--- a/system/conserver/conserver.SlackBuild
+++ b/system/conserver/conserver.SlackBuild
@@ -1,11 +1,14 @@
#!/bin/sh
# Slackware build script for Conserver
-
# Written by Menno Duursma <druiloor@zonnet.nl>
+# 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=conserver
-VERSION=8.1.16
+VERSION=8.1.17
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -17,8 +20,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e # Bail out if we have a problem
@@ -27,54 +35,49 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . -type d -exec chmod 0755 {} \;
chmod -R a-s,u+w,go+r-w .
-# Bake-in: libwrap (TCP Wrapper) and SSL support
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--with-libwrap \
--with-openssl \
- || exit 1
+ --build=$ARCH-slackware-linux
-make || exit 1
-make install DESTDIR=$PKG || exit 1
+make
+make install DESTDIR=$PKG
-# Strip binaries and libraries
( cd $PKG
- find . -type f | \
- xargs file | \
- grep "executable" | \
- grep ELF | \
- cut -f 1 -d : | \
- xargs strip --strip-unneeded \
- 2> /dev/null
-
- find . -type f | \
- xargs file | \
- grep "shared object" | \
- grep ELF | \
- cut -f 1 -d : | \
- xargs strip --strip-unneeded \
- 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
)
-if [ -d $PKG/usr/man ]; then
- gzip -9 $PKG/usr/man/man?/*
-fi
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+# Include dist config files as documentation
+install -D -m 0644 $PKG/usr/share/examples/conserver/conserver.cf $PKG/usr/doc/$PRGNAM-$VERSION/examples/conserver.cf
+install -D -m 0644 $PKG/usr/share/examples/conserver/conserver.passwd $PKG/usr/doc/$PRGNAM-$VERSION/examples/conserver.passwd
+install -D -m 0644 $PKG/usr/share/examples/conserver/conserver.rc $PKG/usr/doc/$PRGNAM-$VERSION/examples/conserver.rc
+
+# Toss redundant dir included with source
+rm -rf $PKG/usr/share
-# Documentation :
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/contrib
cp [A-Z][A-Z]* conserver.html $PKG/usr/doc/$PRGNAM-$VERSION
-# We'll consider this to be documentation here
cp -a autologin $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/conserver.cf
@@ -92,33 +95,21 @@ cd ../contrib
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
cd -
-# Toss redundant example config files included with source
-rm -rf $PKG/usr/share
-
## Sample configuration files
mkdir -p $PKG/etc
-cat $CWD/conserver.cf > $PKG/etc/conserver.cf.new
-cat $CWD/conserver.passwd >$PKG/etc/conserver.passwd.new
-cat $CWD/console.cf >$PKG/etc/console.cf.new
+cat $CWD/config/conserver.cf > $PKG/etc/conserver.cf.new
+cat $CWD/config/conserver.passwd > $PKG/etc/conserver.passwd.new
+cat $CWD/config/console.cf > $PKG/etc/console.cf.new
# Include sample rc file
-mkdir -p $PKG/etc/rc.d
-install -m 0755 $CWD/rc.conserver $PKG/etc/rc.d/rc.conserver.new
+install -D -m 0755 $CWD/config/rc.conserver $PKG/etc/rc.d/rc.conserver.new
-# Default directory console messages get logged to
+# Pre-create the default directory console messages get logged to
mkdir -p $PKG/var/consoles
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
-# Prepend any symlinks and such to the existing doinst.sh file
cd $PKG
-/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
-
-# Clean up the extra stuff
-if [ "$1" = "--cleanup" ]; then
- rm -rf $TMP/$PRGNAM-$VERSION
- rm -rf $PKG
-fi
-
+/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}