summaryrefslogtreecommitdiffstats
path: root/system/bogofilter/bogofilter.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/bogofilter/bogofilter.SlackBuild')
-rw-r--r--system/bogofilter/bogofilter.SlackBuild47
1 files changed, 31 insertions, 16 deletions
diff --git a/system/bogofilter/bogofilter.SlackBuild b/system/bogofilter/bogofilter.SlackBuild
index 354cd167cd..a0e9ade1a4 100644
--- a/system/bogofilter/bogofilter.SlackBuild
+++ b/system/bogofilter/bogofilter.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for bogofilter
-# Copyright 2008-2013 Robby Workman Northport, Alabama, USA
+# Copyright 2008-2021 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,26 +22,37 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220404 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - remove useless INSTALL from doc dir.
+# - add $PRGNAM.SlackBuild to doc dir.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=bogofilter
-VERSION=${VERSION:-1.2.4}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.2.5}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-bogofilter
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -54,18 +65,20 @@ else
LIBDIRSUFFIX=""
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
+ -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ -exec chmod 644 {} \+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -73,8 +86,9 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
--docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-static=no \
--build=$ARCH-slackware-linux
make
@@ -87,12 +101,13 @@ 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/html
-cp AUTHORS COPYING GETTING.STARTED INSTALL NEWS* README* RELEASE.NOTES \
- TODO doc/README* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp AUTHORS COPYING GETTING.STARTED NEWS* README* RELEASE.NOTES \
+ TODO doc/README* $PKG/usr/doc/$PRGNAM-$VERSION
cp doc/*.html $PKG/usr/doc/$PRGNAM-$VERSION/html
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/bogofilter-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE