diff options
Diffstat (limited to 'network/rspamd/rspamd.SlackBuild')
-rw-r--r-- | network/rspamd/rspamd.SlackBuild | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/network/rspamd/rspamd.SlackBuild b/network/rspamd/rspamd.SlackBuild index 3e9864993b..72692e89f2 100644 --- a/network/rspamd/rspamd.SlackBuild +++ b/network/rspamd/rspamd.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=rspamd -VERSION=${VERSION:-1.8.1} +VERSION=${VERSION:-1.8.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -35,6 +35,17 @@ if [ -z "$ARCH" ]; then esac fi +UIDGID=359 +if ! getent group $PRGNAM; then + echo " You must have the \"$PRGNAM\" group to run this script." + echo " # groupadd -g $UIDGID $PRGNAM" + exit 1 +elif ! getent passwd $PRGNAM; then + echo " You must have the \"$PRGNAM\" user to run this script." + echo " # useradd -u $UIDGID -s /bin/false -d /dev/null -g $PRGNAM $PRGNAM" + exit 1 +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -77,7 +88,6 @@ cd build -DCONFDIR=/etc/$PRGNAM \ -DLIBDIR=/usr/lib${LIBDIRSUFFIX}/$PRGNAM \ -DMANDIR=/usr/man \ - -DEXAMPLESDIR=/usr/doc/$PRGNAM-$VERSION/examples \ -DENABLE_STATIC=OFF \ -DENABLE_HYPERSCAN=ON \ -DENABLE_JEMALLOC=ON \ @@ -93,6 +103,23 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr 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 +# remove empty directory tree +rmdir -p --ignore-fail-on-non-empty $PKG/usr/share/examples/rspamd + +mkdir -p $PKG/var/log/rspamd +chown rspamd:rspamd $PKG/var/log/rspamd +chmod 0755 $PKG/var/log/rspamd + +mkdir -p $PKG/var/run/rspamd +chown rspamd:rspamd $PKG/var/run/rspamd +chmod 0750 $PKG/var/run/rspamd + +mkdir -p $PKG/var/lib/rspamd +chown rspamd:rspamd $PKG/var/lib/rspamd +chmod 0750 $PKG/var/lib/rspamd + +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.rspamd.new > $PKG/etc/rc.d/rc.rspamd.new mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS.md ChangeLog CONTRIBUTIONS.md LICENSE.md README.md \ @@ -101,6 +128,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |