summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Yth - Arnaud2019-08-24 03:05:35 +0200
committer Willy Sudiarto Raharjo2019-08-24 03:23:03 +0200
commit2da32d2b4dacbd2e27dc52a057a1865a00e89a63 (patch)
tree3c68afed5c81c118e830d84806829028cd70291b
parent494916b5cda326c783dac99b8c0057cdc7682561 (diff)
downloadslackbuilds-2da32d2b4dacbd2e27dc52a057a1865a00e89a63.tar.gz
network/opensmtpd-extras: Added (backends for OpenSMTPD tables).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--network/opensmtpd-extras/README35
-rw-r--r--network/opensmtpd-extras/opensmtpd-extras.SlackBuild180
-rw-r--r--network/opensmtpd-extras/opensmtpd-extras.info10
-rw-r--r--network/opensmtpd-extras/slack-desc19
4 files changed, 244 insertions, 0 deletions
diff --git a/network/opensmtpd-extras/README b/network/opensmtpd-extras/README
new file mode 100644
index 0000000000..d1bc1595ea
--- /dev/null
+++ b/network/opensmtpd-extras/README
@@ -0,0 +1,35 @@
+OpenSMTPD extras - backends for OpenSMTPD tables, schedulers, queues and filters
+
+Allows using different backends for OpenSMTPD tables, schedulers, queues and filters,
+including SQLite, MySQL, PostgreSQL, LDAP...
+
+Each backend can be activated or deactivated by setting the relevant env var to yes or no.
+By default, Password, MySQL and SQLite table backends are built, since they are pretty straightforward to use,
+and everything is available on a stock slackware installation.
+
+* Tables:
+TLDAP=no
+TMYSQL=yes
+TPOSTGRES=no # requires potgresql
+TREDIS=no # requires hiredis and redis
+TSOCKETMAP=no
+TPASSWORD=yes
+TPYTHON=no
+TSQLITE=yes
+TSTUB=no
+* Queues:
+QNULL=no
+QPYTHON=no
+QRAM=no
+QSTUB=no
+* Schedulers:
+SRAM=no
+SSTUB=no
+SPYTHON=no
+* Filters:
+FMONKEY=no
+FSTUB=no
+FTRACE=no
+FVOID=no
+* Other:
+STATS=no # enable tool stats
diff --git a/network/opensmtpd-extras/opensmtpd-extras.SlackBuild b/network/opensmtpd-extras/opensmtpd-extras.SlackBuild
new file mode 100644
index 0000000000..5bd451b169
--- /dev/null
+++ b/network/opensmtpd-extras/opensmtpd-extras.SlackBuild
@@ -0,0 +1,180 @@
+#!/bin/sh
+# Slackware build script for opensmtpd-extras
+# Yth | Pont-en-Royans, France | yth@ythogtha.org
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=opensmtpd-extras
+VERSION=${VERSION:-6.4.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686 -fstack-protector"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686 -fstack-protector"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC -fstack-protector"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2 -fstack-protector"
+ LIBDIRSUFFIX=""
+fi
+
+# Thanks to ffmpeg4 slackbuild !
+enable() {
+ VAR="$1"; shift
+ DEF="$1"; shift
+ YES="$1"; shift
+ NO="$1"; shift
+ eval "$VAR=\${$VAR:-$DEF}"
+ eval "enable_$VAR=\"$NO\""
+ eval "[ \"\$$VAR\" = \"yes\" ] && enable_$VAR=\"$YES\""
+}
+# set "enable_$VAR" variables
+# ENV VAR DEFAULT IF YES IF NO
+# Filters
+enable "FMONKEY" "no" "--with-filter-monkey" ""
+enable "FSTUB" "no" "--with-filter-stub" ""
+enable "FTRACE" "no" "--with-filter-trace" ""
+enable "FVOID" "no" "--with-filter-void" ""
+# Queues
+enable "QNULL" "no" "--with-queue-null" ""
+enable "QPYTHON" "no" "--with-queue-python" ""
+enable "QRAM" "no" "--with-queue-ram" ""
+enable "QSTUB" "no" "--with-queue-stub" ""
+# Tables
+enable "TLDAP" "no" "--with-table-ldap" ""
+enable "TMYSQL" "yes" "--with-table-mysql" ""
+enable "TPOSTGRES" "no" "--with-table-postgres" ""
+enable "TREDIS" "no" "--with-table-redis" ""
+enable "TSOCKETMAP" "no" "--with-table-socketmap" ""
+enable "TPASSWORD" "yes" "--with-table-passwd" ""
+enable "TPYTHON" "no" "--with-table-python" ""
+enable "TSQLITE" "yes" "--with-table-sqlite" ""
+enable "TSTUB" "no" "--with-table-stub" ""
+# Stats
+enable "STATS" "no" "--with-tool-stats" ""
+# Schedulers
+enable "SRAM" "no" "--with-scheduler-ram" ""
+enable "SSTUB" "no" "--with-scheduler-stub" ""
+enable "SPYTHON" "no" "--with-scheduler-python" ""
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+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 \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sh bootstrap
+
+CFLAGS="$SLKCFLAGS -D_DEFAULT_SOURCE" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc/opensmtpd \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --with-mantype=doc \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --without-rpath \
+ --with-user-smtpd=smtpd \
+ --with-libssl=/usr/lib64/openssl-1.0/ \
+ $enable_FMONKEY \
+ $enable_FSTUB \
+ $enable_FTRACE \
+ $enable_FVOID \
+ $enable_QNULL \
+ $enable_QPYTHON \
+ $enable_QRAM \
+ $enable_QSTUB \
+ $enable_TLDAP \
+ $enable_TMYSQL \
+ $enable_TPOSTGRES \
+ $enable_TREDIS \
+ $enable_TSOCKETMAP \
+ $enable_TPASSWORD \
+ $enable_TPYTHON \
+ $enable_TSQLITE \
+ $enable_TSTUB \
+ $enable_STATS \
+ $enable_SRAM \
+ $enable_SSTUB \
+ $enable_SPYTHON \
+ --build=$ARCH-slackware-linux
+
+make
+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
+
+# MySQL and Postgres man pages aren't installed by the build, but they are still relevant
+# We add them here if required.
+[ "$TMYSQL" = "yes" ] && MAN=1
+[ "$TPOSTGRES" = "yes" ] && MAN=1
+if [ "$MAN" = "1" ]; then
+ mkdir -p $PKG/usr/man/man5
+ [ "$TMYSQL" = "yes" ] && install -D -m 0644 extras/tables/table-mysql/table-mysql.5 \
+ $PKG/usr/man/man5/table-mysql.5
+ [ "$TPOSTGRES" = "yes" ] && install -D -m 0644 extras/tables/table-postgres/table-postgres.5 \
+ $PKG/usr/man/man5/table-postgres.5
+fi
+# There might not be any man pages, depending on activated backends.
+# We wouldn't want to fail for such a petty reason, wouldn't we?
+if [ -d $PKG/usr/man ]; then
+ 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
+fi
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -p -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/opensmtpd-extras/opensmtpd-extras.info b/network/opensmtpd-extras/opensmtpd-extras.info
new file mode 100644
index 0000000000..67e0624fce
--- /dev/null
+++ b/network/opensmtpd-extras/opensmtpd-extras.info
@@ -0,0 +1,10 @@
+PRGNAM="opensmtpd-extras"
+VERSION="6.4.0"
+HOMEPAGE="https://www.opensmtpd.org/"
+DOWNLOAD="https://www.opensmtpd.org/archives/opensmtpd-extras-6.4.0.tar.gz"
+MD5SUM="9fe974c25af3234cee59c2a9864043da"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="opensmtpd"
+MAINTAINER="Yth - Arnaud"
+EMAIL="yth@ythogtha.org"
diff --git a/network/opensmtpd-extras/slack-desc b/network/opensmtpd-extras/slack-desc
new file mode 100644
index 0000000000..51eea6e3a3
--- /dev/null
+++ b/network/opensmtpd-extras/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+opensmtpd-extras: opensmtpd-extras (backends for OpenSMTPD tables)
+opensmtpd-extras:
+opensmtpd-extras: Allows using different backends for OpenSMTPD tables, schedulers,
+opensmtpd-extras: queues and filters
+opensmtpd-extras:
+opensmtpd-extras: This includes using tables provided by SQLite, MySQL, PostgreSQL...
+opensmtpd-extras:
+opensmtpd-extras:
+opensmtpd-extras:
+opensmtpd-extras:
+opensmtpd-extras: