From 9d36fcd5638035abf19f303deebd9e861d384254 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 7 Aug 2012 00:01:58 +0000 Subject: Tue Aug 7 00:01:58 UTC 2012 --- community/mailman/PKGBUILD | 93 +++++++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 39 deletions(-) (limited to 'community/mailman/PKGBUILD') diff --git a/community/mailman/PKGBUILD b/community/mailman/PKGBUILD index 975b3cb96..74db47b4b 100644 --- a/community/mailman/PKGBUILD +++ b/community/mailman/PKGBUILD @@ -1,14 +1,15 @@ -# $Id: PKGBUILD 67164 2012-03-05 00:39:58Z pschmitz $ -# Maintainer: Paul Mattal +# $Id: PKGBUILD 74799 2012-08-05 16:06:17Z seblu $ +# Maintainer: Sébastien Luttringer +# Contributor: Paul Mattal pkgname=mailman -pkgver=2.1.14 -pkgrel=4 -pkgdesc="Mailing list manager with built in web access" -arch=('i686' 'x86_64') +pkgver=2.1.15 +pkgrel=2 +pkgdesc='The GNU Mailing List Manager' +arch=(i686 x86_64) license=('GPL') -url="http://www.list.org/" -depends=('python2' 'smtp-server') +url='http://www.list.org/' +depends=('glibc' 'python2' 'smtp-server') # we need to have the mailman user to build mailman makedepends=('mailman') # 'Defaults.py' should not be changed by users; 'mm_cfg.py' should instead. @@ -16,35 +17,42 @@ backup=('usr/lib/mailman/Mailman/mm_cfg.py') install=$pkgname.install source=("http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tgz" 'mailman-2.1-build.patch' - 'rc.mailman') -md5sums=('9ea163871ceccbd33fee4c9e335fcf7b' + "$pkgname.profile.sh" + "$pkgname.profile.csh" + "$pkgname.rc" + "$pkgname.service") +md5sums=('7d207489e8e9de0727cb334d46029833' 'ed04d062379eb21e39ce1e70e6b1ade2' - '3d83d06d0ec3319bf3c7d9df5d18e89f') + 'a9c71ec940c56173415fbd49087d10b0' + '85a8c30ffc444e677b286f54df530482' + '3a4014c15e9923451f5f282860896057' + 'f3ea6ef02ab135274406ce52ea8bbb7b') build() { - cd $srcdir/$pkgname-$pkgver - - # fix calls to /usr/bin/python - find . -name '*.py' -exec sed -i 's@^#!.*python$@#!/usr/bin/python2@' {} + + cd $pkgname-$pkgver + # some files in mailman doesn't use configure parameter + find . -type f -exec \ + sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \; # fix directory permissions to satisfy check_perms - patch -p1 -i ${srcdir}/mailman-2.1-build.patch + patch -p1 -i "$srcdir/mailman-2.1-build.patch" # set some sane defaults before the configure script has a chance to screw them up - sed -e 's/@MAILHOST@/localhost/g' \ - -e 's/@URLHOST@/localhost/g' \ - -i Mailman/Defaults.py.in - - ./configure --without-permcheck \ - --prefix=/usr/lib/mailman \ - --with-var-prefix=/var/lib/mailman \ - --with-mail-gid=mailman \ - --with-username=mailman --with-groupname=mailman \ - --with-cgi-gid=http --with-python=/usr/bin/python2 + ./configure \ + --without-permcheck \ + --prefix=/usr/lib/mailman \ + --with-var-prefix=/var/lib/mailman \ + --with-mail-gid=mailman \ + --with-username=mailman \ + --with-groupname=mailman \ + --with-cgi-gid=http \ + --with-python=/usr/bin/python2 \ + --with-mailhost=localhost \ + --with-urlhost=localhost make } package() { - cd $srcdir/$pkgname-$pkgver - make DESTDIR=$pkgdir install + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install # let's follow Fedora FHS way; Gentoo does it the other way round @@ -56,16 +64,23 @@ package() { # experienced mailman admins will expect to find it there. But having it # "appear" in the config directory is good practice and heading in the # right direction for FHS compliance. - install -d -m755 ${pkgdir}/etc/${pkgname} - ln -sv /usr/lib/mailman/Mailman/mm_cfg.py ${pkgdir}/etc/${pkgname}/mm_cfg.py - + install -d -m755 "$pkgdir/etc/$pkgname" + ln -sv /usr/lib/mailman/Mailman/mm_cfg.py "$pkgdir/etc/$pkgname/mm_cfg.py" # fix some permissions to satisfy check_perms - chown -R mailman:mailman $pkgdir/{usr/lib/mailman,var/lib/mailman,etc/mailman/*} - chown http:mailman ${pkgdir}/var/lib/mailman/archives/private - chmod 2770 ${pkgdir}/var/lib/mailman/archives/private - chmod 2755 ${pkgdir}/usr/lib/mailman/cgi-bin/* - chmod 2755 ${pkgdir}/usr/lib/mailman/mail/mailman - - # install the launch script - install -D -m755 $srcdir/rc.mailman $pkgdir/etc/rc.d/mailman + chown -R mailman:mailman "$pkgdir"/{usr/lib/mailman,var/lib/mailman,etc/mailman/*} + chown http:mailman "$pkgdir"/var/lib/mailman/archives/private + chmod 2770 "$pkgdir"/var/lib/mailman/archives/private + chmod 2755 "$pkgdir"/usr/lib/mailman/cgi-bin/* + chmod 2755 "$pkgdir"/usr/lib/mailman/mail/mailman + cd "$srcdir" + # install initscripts + install -Dm 755 $pkgname.rc "$pkgdir/etc/rc.d/$pkgname" + # install systemd service + install -Dm 644 $pkgname.service \ + "$pkgdir/usr/lib/systemd/system/$pkgname.service" + # install profiles + install -Dm 755 $pkgname.profile.sh "$pkgdir/etc/profile.d/$pkgname.sh" + install -Dm 755 $pkgname.profile.csh "$pkgdir/etc/profile.d/$pkgname.csh" } + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-54-g00ecf