diff options
author | runnytu | 2015-06-08 21:18:40 +0200 |
---|---|---|
committer | runnytu | 2015-06-08 21:18:40 +0200 |
commit | a23119ef9d66a4e862c7df8e44ab4a350602e805 (patch) | |
tree | 64e1dcae72bd2bf067e8e9f7029c4457fa01f447 | |
download | aur-a23119ef9d66a4e862c7df8e44ab4a350602e805.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 39 | ||||
-rw-r--r-- | PKGBUILD | 81 | ||||
-rw-r--r-- | authdaemond.service | 11 | ||||
-rw-r--r-- | courier-authlib.install | 27 | ||||
-rw-r--r-- | courier-authlib.tmpfiles | 1 |
5 files changed, 159 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..119dd83bc843 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,39 @@ +pkgbase = courier-authlib + pkgdesc = Authentification library for the courier mailserver(s) + pkgver = 0.66.2 + pkgrel = 1 + url = http://courier-mta.org/authlib/ + install = courier-authlib.install + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = expect + makedepends = pam + makedepends = libldap + makedepends = libmysqlclient + makedepends = postgresql-libs>=8.3.0 + depends = openssl + depends = gdbm + depends = perl + depends = libtool + depends = expect + depends = courier-unicode>=1.2 + optdepends = sqlite: With support for the authsqlite authentication module + optdepends = libmariadbclient: With support for the authmysql authentication module + optdepends = libldap: With support for the authldap authentication module + optdepends = postgresql-libs: With support for the authpgsql authentication module + optdepends = pam: With support for the authpam authentication module + options = !libtool + backup = etc/authlib/authdaemonrc + backup = etc/authlib/authldaprc + backup = etc/authlib/authmysqlrc + backup = etc/authlib/authpgsqlrc + source = http://downloads.sourceforge.net/project/courier/authlib/0.66.2/courier-authlib-0.66.2.tar.bz2 + source = courier-authlib.tmpfiles + source = authdaemond.service + sha512sums = 8633fca7553fa442aecca2af6a65aa72db8452180b86e84ef768148d9f4c1de5cab5325450c879d0ce4d5692ac8df4eefd06c60c3af911cee96d1dd012066cfe + sha512sums = 6fa87f52a3a26ae470bc28f9ff6d5f7c16afc5ccaf0d3209378e7339271d568dc59ca9fc9d0b5bbfc4155e76702f5de18899237252860a4a3636eabb94a770d7 + sha512sums = 6d0ed01836fd397ce7e34b0eb892e349c2e3dd092c2250dbb1d2db4a9ce41d1dbd072d53fbc9d378fdde87e71fa317a919ddb47835416c7e2b6ba45bd8bd25e2 + +pkgname = courier-authlib + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2a861450f695 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,81 @@ +# Maintainer: Runnytu < runnytu at gmail dot com > +# Old Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Old Maintainer: Jonas Heinrich <onny@project-insanity.org> +# Contributor: tobias <tobias@archlinux.org> +# Contributor: Tobias Kieslich <tobias@justdreams.de> + +pkgname=courier-authlib +pkgver=0.66.2 +pkgrel=1 +pkgdesc="Authentification library for the courier mailserver(s)" +arch=(i686 x86_64) +license=('GPL2') +url="http://courier-mta.org/authlib/" +backup=('etc/authlib/authdaemonrc' 'etc/authlib/authldaprc' \ + 'etc/authlib/authmysqlrc' 'etc/authlib/authpgsqlrc') +depends=('openssl' 'gdbm' 'perl' 'libtool' 'expect' 'courier-unicode>=1.2') +makedepends=('expect' 'pam' 'libldap' 'libmysqlclient' 'postgresql-libs>=8.3.0') +optdepends=('sqlite: With support for the authsqlite authentication module' + 'libmariadbclient: With support for the authmysql 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) +install=${pkgname}.install +source=(http://downloads.sourceforge.net/project/courier/authlib/0.66.2/${pkgname}-${pkgver}.tar.bz2 + courier-authlib.tmpfiles + authdaemond.service) +sha512sums=('8633fca7553fa442aecca2af6a65aa72db8452180b86e84ef768148d9f4c1de5cab5325450c879d0ce4d5692ac8df4eefd06c60c3af911cee96d1dd012066cfe' + '6fa87f52a3a26ae470bc28f9ff6d5f7c16afc5ccaf0d3209378e7339271d568dc59ca9fc9d0b5bbfc4155e76702f5de18899237252860a4a3636eabb94a770d7' + '6d0ed01836fd397ce7e34b0eb892e349c2e3dd092c2250dbb1d2db4a9ce41d1dbd072d53fbc9d378fdde87e71fa317a919ddb47835416c7e2b6ba45bd8bd25e2') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --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-authdaemonvar=/run/authdaemon + #--with-authsqlite --with-sqlite-libs + make +} + +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 + chown 72:72 ${distfile} + 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 + + # 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" +} diff --git a/authdaemond.service b/authdaemond.service new file mode 100644 index 000000000000..cd780caf0018 --- /dev/null +++ b/authdaemond.service @@ -0,0 +1,11 @@ +[Unit] +Description=Courier Authentification Daemon + +[Service] +Type=forking +ExecStart=/usr/bin/authdaemond start +ExecStop=/usr/bin/authdaemon stop +PIDFile=/var/run/authdaemon/pid + +[Install] +WantedBy=multi-user.target diff --git a/courier-authlib.install b/courier-authlib.install new file mode 100644 index 000000000000..54fc631b10cf --- /dev/null +++ b/courier-authlib.install @@ -0,0 +1,27 @@ +# arg 1: the new package version +post_install() { + # creates group and user on virgin systems + 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 + fi + + useradd courier -g courier + systemd-tmpfiles --create /usr/lib/tmpfiles.d/courier-authlib.conf +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + post_install $1 +} + +# arg 1: the old package version +pre_remove() { + userdel courier + groupdel courier +} >/dev/null 2>&1 + diff --git a/courier-authlib.tmpfiles b/courier-authlib.tmpfiles new file mode 100644 index 000000000000..6cc1f125fb5f --- /dev/null +++ b/courier-authlib.tmpfiles @@ -0,0 +1 @@ +D /run/authdaemon 0755 courier courier |