opt/mailman/Pkgfile
2016-10-05 14:20:46 +02:00

65 lines
1.9 KiB
Plaintext

# Description: Mailman, the GNU Mailing List Manager
# URL: http://www.gnu.org/software/mailman/
# Maintainer: Jose V Beneyto, sepen at crux dot nu
# Packager: Jose V Beneyto, sepen at crux dot nu
# Depends on: dnspython
name=mailman
version=2.1.23
release=1
source=(http://ftp.gnu.org/gnu/$name/$name-$version.tgz \
$name.rc)
build() {
cd $name-$version
# update patch from 2.1.5 to 2.1.21
sed 's|# pidfile: .*|# pidfile: @VAR_PREFIX@/data/master-qrunner.pid|' -i contrib/redhat_fhs.patch
patch -p1 -i contrib/redhat_fhs.patch
rm -f configure
aclocal
autoconf
./configure --prefix=/usr/lib/$name \
--with-var-prefix=/var/lib/$name \
--with-config-dir=/etc/$name \
--with-lock-dir=/var/lock/$name \
--with-log-dir=/var/log/$name \
--with-pid-dir=/var/run/$name \
--with-queue-dir=/var/spool/$name \
--with-mailhost=localhost.localdomain \
--with-urlhost=localhost.localdomain \
--with-mail-gid=$name \
--with-cgi-id=www \
--with-cgi-gid=www \
--without-permcheck
make
make DESTDIR=$PKG install
install -D -m 0755 $SRC/$name.rc $PKG/etc/rc.d/$name
# create empty crontab
install -d $PKG/etc/cron.d
cat > $PKG/etc/cron.d/$name << __EOF__
# DO NOT EDIT THIS FILE!
#
# Contents of this file managed by /etc/rc.d/mailman
# Master copy is /usr/lib/mailman/cron/crontab.in
# Consult that file for documentation
#
# End of file
__EOF__
# fix permissions
chown -R root:$name $PKG/etc/$name $PKG/usr/lib/$name $PKG/var/{lib,lock,log,run,spool}/$name
chmod 0775 $PKG/var/log/$name
chmod 1777 $PKG/var/lock
find $PKG/usr/lib/$name -type d -exec chmod 0775 {} \;
chmod o+x $PKG/var/lib/$name/archives/private
# fix configs
ln -sf /usr/lib/$name/Mailman/mm_cfg.py $PKG/etc/$name
ln -sf /etc/$name/sitelist.cfg $PKG/var/lib/$name/data
}