From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-959136-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 9CFCD139694
	for <garchives@archives.gentoo.org>; Mon,  3 Jul 2017 14:10:53 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D5DCFE0D29;
	Mon,  3 Jul 2017 14:10:52 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A53D3E0C09
	for <gentoo-commits@lists.gentoo.org>; Mon,  3 Jul 2017 14:10:52 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 5BFD5341823
	for <gentoo-commits@lists.gentoo.org>; Mon,  3 Jul 2017 14:10:51 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id C684F74A1
	for <gentoo-commits@lists.gentoo.org>; Mon,  3 Jul 2017 14:10:49 +0000 (UTC)
From: "Eray Aslan" <eras@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Eray Aslan" <eras@gentoo.org>
Message-ID: <1499091036.95b665ac4b5c2df43c12d7cb18b37522dd8e1145.eras@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/courier-authlib/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-libs/courier-authlib/Manifest net-libs/courier-authlib/courier-authlib-0.68.0.ebuild
X-VCS-Directories: net-libs/courier-authlib/
X-VCS-Committer: eras
X-VCS-Committer-Name: Eray Aslan
X-VCS-Revision: 95b665ac4b5c2df43c12d7cb18b37522dd8e1145
X-VCS-Branch: master
Date: Mon,  3 Jul 2017 14:10:49 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 38bfb34c-87ae-42d2-9143-f47cc3e5f8dd
X-Archives-Hash: cf72328a4c59b18e0c5893eb688082ea

commit:     95b665ac4b5c2df43c12d7cb18b37522dd8e1145
Author:     Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  3 14:00:18 2017 +0000
Commit:     Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Mon Jul  3 14:10:36 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95b665ac

net-libs/courier-authlib: bump to 0.68.0

Package-Manager: Portage-2.3.6, Repoman-2.3.2

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

diff --git a/net-libs/courier-authlib/Manifest b/net-libs/courier-authlib/Manifest
index bdc5ba67fe2..162548de01e 100644
--- a/net-libs/courier-authlib/Manifest
+++ b/net-libs/courier-authlib/Manifest
@@ -2,3 +2,4 @@ DIST courier-authlib-0.65.0.tar.bz2 2303751 SHA256 db3e34ee2b075897864c44aaae924
 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
+DIST courier-authlib-0.68.0.tar.bz2 2194982 SHA256 9096118823ababfac8f46a1a7393765a414ea3628c9413bfba39af5d70fd3e2e SHA512 5c4adaf0fd69f4b9e780962aa3f9eeac6b15cea3f302288ff4549ce2b0be9ea0808b4501670ef3c4e0419c3d27505c256c082f795dea4683dd5265fd7dcab93b WHIRLPOOL 81f9dc58d5c5e90f846421302762ea81e6bd2ec830725d047d88d2dd01f528fb0e2e2bcca796183f1ced9336ed622521b64e67e3cb6ae1fd3eb39f30bec4b2f9

diff --git a/net-libs/courier-authlib/courier-authlib-0.68.0.ebuild b/net-libs/courier-authlib/courier-authlib-0.68.0.ebuild
new file mode 100644
index 00000000000..958e0b90c40
--- /dev/null
+++ b/net-libs/courier-authlib/courier-authlib-0.68.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 ~arm64 ~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
+}