Date: Monday, December 13, 2010 @ 14:44:10
  Author: bisson
Revision: 102972

minor upstream update, PKGBUILD cleanup, install script cleanup, and updated 
patch

Added:
  postfix/trunk/aliases.patch
Modified:
  postfix/trunk/PKGBUILD
  postfix/trunk/postfix.install
Deleted:
  postfix/trunk/postfix.patch.bz2

-----------------+
 PKGBUILD        |   50 ++++++++++++++++++++++++++------------------------
 aliases.patch   |   18 ++++++++++++++++++
 postfix.install |   41 +++++++++++++----------------------------
 3 files changed, 57 insertions(+), 52 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2010-12-13 19:43:55 UTC (rev 102971)
+++ PKGBUILD    2010-12-13 19:44:10 UTC (rev 102972)
@@ -2,54 +2,56 @@
 # Contributor: Jeff Brodnax <[email protected]>
 # Maintainer: Paul Mattal <[email protected]>
 pkgname=postfix
-pkgver=2.7.1
-pkgrel=2
+pkgver=2.7.2
+pkgrel=1
 pkgdesc="Secure, fast, easy to administer drop in replacement for Sendmail 
(MTA)"
+url="http://www.postfix.org/";
 arch=('i686' 'x86_64')
 license=('custom')
 depends=('pcre' 'libsasl' 'libmysqlclient' 'postgresql-libs>=8.4' 
'libldap>=2.4' 'db')
 backup=(etc/postfix/aliases etc/postfix/virtual etc/postfix/relocated \
-       etc/postfix/access etc/postfix/header_checks etc/postfix/transport \
-       etc/postfix/generic etc/postfix/canonical \
-       etc/postfix/main.cf etc/postfix/master.cf)
-install="${pkgname}.install"
+        etc/postfix/access etc/postfix/header_checks etc/postfix/transport \
+        etc/postfix/generic etc/postfix/canonical \
+        etc/postfix/main.cf etc/postfix/master.cf)
+source=("ftp://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${pkgver}.tar.gz";
 \
+        'aliases.patch' \
+        "${pkgname}")
+sha1sums=('2415c63c98ba0e0273bcb490ee7753a3891f5a73'
+          '5fc3de6c7df1e5851a0a379e825148868808318b'
+          '6f41e9ce5c0125fbd4eb016464c6ad1fd18eccea')
+
 provides=('smtp-server' 'smtp-forwarder')
 replaces=('postfix-mysql' 'postfix-pgsql')
 conflicts=('postfix-mysql' 'postfix-pgsql' 'smtp-server' 'smtp-forwarder')
-url="http://www.postfix.org/";
-source=(ftp://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${pkgver}.tar.gz
 \
-        ${pkgname}.patch.bz2 \
-       ${pkgname})
-md5sums=('b7a5c3ccd309156a65d6f8d2683d4fa1'
-         'a3c45ff23ef036143711793fcf2478c3'
-         'c847b96f08925f08b0f610468a8e21f6')
 
+install="${pkgname}.install"
+
 build() {
-       cd ${srcdir}/${pkgname}-${pkgver}
+       cd "${srcdir}/${pkgname}-${pkgver}"
        
        make makefiles \
-               CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl \
+               CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl \
                        -DUSE_CYRUS_SASL \
                        -DHAS_LDAP \
                        -DUSE_TLS \
                        -DHAS_MYSQL -I/usr/include/mysql \
                        -DHAS_PGSQL -I/usr/include/postgresql" \
-               AUXLIBS="-lsasl2 -lssl -lcrypto -lldap -llber -lmysqlclient -lz 
-lm -lpq"
-       make OPT="${CFLAGS}" || return 1
+               AUXLIBS="-lsasl2 -lssl -lcrypto -lldap -llber -lmysqlclient -lz 
-lm -lpq"
+       make OPT="${CFLAGS}"
+}
 
