opt/mailman/Pkgfile
2010-10-07 11:00:12 +02:00

62 lines
1.8 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: python
name=mailman
version=2.1.14
release=1
source=(http://ftp.gnu.org/gnu/$name/$name-$version.tgz \
$name.rc)
build() {
cd $name-$version
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 02775 $PKG/etc/$name $PKG/var/{lib,lock,log,run,spool}/$name
find $PKG/usr/lib/$name -type d -exec chmod 02775 {} \;
#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
}