diff options
author | runnytu | 2017-08-07 21:21:20 +0200 |
---|---|---|
committer | runnytu | 2017-08-07 21:21:20 +0200 |
commit | 06473e545435489fa37c8f223cc36c38ab75ec91 (patch) | |
tree | b7a497b5a1502ac16a88996fc93e283bdd9e0677 | |
parent | 8ff2872e80a813e99b6fb72eca8fc89436b5b31a (diff) | |
download | aur-06473e545435489fa37c8f223cc36c38ab75ec91.tar.gz |
Update to 0.68.0-2
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 58 | ||||
-rw-r--r-- | authdaemond.service | 1 | ||||
-rw-r--r-- | courier-authlib.install | 17 | ||||
-rw-r--r-- | courier-authlib.tmpfiles | 1 |
5 files changed, 49 insertions, 38 deletions
@@ -1,7 +1,7 @@ pkgbase = courier-authlib - pkgdesc = Authentification library for the courier mailserver(s) + pkgdesc = Authentication library for the Courier mailserver(s) pkgver = 0.68.0 - pkgrel = 1 + pkgrel = 2 url = http://courier-mta.org/authlib/ install = courier-authlib.install arch = i686 @@ -24,6 +24,8 @@ pkgbase = courier-authlib optdepends = postgresql-libs: With support for the authpgsql authentication module optdepends = pam: With support for the authpam authentication module options = !libtool + options = !staticlibs + options = emptydirs backup = etc/authlib/authdaemonrc backup = etc/authlib/authldaprc backup = etc/authlib/authmysqlrc @@ -32,8 +34,8 @@ pkgbase = courier-authlib source = courier-authlib.tmpfiles source = authdaemond.service sha512sums = 5c4adaf0fd69f4b9e780962aa3f9eeac6b15cea3f302288ff4549ce2b0be9ea0808b4501670ef3c4e0419c3d27505c256c082f795dea4683dd5265fd7dcab93b - sha512sums = 6fa87f52a3a26ae470bc28f9ff6d5f7c16afc5ccaf0d3209378e7339271d568dc59ca9fc9d0b5bbfc4155e76702f5de18899237252860a4a3636eabb94a770d7 - sha512sums = 923b501bd250068956d304c2ab922af4e22f2828eae9fb17dc5945bbd2af3d0eb641ba8783a91a20f970bdda95e97f6ef2801e0b50d767c626ca38de6cb140b4 + sha512sums = 5047fea9990cd2cd415e11c81fbd8ff83b70dadf0fc178b2398b2c9930843a4669abb3c6801f2953c1ebfdae73c1f82d0ee8c24e900f3876ee6b3aa689363b62 + sha512sums = 2168a3d2f92bbc4c24ba80030236dd39a871ccd0f945ea9481518356f6ddfeec3661f161cd6a65d852bce6d9b089d7fa4860337615b9157199aaef336c58d268 pkgname = courier-authlib @@ -3,11 +3,12 @@ # Old Maintainer: Jonas Heinrich <onny@project-insanity.org> # Contributor: tobias <tobias@archlinux.org> # Contributor: Tobias Kieslich <tobias@justdreams.de> +# Contributor: Neil Romig <neil@sixtythree.me.uk> pkgname=courier-authlib pkgver=0.68.0 -pkgrel=1 -pkgdesc="Authentification library for the courier mailserver(s)" +pkgrel=2 +pkgdesc="Authentication library for the Courier mailserver(s)" arch=(i686 x86_64) license=('GPL2') url="http://courier-mta.org/authlib/" @@ -20,14 +21,12 @@ optdepends=('sqlite: With support for the authsqlite authentication module' 'libldap: With support for the authldap authentication module' 'postgresql-libs: With support for the authpgsql authentication module' 'pam: With support for the authpam authentication module') -options=(!libtool) +options=(!libtool !staticlibs emptydirs) install=${pkgname}.install source=(http://downloads.sourceforge.net/project/courier/authlib/${pkgver}/${pkgname}-${pkgver}.tar.bz2 courier-authlib.tmpfiles authdaemond.service) -sha512sums=('5c4adaf0fd69f4b9e780962aa3f9eeac6b15cea3f302288ff4549ce2b0be9ea0808b4501670ef3c4e0419c3d27505c256c082f795dea4683dd5265fd7dcab93b' - '6fa87f52a3a26ae470bc28f9ff6d5f7c16afc5ccaf0d3209378e7339271d568dc59ca9fc9d0b5bbfc4155e76702f5de18899237252860a4a3636eabb94a770d7' - '923b501bd250068956d304c2ab922af4e22f2828eae9fb17dc5945bbd2af3d0eb641ba8783a91a20f970bdda95e97f6ef2801e0b50d767c626ca38de6cb140b4') +sha512sums=('5c4adaf0fd69f4b9e780962aa3f9eeac6b15cea3f302288ff4549ce2b0be9ea0808b4501670ef3c4e0419c3d27505c256c082f795dea4683dd5265fd7dcab93b' '5047fea9990cd2cd415e11c81fbd8ff83b70dadf0fc178b2398b2c9930843a4669abb3c6801f2953c1ebfdae73c1f82d0ee8c24e900f3876ee6b3aa689363b62' '2168a3d2f92bbc4c24ba80030236dd39a871ccd0f945ea9481518356f6ddfeec3661f161cd6a65d852bce6d9b089d7fa4860337615b9157199aaef336c58d268') build() { cd ${srcdir}/${pkgname}-${pkgver} @@ -38,10 +37,17 @@ build() { --libdir=/usr/lib \ --libexecdir=/usr/lib \ --with-db=gdbm \ - --with-mailuser=courier --with-mailgroup=courier \ - --with-authpam --with-authpwd --with-authshadow \ - --with-authldap --with-authmysql --with-authpgsql \ - --with-authuserdb --with-authcram --with-authdaemon \ + --with-mailuser=courier \ + --with-mailgroup=courier \ + --with-authpam \ + --with-authpwd \ + --with-authshadow \ + --with-authldap \ + --with-authmysql \ + --with-authpgsql \ + --with-authuserdb \ + --with-authcram \ + --with-authdaemon \ --with-authdaemonvar=/run/authdaemon #--with-authsqlite --with-sqlite-libs make @@ -49,33 +55,25 @@ build() { package() { cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install - ############################################################################### - # post_installation ---- rename the config file and change ownerschip + for distfile in ${pkgdir}/etc/authlib/*.dist; do + # change ownership - this is usually done by the Makefile where it is assumed the user & group already exist chown 72:72 ${distfile} + # remove the .dist suffix - mimics the install-configure step of a standard Courier installation mv ${distfile} ${pkgdir}/etc/authlib/`basename ${distfile} .dist` done - # copy the .schema; mostly refered to as courier.schema -> rename it - install -Dm 444 authldap.schema \ - ${pkgdir}/etc/openldap/schema/courier.schema - ############################################################################### - #mkdir -p ${pkgdir}/var/spool/authdaemon - #chown -R 72:72 ${pkgdir}/var/spool/authdaemon - mkdir -p ${pkgdir}/run/authdaemon - mkdir -p ${pkgdir}/var/spool/courier - chown -R 72:72 ${pkgdir}/var/spool/courier - # docs say we can remove .a files after make - find ${pkgdir} -name '*\.a' -exec rm -f {} \; - # Make libs available to /usr/lib - cd $pkgdir/usr/lib - for lib in courier-authlib/*.so; do - ln -s $lib . - done + + # copy the .schema; mostly refered to as courier.schema -> rename it + install -Dm 444 authldap.schema ${pkgdir}/etc/openldap/schema/courier.schema + + chown 72:72 ${pkgdir}/usr/lib/courier-authlib # Install service file install -Dm 644 "${srcdir}/authdaemond.service" "${pkgdir}/usr/lib/systemd/system/authdaemond.service" - # Install systemd configuration files - install -Dm644 "$srcdir/courier-authlib.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/courier-authlib.conf" + # Install systemd configuration file + install -Dm 644 "$srcdir/courier-authlib.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/courier-authlib.conf" } + diff --git a/authdaemond.service b/authdaemond.service index 9973d5801437..ad2cfcbbb337 100644 --- a/authdaemond.service +++ b/authdaemond.service @@ -9,3 +9,4 @@ PIDFile=/var/run/authdaemon/pid [Install] WantedBy=multi-user.target + diff --git a/courier-authlib.install b/courier-authlib.install index 1359c3f6e46d..c52ecb672c6a 100644 --- a/courier-authlib.install +++ b/courier-authlib.install @@ -1,16 +1,22 @@ # arg 1: the new package version post_install() { - # creates group and user on virgin systems + # create courier group and user if ! getent group courier >/dev/null; then groupadd -g 72 courier >/dev/null 2>&1 fi if ! getent passwd courier >/dev/null; then - useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier >/dev/null 2>&1 + useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier >/dev/null 2>&1; fi - useradd courier -g courier + if ! (grep -q '^courier:.*:72:72:' /etc/passwd); then echo courier user has incorrect uid:gid - please fix!; fi; + + # set correct ownership & permissions on /run/authdaemon systemd-tmpfiles --create /usr/lib/tmpfiles.d/courier-authlib.conf + + # make sure the system can see authlib libraries + echo /usr/lib/courier-authlib > /etc/ld.so.conf.d/courier-authlib + ldconfig } # arg 1: the new package version @@ -21,7 +27,10 @@ post_upgrade() { # arg 1: the old package version pre_remove() { + systemd-tmpfiles --remove /usr/lib/tmpfiles.d/courier-authlib.conf + rm -f /etc/ld.so.conf.d/courier-authlib + ldconfig userdel courier - groupdel courier + if getent group courier >/dev/null; then groupdel courier; fi } >/dev/null 2>&1 diff --git a/courier-authlib.tmpfiles b/courier-authlib.tmpfiles index 6cc1f125fb5f..f723fa61481c 100644 --- a/courier-authlib.tmpfiles +++ b/courier-authlib.tmpfiles @@ -1 +1,2 @@ D /run/authdaemon 0755 courier courier + |