From d4a07bf33efbef9413ec8c63be4256fd294df1a9 Mon Sep 17 00:00:00 2001 From: Alan Hicks Date: Tue, 11 May 2010 22:25:39 +0200 Subject: network/postfix: Updated for version 2.5.5 --- network/postfix/postfix.SlackBuild | 56 ++++++++++++++------------------------ 1 file changed, 21 insertions(+), 35 deletions(-) (limited to 'network/postfix/postfix.SlackBuild') diff --git a/network/postfix/postfix.SlackBuild b/network/postfix/postfix.SlackBuild index bb481e1c10..0c5b1ac7c6 100644 --- a/network/postfix/postfix.SlackBuild +++ b/network/postfix/postfix.SlackBuild @@ -19,14 +19,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -set -e - PRGNAM="postfix" -VERSION="2.4.1" +VERSION="2.5.5" ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -CWD=`pwd` + +CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG="$TMP/pkg-$PRGNAM" OUTPUT=${OUTPUT:-/tmp} @@ -37,6 +36,8 @@ elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" fi +set -e + CFLAGS=${CFLAGS:-$SLKCFLAGS} config_directory=/etc/postfix @@ -57,8 +58,7 @@ if ! grep ^postfix: /etc/passwd 2>&1 > /dev/null; then cat << EOF - Must have a postfix user to run this script - Otherwise your permissions will be FUBAR + You must have a postfix user to run this script # groupadd -g 200 postfix # useradd -u 200 -d /dev/null -s /bin/false -g postfix postfix @@ -70,8 +70,7 @@ elif ! grep ^postdrop: /etc/group 2>&1 > /dev/null; then cat << EOF - Must have a postdrop group to run this script - Otherwise your permissions will be FUBAR + You must have a postdrop group to run this script # groupadd -g 201 postdrop @@ -80,11 +79,10 @@ EOF exit fi -# Alan Hicks, 2006.11.10 -# Phase this out. Replace with chroot postfix set-permissions -# in doinst.sh. +# Alan Hicks, 2008.03.26 +# This should be phased out by now, but I'm leaving it in here +# for historical purposes only. fix_perms() { - config_directory=$PKG/etc/postfix daemon_directory=$PKG/usr/libexec/postfix command_directory=$PKG/usr/sbin @@ -97,10 +95,8 @@ manpage_directory=$PKG/usr/man readme_directory=$PKG/usr/doc/$PRGNAM-$VERSION/README_FILES mail_owner=postfix setgid_group=postdrop - # Any line beginning with # is a comment. if echo $line | grep -v "^#" 2>&1 > /dev/null; then - FILE="$(echo $line | awk -F: '{ print $1 }')" FILE_PREFIX="$(echo $FILE | cut -f 1 -d '/')" FILE_SUFFIX="$(echo $FILE | cut -f 2- -d '/')" @@ -108,7 +104,6 @@ if echo $line | grep -v "^#" 2>&1 > /dev/null; then OWNER="$(echo $line | awk -F: '{ print $3 }')" GROUP="$(echo $line | awk -F: '{ print $4 }')" PERMS="$(echo $line | awk -F: '{ print $5 }')" - # skip this interation if the line we're fed is no good if [ "$TYPE" = "h" ]; then continue @@ -117,23 +112,19 @@ if echo $line | grep -v "^#" 2>&1 > /dev/null; then elif [ "$FILE_PREFIX" = "\$sample_directory" ]; then continue fi - # Tag the actual groups if [ "$GROUP" = "-" ]; then GROUP=root elif [ "$GROUP" = "\$setgid_group" ]; then GROUP="$setgid_group" fi - # Tag the postfix owner if [ "$OWNER" = "\$mail_owner" ]; then OWNER="$mail_owner" fi - if [ "$FILE_SUFFIX" = "$FILE_PREFIX" ]; then FILE_SUFFIX="" fi - if [ "$FILE_PREFIX" = "\$config_directory" ]; then chown $OWNER:$GROUP $config_directory/$FILE_SUFFIX chmod $PERMS $config_directory/$FILE_SUFFIX @@ -161,16 +152,13 @@ if echo $line | grep -v "^#" 2>&1 > /dev/null; then else echo "NOT FOUND!!! : $FILE_PREFIX" fi - fi - } - rm -fr $PKG $TMP/$PRGNAM-$VERSION mkdir -p $TMP $PKG $OUTPUT cd $TMP -tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION # TLS, and SASL support @@ -204,24 +192,23 @@ make non-interactive-package \ mkdir -p $PKG/install $PKG/etc/rc.d $PKG/usr/doc/$PRGNAM-$VERSION -# Documentation mangling. :^) -cp -a AAAREADME COMPATIBILITY COPYRIGHT HISTORY IPv6-ChangeLog LICENSE \ - PORTING RELEASE_NOTES TLS_ACKNOWLEDGEMENTS TLS_CHANGES TLS_LICENSE \ - TLS_TODO US_PATENT_6321267 \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -r AAAREADME COMPATIBILITY COPYRIGHT HISTORY IPv6-ChangeLog LICENSE \ + PORTING RELEASE_NOTES TLS_ACKNOWLEDGEMENTS TLS_CHANGES TLS_LICENSE \ + US_PATENT_6321267 implementation-notes examples \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/postfix.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/postfix.SlackBuild install -m 0755 $CWD/rc.postfix $PKG/etc/rc.d/rc.postfix.new cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -# Strip binaries and libraries - this can be done with 'make install-strip' -# in many source trees, and that's preferable if so, but if not, use this -find $PKG -type f | (while read LINE; do -if file $LINE | egrep "ELF.*(executable|shared object).*not stripped" &> /dev/null; then +find $PKG -type f | \ + ( while read LINE; do + if file $LINE | egrep "ELF.*(executable|shared object).*not stripped" \ + &> /dev/null; then strip $LINE -fi -done) + fi + done ) gzip -9 $PKG/usr/man/*/* @@ -241,6 +228,5 @@ do \ mv $i $i.new ; done -# Alright, let's make it. cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz -- cgit v1.2.3