aboutsummaryrefslogtreecommitdiff
path: root/network/yadifa/yadifa.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/yadifa/yadifa.SlackBuild')
-rw-r--r--network/yadifa/yadifa.SlackBuild46
1 files changed, 26 insertions, 20 deletions
diff --git a/network/yadifa/yadifa.SlackBuild b/network/yadifa/yadifa.SlackBuild
index 95a0b1c031e6..0b27ad77459c 100644
--- a/network/yadifa/yadifa.SlackBuild
+++ b/network/yadifa/yadifa.SlackBuild
@@ -23,21 +23,21 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=yadifa
-VERSION=${VERSION:-2.2.4}
-VSUFFIX=${VSUFFIX:-6924}
+VERSION=${VERSION:-2.3.8}
+VSUFFIX=${VSUFFIX:-7713}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if ! grep -q "^yadifa:" /etc/group; then
- echo "Error: $PRGNAM group (yadifa) doesn't exist."
- echo "Try creating one with:"
+ echo "$0: Error: $PRGNAM group (yadifa) doesn't exist."
+ echo "$0: Try creating one with:"
echo " # groupadd -g 332 yadifa"
exit 1
fi
if ! grep -q "^yadifa:" /etc/passwd; then
- echo "Error: $PRGNAM user (yadifa) doesn't exist."
- echo "Try creating one with:"
+ echo "$0: Error: $PRGNAM user (yadifa) doesn't exist."
+ echo "$0: Try creating one with:"
echo " # useradd -u 332 -d /var/lib/yadifa -g yadifa -s /bin/false yadifa"
exit 1
fi
@@ -69,6 +69,16 @@ else
LIBDIRSUFFIX=""
fi
+USESTATIC=${USESTATIC:-no}
+if [ "$USESTATIC" = "yes" ]; then
+ SHARED=no
+ STATIC=yes
+else
+ SHARED=yes
+ STATIC=no
+fi
+
+
set -e
rm -rf $PKG
@@ -87,15 +97,14 @@ find -L . \
./configure \
--prefix=/usr \
--sysconfdir=/etc/yadifa \
- --libdir=/usr/lib${LIBDIRSUFFIX}/yadifa \
+ --libdir=/usr/lib/yadifa \
--localstatedir=/var/lib/yadifa \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux \
+ --docdir=/usr/doc/$PRGNAM-$VERSION-${VSUFFIX} \
--with-logdir=/var/log/yadifa \
--enable-silent-rules \
- --enable-shared=yes \
- --enable-static=no \
+ --enable-shared=$SHARED \
+ --enable-static=$STATIC \
--enable-messages \
--enable-ctrl \
--build=$ARCH-slackware-linux
@@ -106,18 +115,15 @@ make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-install --mode=644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION-${VSUFFIX}
+install --mode=644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION-${VSUFFIX}/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+install --mode=644 $CWD/slack-desc $PKG/install/slack-desc
+install --mode=755 $CWD/doinst.sh $PKG/install/doinst.sh
mkdir -p $PKG/etc/rc.d
-install --mode=644 $CWD/rc.yadifa $PKG/etc/rc.d/rc.yadifa.new
+install --mode=755 $CWD/rc.yadifa $PKG/etc/rc.d/rc.yadifa.new
mkdir -p $PKG/var/run/yadifa
chown yadifa:yadifa $PKG/var/run/yadifa
@@ -140,4 +146,4 @@ install --mode=644 $CWD/yadifa.logrotate $PKG/etc/logrotate.d/yadifa.new
rm -rf $PKG/etc/yadifa/yadifad.conf
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}_${VSUFFIX}-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}