commit:     29d183eb17a34535a00dcdecc3ad5bf50040b47c
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 07:22:17 2017 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Wed May 10 07:22:17 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29d183eb

net-libs/courier-authlib: bump to 0.67.0

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 net-libs/courier-authlib/Manifest                  |   1 +
 .../courier-authlib/courier-authlib-0.67.0.ebuild  | 149 +++++++++++++++++++++
 2 files changed, 150 insertions(+)

diff --git a/net-libs/courier-authlib/Manifest 
b/net-libs/courier-authlib/Manifest
index ec21b707120..bdc5ba67fe2 100644
--- a/net-libs/courier-authlib/Manifest
+++ b/net-libs/courier-authlib/Manifest
@@ -1,3 +1,4 @@
 DIST courier-authlib-0.65.0.tar.bz2 2303751 SHA256 
db3e34ee2b075897864c44aaae924388c74b32ed40b83f0fcf8626a060c1ea47 SHA512 
edc4a51bc0d748e7d6cdbf9e9c67c43eeedd9e3846d91a8eea24613f6fb5125d2e713ef7fd63cbbe1905205f2a406b4ff3f31d7c3fb7028939123dbc728d8e38
 WHIRLPOOL 
d86ad93ebe701f0742e83988ad14bb750c98ada952fbc6422641840b0074b8f285ca41c0f6458b79c36196a435c99c76d767e8cf3fdf3110107b25112712887a
 DIST courier-authlib-0.66.3.tar.bz2 2085083 SHA256 
033402a86e334999eaf17c1b722d6f6cc1961fccb5d2ee88342dfd6c5d534961 SHA512 
09d97c8efc79d84437feefca13f5161c0e113864b9c971a4a980b359c9c14699f8d07eac6b52ac0a7d30f9770656e672f64c3445ecf4dcad88f51a427310d530
 WHIRLPOOL 
4763eaadf6da2cd014f68638a8e2b6be6f00bb64234251c65b0de3af821e2484232919a52bac515fccefa1967ff0c4b3d79516d769ce73c0f2ac57802b6818f9
 DIST courier-authlib-0.66.4.tar.bz2 2192331 SHA256 
a874fa50e83d9b1385f97a47879af781a1aa09f49cdaa7d77e7ea3e5983a4a26 SHA512 
0987bc9d33a013ae842e0ea3e4e83ef9d6196c2f923a6970e049a36b8ccddbf0c4465c43c7e27d6718480e981f573795f6417478de1ff685264f3439e8dffdc9
 WHIRLPOOL 
4140435ab87bb73613c4561bbc0108a55697d179701dae890a8133e8cef49fb1b131894bf3feb4f292801cb33f7b577cbc6d4ee268852d56e546e0e80e81ba83
+DIST courier-authlib-0.67.0.tar.bz2 2194546 SHA256 
d416b9c57ecd9afe6e22d40b26c2e6f9aa87bf7abbe8ca7d04768c30635594a3 SHA512 
6e3da28d555761177727c44b1422bf5baf6ffbf28f53cea89a4a8e13daa5433803deba1614295d9679c41b5be4750f464e7869a2d3ecbfd91ae84e7281c4f3ef
 WHIRLPOOL 
9821a3806ca7e6f7ba029d8ee2488a49bc07d493b178980bca520a7bc1f22302dc77d4dc6c2a2807137ea5c2e819436467faf18a0c5da618771bafaf16773ca5

diff --git a/net-libs/courier-authlib/courier-authlib-0.67.0.ebuild 
b/net-libs/courier-authlib/courier-authlib-0.67.0.ebuild
new file mode 100644
index 00000000000..e43307c2c40
--- /dev/null
+++ b/net-libs/courier-authlib/courier-authlib-0.67.0.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc 
~x86 ~amd64-fbsd ~x86-fbsd"
+
+DESCRIPTION="Courier authentication library"
+SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
+HOMEPAGE="http://www.courier-mta.org/";
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="berkdb crypt debug gdbm ldap libressl mysql pam postgres sqlite 
static-libs"
+
+RESTRICT="!berkdb? ( test )"
+
+DEPEND="net-mail/mailbase
+               >=net-libs/courier-unicode-1.3
+               gdbm? ( sys-libs/gdbm )
+               !gdbm? ( sys-libs/db:= )
+               !libressl? ( dev-libs/openssl:0= )
+               libressl? ( dev-libs/libressl:= )
+               ldap? ( >=net-nds/openldap-1.2.11 )
+               mysql? ( virtual/mysql )
+               pam? ( virtual/pam )
+               postgres? ( dev-db/postgresql:= )
+               sqlite? ( dev-db/sqlite:3 )"
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+       if ! has_version 'dev-tcltk/expect' ; then
+               ewarn 'The dev-tcltk/expect package is not installed.'
+               ewarn 'Without it, you will not be able to change system login 
passwords.'
+               ewarn 'However non-system authentication modules (LDAP, MySQL, 
PostgreSQL,'
+               ewarn 'and others) will work just fine.'
+       fi
+}
+
+src_configure() {
+       filter-flags -fomit-frame-pointer
+       local myconf
+       if use berkdb ; then
+               if use gdbm ; then
+                       ewarn "Both gdbm and berkdb selected. Using gdbm."
+               else
+                       myconf="--with-db=db"
+               fi
+       fi
+       use gdbm && myconf="--with-db=gdbm"
+       use debug && myconf+=" debug=true"
+       use sqlite && myconf+=" --with-sqlite-libs"
+
+       econf \
+               --sysconfdir=/etc/courier \
+               --datadir=/usr/share/courier \
+               --libexecdir=/usr/$(get_libdir)/courier \
+               --localstatedir=/var/lib/courier \
+               --sharedstatedir=/var/lib/courier/com \
+               --with-authdaemonvar=/var/lib/courier/authdaemon \
+               --with-authshadow \
+               --without-redhat \
+               --with-mailuser=mail \
+               --with-mailgroup=mail \
+               --cache-file="${S}/configuring.cache" \
+               $(use_with pam authpam) \
+               $(use_with ldap authldap) \
+               $(use_with mysql authmysql) \
+               $(use_with postgres authpgsql) \
+               $(use_with sqlite authsqlite) \
+               ${myconf}
+}
+
+orderfirst() {
+       file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}"
+       if [[ -e "${file}" ]] ; then
+               orig="$(grep ^${option}= ${file} | cut -d\" -f 2)"
+               new="${option}=\"${param} `echo ${orig} | sed 
-e\"s/${param}//g\" -e\"s/  / /g\"`\""
+               sed -i -e "s/^${option}=.*$/${new}/" "${file}" || die
+       fi
+}
+
+finduserdb() {
+       for dir in \
+               /etc/courier/authlib /etc/courier /etc/courier-imap \
+               /usr/lib/courier/etc /usr/lib/courier-imap/etc \
+               /usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \
+               /usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \
+               /usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do
+               if [[ -e "${dir}/userdb" ]] ; then
+                       einfo "Found userdb at: ${dir}/userdb"
+                       cp -fR "${dir}/userdb" "${D}/etc/courier/authlib/" || 
die
+                       chmod go-rwx "${D}/etc/courier/authlib/userdb" || die
+                       continue
+               fi
+       done
+}
+
+src_install() {
+       diropts -o mail -g mail
+       dodir /etc/courier
+       keepdir /var/lib/courier/authdaemon
+       keepdir /etc/courier/authlib
+       emake DESTDIR="${D}" install
+       [[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb
+       emake DESTDIR="${D}" install-configure
+       rm -f "${D}"/etc/courier/authlib/*.bak
+       chown mail:mail "${D}"/etc/courier/authlib/* || die
+       for y in "${D}"/etc/courier/authlib/*.dist ; do
+               [[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}"
+       done
+       use pam && orderfirst authdaemonrc authmodulelist authpam
+       use ldap && orderfirst authdaemonrc authmodulelist authldap
+       use sqlite && orderfirst authdaemonrc authmodulelist authsqlite
+       use postgres && orderfirst authdaemonrc authmodulelist authpgsql
+       use mysql && orderfirst authdaemonrc authmodulelist authmysql
+
+       DOCS=( AUTHORS ChangeLog* INSTALL NEWS README )
+       HTML_DOCS=(     README.html README_authlib.html NEWS.html INSTALL.html 
README.authdebug.html )
+       if use mysql ; then
+               DOCS+=( README.authmysql.myownquery )
+               HTML_DOCS+=( README.authmysql.html )
+       fi
+       if use postgres ; then
+               HTML_DOCS+=( README.authpostgres.html README.authmysql.html )
+       fi
+       if use ldap ; then
+               DOCS+=( README.ldap )
+               dodir /etc/openldap/schema
+               cp -f authldap.schema "${D}/etc/openldap/schema/" || die
+       fi
+       if use sqlite ; then
+               HTML_DOCS+=( README.authsqlite.html README.authmysql.html )
+       fi
+       einstalldocs
+
+       newinitd "${FILESDIR}/${PN}-r1" "${PN}"
+
+       use static-libs || find "${D}" -name "*.a" -delete
+}
+
+pkg_postinst() {
+       if [[ -e /etc/courier/authlib/userdb ]] ; then
+               einfo "Running makeuserdb ..."
+               chmod go-rwx /etc/courier/authlib/userdb || die
+               makeuserdb
+       fi
+}

Reply via email to