summaryrefslogtreecommitdiffstats
path: root/network/wendzelnntpd/wendzelnntpd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/wendzelnntpd/wendzelnntpd.SlackBuild')
-rw-r--r--network/wendzelnntpd/wendzelnntpd.SlackBuild75
1 files changed, 48 insertions, 27 deletions
diff --git a/network/wendzelnntpd/wendzelnntpd.SlackBuild b/network/wendzelnntpd/wendzelnntpd.SlackBuild
index c0a17bea20..2dc13cab8e 100644
--- a/network/wendzelnntpd/wendzelnntpd.SlackBuild
+++ b/network/wendzelnntpd/wendzelnntpd.SlackBuild
@@ -25,25 +25,23 @@
# This script was written using the one from slackbuilds.org as a reference.
# Thanks to Patrick Volkerding and Adis Nezirovic for the original work.
+# 20230515 bkw: Modified by SlackBuilds.org, BUILD=4:
+# - define and use SLKCFLAGS
+# - get rid of duplicate *broken* PRINT_PACKAGE_NAME section
+# - use correct TMP
+# - include SlackBuild in doc dir
+# - fix doc dir permissions
+# - get rid of useless INSTALL from doc dir
+# - symlink index.html -> docs.html (identical files)
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wendzelnntpd
VERSION=${VERSION:-2.1.2}
TGZ_DIRNAME=cdpxe-WendzelNNTPd-5ea53d6 # for v2.1.2
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# 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}
-OUTPUT=${OUTPUT:-/tmp}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -53,18 +51,31 @@ if [ -z "$ARCH" ]; then
esac
fi
-set -e
-
-# 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.txz"
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
-TMP=${TMP:-/tmp}
+TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-${PRGNAM}
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -76,12 +87,16 @@ cd $TGZ_DIRNAME
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 \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# Configure:
-MYSQL=NO DESTDIR=/usr CONFDIR=/etc ./configure
+CFLAGS="$SLKCFLAGS" \
+MYSQL=NO \
+DESTDIR=/usr \
+CONFDIR=/etc \
+ ./configure
# Build and install:
make
@@ -115,11 +130,18 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
# add version number to doc directory and also put it in /usr/doc
# instead of /usr/share/doc
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
-cp -vr docs/docs $PKG/usr/doc/$PRGNAM-$VERSION/
-cp -v docs/docs.pdf $PKG/usr/doc/$PRGNAM-$VERSION/docs.pdf
-cp -v AUTHOR CHANGELOG HISTORY README.md INSTALL LICENSE database/usenet.db_struct database/mysql_db_struct.sql $PKG/usr/doc/$PRGNAM-$VERSION/
-chmod -R 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -vr docs/docs $PKGDOC
+cp -v docs/docs.pdf $PKGDOC/docs.pdf
+cp -v AUTHOR CHANGELOG HISTORY README.md LICENSE \
+ database/usenet.db_struct database/mysql_db_struct.sql \
+ $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+# 20230515 bkw: duplicate file, use symlink
+rm -f $PKGDOC/docs/index.html
+ln -s docs.html $PKGDOC/docs/index.html
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
@@ -131,4 +153,3 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
-