blob: 73de22ef139abb10ad391d4d74539ddfc6437873 (
plain)
1 # Description: Mailman, the GNU Mailing List Manager
2 # URL: http://www.gnu.org/software/mailman/
3 # Maintainer: Jose V Beneyto, sepen at crux dot nu
4 # Packager: Jose V Beneyto, sepen at crux dot nu
5 # Depends on: dnspython
6
7 name=mailman
8 version=2.1.23
9 release=1
10 source=(http://ftp.gnu.org/gnu/$name/$name-$version.tgz \
11 $name.rc)
12
13 build() {
14 cd $name-$version
15
16 # update patch from 2.1.5 to 2.1.21
17 sed 's|# pidfile: .*|# pidfile: @VAR_PREFIX@/data/master-qrunner.pid|' -i contrib/redhat_fhs.patch
18 patch -p1 -i contrib/redhat_fhs.patch
19
20 rm -f configure
21 aclocal
22 autoconf
23
24 ./configure --prefix=/usr/lib/$name \
25 --with-var-prefix=/var/lib/$name \
26 --with-config-dir=/etc/$name \
27 --with-lock-dir=/var/lock/$name \
28 --with-log-dir=/var/log/$name \
29 --with-pid-dir=/var/run/$name \
30 --with-queue-dir=/var/spool/$name \
31 --with-mailhost=localhost.localdomain \
32 --with-urlhost=localhost.localdomain \
33 --with-mail-gid=$name \
34 --with-cgi-id=www \
35 --with-cgi-gid=www \
36 --without-permcheck
37
38 make
39 make DESTDIR=$PKG install
40 install -D -m 0755 $SRC/$name.rc $PKG/etc/rc.d/$name
41
42 # create empty crontab
43 install -d $PKG/etc/cron.d
44 cat > $PKG/etc/cron.d/$name << __EOF__
45 # DO NOT EDIT THIS FILE!
46 #
47 # Contents of this file managed by /etc/rc.d/mailman
48 # Master copy is /usr/lib/mailman/cron/crontab.in
49 # Consult that file for documentation
50 #
51 # End of file
52 __EOF__
53
54 # fix permissions
55 chown -R root:$name $PKG/etc/$name $PKG/usr/lib/$name $PKG/var/{lib,lock,log,run,spool}/$name
56 chmod 0775 $PKG/var/log/$name
57 chmod 1777 $PKG/var/lock
58 find $PKG/usr/lib/$name -type d -exec chmod 0775 {} \;
59 chmod o+x $PKG/var/lib/$name/archives/private
60
61 # fix configs
62 ln -sf /usr/lib/$name/Mailman/mm_cfg.py $PKG/etc/$name
63 ln -sf /etc/$name/sitelist.cfg $PKG/var/lib/$name/data
64 }
|