aboutsummaryrefslogtreecommitdiff
path: root/network/mailman
diff options
context:
space:
mode:
Diffstat (limited to 'network/mailman')
-rw-r--r--network/mailman/README30
-rw-r--r--network/mailman/doinst.sh26
-rw-r--r--network/mailman/mailman.SlackBuild112
-rw-r--r--network/mailman/mailman.info10
-rw-r--r--network/mailman/profile.d/mailman.csh2
-rw-r--r--network/mailman/profile.d/mailman.sh2
-rw-r--r--network/mailman/rc.mailman8
-rw-r--r--network/mailman/slack-desc19
8 files changed, 209 insertions, 0 deletions
diff --git a/network/mailman/README b/network/mailman/README
new file mode 100644
index 0000000000000..447df923605ea
--- /dev/null
+++ b/network/mailman/README
@@ -0,0 +1,30 @@
+Mailman (the GNU Mailing List Manager)
+
+Unlike other SlackBuilds which have a /usr installation prefix, this
+script will install Mailman to /opt/mailman instatead. This is done
+to simplify the build process since Mailman attemps to install itself
+into many non-standard directories in the prefix directory. Therefore, it
+is installed as a self-contained and easily-removable location in /opt.
+
+It may be that you wish to keep Mailman's lists database in /var/mailman
+instead of /opt/mailman/var/mailman, in which case you should adjust the
+VAR_PREFIX variable at runtime. For example:
+
+ VAR_PREFIX="/var/mailman" ./mailman.SlackBuild
+
+This SlackBuild assumes the webserver group name to be "apache",
+which should work just fine for you if you have the Slackware
+httpd package installed.
+If you wish to use a diffent webserver then set the group name accordingly
+by passing is to the script via the CGI_GID varible at runtime. Eg:
+
+ CGI_GID="lighttpd" ./mailman.SlackBuild
+
+This script also expects there to be a user and group called "mailman",
+with uid and gid of 204 (see http://slackbuilds.org/uid_gid.txt):
+
+ # groupadd -g 204 mailman
+ # useradd -u 204 -d /dev/null -s /bin/false -g mailman mailman
+
+If you execute the script without creating this user and group, it won't
+build the Mailman package.
diff --git a/network/mailman/doinst.sh b/network/mailman/doinst.sh
new file mode 100644
index 0000000000000..0705113e98c74
--- /dev/null
+++ b/network/mailman/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.mailman.new
+
diff --git a/network/mailman/mailman.SlackBuild b/network/mailman/mailman.SlackBuild
new file mode 100644
index 0000000000000..39f88e1e9d7f1
--- /dev/null
+++ b/network/mailman/mailman.SlackBuild
@@ -0,0 +1,112 @@
+#!/bin/sh
+
+# Slackware build script for mailman
+# Written by Eugene Suter (easuter@gmail.com)
+
+PRGNAM=mailman
+VERSION=${VERSION:-2.1.12}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+MAIL_UID=${MAIL_UID:-204}
+MAIL_GID=${MAIL_GID:-204}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# Bail if user or group isn't valid on your system
+if ! grep -q ^mailman: /etc/passwd 2>/dev/null; then
+ printf "\n\tYou must have a \"mailman\" user and group to run this script:\n"
+ printf "\t# groupadd -g $MAIL_GID mailman\n"
+ printf "\t# useradd -u $MAIL_UID -d /dev/null -s /bin/false -g mailman mailman\n\n"
+ exit 1
+fi
+
+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"
+fi
+
+# By default mailman will be installed to /opt, but
+# the lists archives and databases directory can be
+# changed to /var/mailman:
+PREFIX=/opt/mailman
+VAR_PREFIX=${VAR_PREFIX:-/opt/mailman/var/mailman}
+
+# Make directories with permissions that the configure script demands,
+# but make them in $PKG instead of /
+mkdir -p $PKG
+install -d $PKG/$PREFIX -g mailman -o root -m 2775
+install -d $PKG/$VAR_PREFIX -g mailman -o root -m 2775
+
+# Slackware's group name for apache. For some reason other distros
+# will use www or www-data (and mailman assumes this by default)
+CGI_GID=${CGI_GID:-apache}
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tgz
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/opt/mailman \
+ --exec-prefix=/opt/mailman \
+ --with-var-prefix=$VAR_PREFIX \
+ --localstatedir=/var \
+ --build=$ARCH-slackware-linux \
+ --with-mail-gid=$MAIL_GID \
+ --with-cgi-gid=$CGI_GID \
+ --without-permcheck # Don't bomb out if dirs are missing in /
+
+make
+make install DESTDIR=$PKG
+
+( 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 || true
+)
+
+mkdir -p $PKG/etc/profile.d
+cat $CWD/profile.d/mailman.sh > $PKG/etc/profile.d/mailman.sh
+cat $CWD/profile.d/mailman.csh > $PKG/etc/profile.d/mailman.csh
+chmod 0755 $PKG/etc/profile.d/*
+
+mkdir $PKG/etc/rc.d
+cat $CWD/rc.mailman > $PKG/etc/rc.d/rc.mailman.new
+chmod 0755 $PKG/etc/rc.d/rc.mailman.new
+
+mkdir -p $PKG/$PREFIX/doc/$PRGNAM-$VERSION
+cp -a ACKNOWLEDGMENTS BUGS FAQ NEWS README* STYLEGUIDE.txt TODO \
+ $PKG/$PREFIX/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/$PREFIX/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+( cd $PKG/usr/doc ; ln -s $PREFIX/doc/$PRGNAM-$VERSION )
+
+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}
diff --git a/network/mailman/mailman.info b/network/mailman/mailman.info
new file mode 100644
index 0000000000000..fc600df380a9f
--- /dev/null
+++ b/network/mailman/mailman.info
@@ -0,0 +1,10 @@
+PRGNAM="mailman"
+VERSION="2.1.12"
+HOMEPAGE="http://www.gnu.org/software/mailman/index.html"
+DOWNLOAD="http://ftp.gnu.org/gnu/mailman/mailman-2.1.12.tgz"
+MD5SUM="d565a6d2d0ec6d2dd6936a81e1c1ca86"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Eugene Suter"
+EMAIL="easuter@gmail.com"
+APPROVED="rworkman"
diff --git a/network/mailman/profile.d/mailman.csh b/network/mailman/profile.d/mailman.csh
new file mode 100644
index 0000000000000..5fcd06945ee85
--- /dev/null
+++ b/network/mailman/profile.d/mailman.csh
@@ -0,0 +1,2 @@
+#!/bin/csh
+setenv PATH ${PATH}:/opt/mailman/bin
diff --git a/network/mailman/profile.d/mailman.sh b/network/mailman/profile.d/mailman.sh
new file mode 100644
index 0000000000000..bb3a4f80863bd
--- /dev/null
+++ b/network/mailman/profile.d/mailman.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+export PATH="$PATH:/opt/mailman/bin"
diff --git a/network/mailman/rc.mailman b/network/mailman/rc.mailman
new file mode 100644
index 0000000000000..bf5e8eeda00b2
--- /dev/null
+++ b/network/mailman/rc.mailman
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Simple start-only rc file, since mainstream doesn't provide one
+
+if [ -x /opt/mailman/bin/mailmanctl ];then
+ /opt/mailman/bin/mailmanctl -s start
+fi
+
diff --git a/network/mailman/slack-desc b/network/mailman/slack-desc
new file mode 100644
index 0000000000000..d7bf8071a5384
--- /dev/null
+++ b/network/mailman/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mailman: Mailman (the GNU Mailing List Manager)
+mailman:
+mailman: Mailman is free software for managing electronic mail discussion and
+mailman: e-newsletter lists. Mailman is integrated with the web, making it
+mailman: easy for users to manage their accounts and for list owners to
+mailman: administer their lists. Mailman supports built-in archiving,
+mailman: automatic bounce processing, content filtering, digest delivery, spam
+mailman: filters, and more.
+mailman:
+mailman: Homepage: http://www.gnu.org/software/mailman/index.html
+mailman: