summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/clamsmtp/clamsmtp.SlackBuild73
-rw-r--r--system/clamsmtp/clamsmtp.info2
-rw-r--r--system/clamsmtp/doinst.sh8
-rw-r--r--system/clamsmtp/rc.clamsmtpd11
-rw-r--r--system/clamsmtp/slack-desc12
5 files changed, 52 insertions, 54 deletions
diff --git a/system/clamsmtp/clamsmtp.SlackBuild b/system/clamsmtp/clamsmtp.SlackBuild
index 87a5589413..7ccdf0b9ee 100644
--- a/system/clamsmtp/clamsmtp.SlackBuild
+++ b/system/clamsmtp/clamsmtp.SlackBuild
@@ -1,20 +1,17 @@
#!/bin/sh
-#################################################################################
-
# Slackware Package Build Script for clamsmtp
-
# Home Page http://memberwebs.com/stef/software/clamsmtp/
-# Copyright (c) 2007, Nishant Limbachia (nishant@mnspace.net)
+# Copyright (c) 2008-2009, Nishant Limbachia (nishant@mnspace.net)
# All rights reserved.
-
+#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
-
+#
# 1. Redistributions of script must retain the above copyright notice,
# this list of conditions and the following disclaimer.
-
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -27,12 +24,10 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#################################################################################
-
PRGNAM=clamsmtp
VERSION=1.10
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
TMP=${TMP:-/tmp/SBo}
@@ -40,8 +35,6 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
CWD=$(pwd)
-set -e
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
@@ -50,47 +43,41 @@ elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
-### clean up from previous builds
+set -e
+
rm -fr $TMP/$PRGNAM-$VERSION $PKG
mkdir -p $TMP $PKG $OUTPUT
-
-### Extracting the source tarballs
cd $TMP
-tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $TMP/$PRGNAM-$VERSION
-
chown -R root.root .
-
find . \
-\( -perm 664 -o -perm 666 -o -perm 600 -o -perm 440 -o -perm 444 -o -perm 400 \) \
--exec chmod 644 {} \;
-
+ \( -perm 664 -o -perm 666 -o -perm 600 -o -perm 440 -o -perm 444 -o -perm 400 \) \
+ -exec chmod 644 {} \;
find . \
-\( -perm 777 -o -perm 755 -o -perm 711 -o -perm 700 -o -perm 555 -o -perm 511 -o -perm 500 \) \
--exec chmod 755 {} \;
+ \( -perm 777 -o -perm 755 -o -perm 711 -o -perm 700 -o -perm 555 -o -perm 511 -o -perm 500 \) \
+ -exec chmod 755 {} \;
-### configure the package
CFLAGS="$SLKCFLAGS" \
-./configure --prefix=/usr \
---exec-prefix=/usr \
---sysconfdir=/etc \
---localstatedir=/var \
---mandir=/usr/man \
---datarootdir=/usr \
---program-prefix="" \
---program-suffix="" \
---build=${ARCH}-slackware-linux
+./configure \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --datarootdir=/usr \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=${ARCH}-slackware-linux
make
make install DESTDIR=$PKG
-### copying essential doc files
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-
-cp -a AUTHORS ChangeLog COPYING INSTALL NEWS \
-README $PKG/usr/doc/$PRGNAM-$VERSION
+# Install init script and config file
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.clamsmtpd > $PKG/etc/rc.d/rc.clamsmtpd.new
+cat doc/clamsmtpd.conf > $PKG/etc/clamsmtpd.conf.new
-### stripping binaries
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -101,13 +88,13 @@ README $PKG/usr/doc/$PRGNAM-$VERSION
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
-# putting slack-desc and doinst.sh in place
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+
mkdir -p $PKG/install $PKG/etc/rc.d
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
-cat $CWD/rc.clamsmtpd > $PKG/etc/rc.d/rc.clamsmtpd.new
-cat $TMP/$PRGNAM-$VERSION/doc/clamsmtpd.conf > $PKG/etc/clamsmtpd.conf.new
-### building package
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/system/clamsmtp/clamsmtp.info b/system/clamsmtp/clamsmtp.info
index 0efc54cb8b..70bca3b672 100644
--- a/system/clamsmtp/clamsmtp.info
+++ b/system/clamsmtp/clamsmtp.info
@@ -5,4 +5,4 @@ DOWNLOAD="http://memberwebs.com/stef/software/clamsmtp/clamsmtp-1.10.tar.gz"
MD5SUM="b068ba6e444859782bbdd88f290c1abf"
MAINTAINER="Nishant Limbachia"
EMAIL="nishant@mnspace.net"
-APPROVED="David Somero" \ No newline at end of file
+APPROVED="rworkman"
diff --git a/system/clamsmtp/doinst.sh b/system/clamsmtp/doinst.sh
index f5d8519106..4f31733f91 100644
--- a/system/clamsmtp/doinst.sh
+++ b/system/clamsmtp/doinst.sh
@@ -12,11 +12,11 @@ config() {
}
# Keep same perms on rc.heimdal:
-if [ -e etc/rc.d/rc.clamsmtpd]; then
- cp -a etc/rc.d/rc.clamsmtpdetc/rc.d/rc.clamsmtpd.new.incoming
+if [ -e etc/rc.d/rc.clamsmtpd ]; then
+ cp -a etc/rc.d/rc.clamsmtpd etc/rc.d/rc.clamsmtpd.new.incoming
cat etc/rc.d/rc.clamsmtpd.new > etc/rc.d/rc.clamsmtpd.new.incoming
mv etc/rc.d/rc.clamsmtpd.new.incoming etc/rc.d/rc.clamsmtpd.new
fi
-config etc/rc.d/rc.clamsmtpd.new
-config etc/clamsmtpd.conf.new
+config etc/rc.d/rc.clamsmtpd.new
+config etc/clamsmtpd.conf.new \ No newline at end of file
diff --git a/system/clamsmtp/rc.clamsmtpd b/system/clamsmtp/rc.clamsmtpd
index c6a7e61dc8..d561a8d173 100644
--- a/system/clamsmtp/rc.clamsmtpd
+++ b/system/clamsmtp/rc.clamsmtpd
@@ -13,8 +13,12 @@ CONFIG="/etc/clamsmtpd.conf"
PIDFILE="/var/run/clamav/clamsmtpd.pid"
clamsmtpd_start() {
- echo "Starting clamsmtp daemon"
- /usr/sbin/clamsmtpd -f $CONFIG -p $PIDFILE
+ if [ -f $PIDFILE ]; then
+ echo "Clamsmtp daemon seems to be running with PID: $(cat $PIDFILE)"
+ else
+ echo "Starting clamsmtp daemon"
+ /usr/sbin/clamsmtpd -f $CONFIG -p $PIDFILE
+ fi
}
clamsmtpd_stop() {
@@ -43,9 +47,8 @@ case "$1" in
'restart')
clamsmtpd_restart
;;
-'*')
+*)
echo "USAGE: $0 start|stop|restart"
exit 1
;;
esac
-
diff --git a/system/clamsmtp/slack-desc b/system/clamsmtp/slack-desc
index 3be9fb16a9..1d4fe39741 100644
--- a/system/clamsmtp/slack-desc
+++ b/system/clamsmtp/slack-desc
@@ -1,3 +1,11 @@
+# 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 ':'.
+
+ |-----handy-ruler-----------------------------------------------------|
clamsmtp: ClamSMTP (ClamAV SMTP filter)
clamsmtp:
clamsmtp: ClamSMTP is an SMTP filter that allows you to check for viruses
@@ -5,7 +13,7 @@ clamsmtp: using the ClamAV anti-virus software. It accepts SMTP connections
clamsmtp: and forwards the SMTP commands and responses to another SMTP server.
clamsmtp: The 'DATA' email body is intercepted and scanned before forwarding.
clamsmtp:
-clamsmtp: Home Page: http://memberwebs.com/stef/software/clamsmtp
-clamsmtp: Packaged by Nishant Limbachia
+clamsmtp: Homepage: http://memberwebs.com/stef/software/clamsmtp
+clamsmtp:
clamsmtp:
clamsmtp: