diff options
author | Daniel LEVAI <leva@ecentrum.hu> | 2012-11-23 16:13:00 +0100 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2012-11-24 15:36:46 -0500 |
commit | 99e03c77a4dcb27538db5388ace782afafcde88e (patch) | |
tree | 686d45fb68e8686c738fc44245895a2ac31efed5 /network/ssmtp | |
parent | 2ee0f6fef1d8db8dfaabd3a293a9825097986d28 (diff) | |
download | slackbuilds-99e03c77a4dcb27538db5388ace782afafcde88e.tar.gz |
network/ssmtp: Added (simple MTA that forwards to a smarthost).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/ssmtp')
-rw-r--r-- | network/ssmtp/README | 5 | ||||
-rw-r--r-- | network/ssmtp/doinst.sh | 6 | ||||
-rw-r--r-- | network/ssmtp/slack-desc | 18 | ||||
-rw-r--r-- | network/ssmtp/ssmtp.SlackBuild | 96 | ||||
-rw-r--r-- | network/ssmtp/ssmtp.info | 10 |
5 files changed, 135 insertions, 0 deletions
diff --git a/network/ssmtp/README b/network/ssmtp/README new file mode 100644 index 0000000000..716a836eda --- /dev/null +++ b/network/ssmtp/README @@ -0,0 +1,5 @@ +sSMTP, replaces sendmail on workstations that should send their mail via the +departmental mailhub from which they pick up their mail (via pop, imap, rsmtp, +pop_fetch, NFS... or the like). This program accepts mail and sends it to the +mailhub, optionally replacing the domain in the From: line with a different +one. diff --git a/network/ssmtp/doinst.sh b/network/ssmtp/doinst.sh new file mode 100644 index 0000000000..c6d8a19d37 --- /dev/null +++ b/network/ssmtp/doinst.sh @@ -0,0 +1,6 @@ +/usr/doc/ssmtp-2.64/generate_config /etc/ssmtp/ssmtp.conf +if [ ! -e /usr/sbin/sendmail ];then + ln -s ssmtp /usr/sbin/sendmail +else + echo '/usr/sbin/sendmail already exists!' +fi diff --git a/network/ssmtp/slack-desc b/network/ssmtp/slack-desc new file mode 100644 index 0000000000..0501f5cf99 --- /dev/null +++ b/network/ssmtp/slack-desc @@ -0,0 +1,18 @@ +# 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------------------------------------------------------| +ssmtp: ssmtp (extremely simple MTA to get mail off the system to a mail hub) +ssmtp: +ssmtp: This is sSMTP, a program that replaces sendmail on workstations that +ssmtp: should send their mail via the departmental mailhub from which they +ssmtp: pick up their mail (via pop, imap, rsmtp or the like). This program +ssmtp: accepts mail and sends it to the mailhub, optionally replacing the +ssmtp: domain in the From: line with a different one. +ssmtp: +ssmtp: Homepage: https://github.com/ajwans/sSMTP +ssmtp: diff --git a/network/ssmtp/ssmtp.SlackBuild b/network/ssmtp/ssmtp.SlackBuild new file mode 100644 index 0000000000..b60fe1ecc5 --- /dev/null +++ b/network/ssmtp/ssmtp.SlackBuild @@ -0,0 +1,96 @@ +#!/bin/sh + +# Copyright (c) 2011, 2012 Daniel LEVAI +# All rights reserved. +# +# * Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright notice +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED ''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 +# COPYRIGHT HOLDER 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=ssmtp +VERSION=2.64 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ];then + SLKCFLAGS="-O2 -march=i486 -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 +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/${PRGNAM}_${VERSION}.orig.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +./configure --prefix=/usr --sysconfdir='$(DESTDIR)/etc' --mandir=/usr/man +sed -i -e's,prefix=/usr,prefix=$(DESTDIR)/usr,' \ + -e'/\$(GEN_CONFIG) \$(INSTALLED_CONFIGURATION_FILE)/d' \ + Makefile +CFLAGS="$SLKCFLAGS" make +make install DESTDIR=$PKG + +strip --strip-unneeded $PKG/usr/sbin/ssmtp +gzip -9 $PKG/usr/man/man8/ssmtp.8 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp generate_config README INSTALL COPYING COPYRIGHT TLS \ + $PKG/usr/doc/$PRGNAM-$VERSION/ +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find $PKG/usr/doc -type f -exec chmod 0644 {} \; +chmod 755 $PKG/usr/doc/$PRGNAM-$VERSION/generate_config + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +sed -i -e"s,<VERSION>,${VERSION}," $CWD/doinst.sh +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/ssmtp/ssmtp.info b/network/ssmtp/ssmtp.info new file mode 100644 index 0000000000..a82fe4b977 --- /dev/null +++ b/network/ssmtp/ssmtp.info @@ -0,0 +1,10 @@ +PRGNAM="ssmtp" +VERSION="2.64" +HOMEPAGE="https://github.com/ajwans/sSMTP" +DOWNLOAD="ftp://ftp.de.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2" +MD5SUM="65b4e0df4934a6cd08c506cabcbe584f" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Daniel LEVAI" +EMAIL="leva@ecentrum.hu" |