+package() {
+       cd "${srcdir}/${pkgname}-${pkgver}"
+
        sh postfix-install -non-interactive \
                install_root="${pkgdir}" \
                daemon_directory="/usr/lib/${pkgname}" \
                sample_directory="/etc/${pkgname}/sample" \
                manpage_directory="/usr/share/man"
 
-       cd ${pkgdir}
-       cat ${srcdir}/${pkgname}.patch |patch -Np0 || return 1
-       rm -f etc/${pkgname}/main.cf~
+       install -D -m755 "../${pkgname}" "${pkgdir}/etc/rc.d/${pkgname}"
+       install -D -m644 LICENSE 
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 
        cd ${pkgdir}
-       mkdir etc/rc.d
-       install -m 0755 ${srcdir}/${pkgname} etc/rc.d/${pkgname}
-
-       install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE 
${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+       patch -p0 < "${srcdir}"/aliases.patch
 }

Added: aliases.patch
===================================================================
--- aliases.patch                               (rev 0)
+++ aliases.patch       2010-12-13 19:44:10 UTC (rev 102972)
@@ -0,0 +1,18 @@
+--- etc/postfix/main.cf.orig   2010-12-13 20:18:22.000000000 +0100
++++ etc/postfix/main.cf        2010-12-13 20:18:24.000000000 +0100
+@@ -382,6 +382,7 @@
+ #alias_maps = hash:/etc/aliases
+ #alias_maps = hash:/etc/aliases, nis:mail.aliases
+ #alias_maps = netinfo:/aliases
++alias_maps = hash:/etc/postfix/aliases
+ 
+ # The alias_database parameter specifies the alias database(s) that
+ # are built with "newaliases" or "sendmail -bi".  This is a separate
+@@ -392,6 +393,7 @@
+ #alias_database = dbm:/etc/mail/aliases
+ #alias_database = hash:/etc/aliases
+ #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
++alias_database = $alias_maps
+ 
+ # ADDRESS EXTENSIONS (e.g., user+foo)
+ #

Modified: postfix.install
===================================================================
--- postfix.install     2010-12-13 19:43:55 UTC (rev 102971)
+++ postfix.install     2010-12-13 19:44:10 UTC (rev 102972)
@@ -1,38 +1,23 @@
-# arg 1:  the new package version
 post_install() {
-    if [ -z "`grep '^postdrop::' /etc/group`" ]; then
-       groupadd -g 75 postdrop >& /dev/null
-    fi
-    if [ -z "`grep '^postfix::' /etc/group`" ]; then
-       groupadd -g 73 postfix >& /dev/null
-    fi
-    if [ -z "`grep '^postfix:' /etc/passwd`" ]; then
-       useradd -u 73 -d /var/spool/postfix -g postfix -s /bin/false postfix
-    else
-       # fix a packaging bug from before (postfix should have no shell)
-       usermod -s /bin/false postfix
-    fi
+       getent group postdrop &>/dev/null || groupadd -g 75 postdrop >/dev/null
+       getent group postfix  &>/dev/null || groupadd -g 73 postfix  >/dev/null
+       getent passwd postfix &>/dev/null || useradd -u 73 -d 
/var/spool/postfix -g postfix -s /bin/false postfix >/dev/null
 
-    chown postfix var/spool/postfix/{active,bounce,corrupt,defer,deferred,\
-flush,hold,incoming,private,public,maildrop,trace,saved}
-    chown postfix var/lib/postfix
-    chgrp postdrop var/spool/postfix/{public,maildrop}
-    chgrp postdrop usr/sbin/postqueue
-    chgrp postdrop usr/sbin/postdrop
-    chmod g+s usr/sbin/{postqueue,postdrop}
+       chown postfix 
var/spool/postfix/{active,bounce,corrupt,defer,deferred,flush,hold,incoming,private,public,maildrop,trace,saved}
+       chown postfix var/lib/postfix
+       chgrp postdrop var/spool/postfix/{public,maildrop}
+       chgrp postdrop usr/sbin/{postqueue,postdrop}
+       chmod g+s usr/sbin/{postqueue,postdrop}
 
-    newaliases
+       newaliases
 }
 
-# arg 1:  the new package version
-# arg 2:  the old package version
 post_upgrade() {
-    post_install $1
+       post_install
 }
 
-# arg 1:  the old package version
 pre_remove() {
-    userdel postfix &> /dev/null
-    groupdel postfix &> /dev/null
-    groupdel postdrop &> /dev/null
+       getent passwd postfix &>/dev/null && userdel  postfix  >/dev/null
+       getent group postfix  &>/dev/null && groupdel postfix  >/dev/null
+       getent group postdrop &>/dev/null && groupdel postdrop >/dev/null
 }

Deleted: postfix.patch.bz2
===================================================================
(Binary files differ)

Reply via email to