diff options
author | root <root@rshg054.dnsready.net> | 2012-06-10 00:04:00 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-06-10 00:04:00 +0000 |
commit | 7b2739f21a7ed0d52497fa381c9a2383e71ab7a8 (patch) | |
tree | e92096f88e034d79e6f814971f98eb098c0abd80 /community/courier-authlib | |
parent | 0c7e29df5c6742895884a0bbcf86381f8e601782 (diff) |
Sun Jun 10 00:04:00 UTC 2012
Diffstat (limited to 'community/courier-authlib')
-rw-r--r-- | community/courier-authlib/PKGBUILD | 14 | ||||
-rw-r--r-- | community/courier-authlib/courier-authlib.install | 26 | ||||
-rw-r--r-- | community/courier-authlib/courier-authlib.tmpfiles | 1 |
3 files changed, 21 insertions, 20 deletions
diff --git a/community/courier-authlib/PKGBUILD b/community/courier-authlib/PKGBUILD index 964be4a2a..4e82387ec 100644 --- a/community/courier-authlib/PKGBUILD +++ b/community/courier-authlib/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 70428 2012-05-06 03:21:33Z svenstaro $ +# $Id: PKGBUILD 72136 2012-06-09 00:24:01Z dreisner $ # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> # Contributor: tobias <tobias@archlinux.org> # Contributor: Tobias Kieslich <tobias@justdreams.de> pkgname=courier-authlib pkgver=0.64.0 -pkgrel=1 +pkgrel=2 pkgdesc="Authentification library for the courier mailserver(s)" arch=(i686 x86_64) license=('GPL2') @@ -20,8 +20,10 @@ provides=('courier-imap-mysql' 'courier-imap-pgsql' 'courier-imap-ldap') options=(!libtool) install=${pkgname}.install source=(http://downloads.sourceforge.net/project/courier/authlib/${pkgver}/${pkgname}-${pkgver}.tar.bz2 + courier-authlib.tmpfiles authdaemond.rc.d) md5sums=('d946a76e81e45a139543305d310399f6' + 'bef189740e9516b0beaace4e8954ef14' '7de75a9a74796f4fd2e81fd3ca16ed8d') build() { @@ -37,7 +39,7 @@ build() { --with-authpam --with-authpwd --with-authshadow \ --with-authldap --with-authmysql --with-authpgsql \ --with-authuserdb --with-authcram --with-authdaemon \ - --with-authdaemonvar=/var/run/authdaemon + --with-authdaemonvar=/run/authdaemon make } @@ -60,7 +62,6 @@ package() { #chown -R 72:72 ${pkgdir}/var/spool/authdaemon mkdir -p ${pkgdir}/var/spool/courier chown -R 72:72 ${pkgdir}/var/spool/courier - chown -R 72:72 ${pkgdir}/var/run/authdaemon # docs say we can remove .a files after make find ${pkgdir} -name '*\.a' -exec rm -f {} \; # Make libs available to /usr/lib @@ -68,4 +69,9 @@ package() { for lib in courier-authlib/*.so; do ln -s $lib . done + + install -Dm644 "$srcdir/courier-authlib.tmpfiles" "$pkgdir/usr/lib/tmpfiles/courier-authlib.conf" + + # avoid conflict with filesystem>=2012.06 + rmdir "$pkgdir/run/authdaemon" } diff --git a/community/courier-authlib/courier-authlib.install b/community/courier-authlib/courier-authlib.install index cbccc636b..7b29f845f 100644 --- a/community/courier-authlib/courier-authlib.install +++ b/community/courier-authlib/courier-authlib.install @@ -1,12 +1,15 @@ # arg 1: the new package version post_install() { # creates group and user on virgin systems - if [ -z "`grep '^courier::' /etc/group`" ]; then - groupadd -g 72 courier >& /dev/null + if ! getent group courier >/dev/null; then + groupadd -g 72 courier >/dev/null 2>&1 fi - if [ -z "`grep '^courier:' /etc/passwd`" ]; then - useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier &>/dev/null + + if getent passwd courier >/dev/null; then + useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier >/dev/null 2>&1 fi + + systemd-tmpfiles --create /usr/lib/tmpfiles/courier-authlib.conf } # arg 1: the new package version @@ -17,16 +20,7 @@ post_upgrade() { # arg 1: the old package version pre_remove() { - userdel courier &> /dev/null - groupdel courier &> /dev/null -} - - -post_remove() { - /bin/true -} - -op=$1 -shift + userdel courier + groupdel courier +} >/dev/null 2>&1 -$op $* diff --git a/community/courier-authlib/courier-authlib.tmpfiles b/community/courier-authlib/courier-authlib.tmpfiles new file mode 100644 index 000000000..887303a4c --- /dev/null +++ b/community/courier-authlib/courier-authlib.tmpfiles @@ -0,0 +1 @@ +d /run/authdaemon 0755 72 72 - |