Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/courier-authlib/
Date: Mon, 03 Jul 2017 14:10:53
Message-Id: 1499091036.95b665ac4b5c2df43c12d7cb18b37522dd8e1145.eras@gentoo
1 commit: 95b665ac4b5c2df43c12d7cb18b37522dd8e1145
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 3 14:00:18 2017 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 3 14:10:36 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95b665ac
7
8 net-libs/courier-authlib: bump to 0.68.0
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 net-libs/courier-authlib/Manifest | 1 +
13 .../courier-authlib/courier-authlib-0.68.0.ebuild | 149 +++++++++++++++++++++
14 2 files changed, 150 insertions(+)
15
16 diff --git a/net-libs/courier-authlib/Manifest b/net-libs/courier-authlib/Manifest
17 index bdc5ba67fe2..162548de01e 100644
18 --- a/net-libs/courier-authlib/Manifest
19 +++ b/net-libs/courier-authlib/Manifest
20 @@ -2,3 +2,4 @@ DIST courier-authlib-0.65.0.tar.bz2 2303751 SHA256 db3e34ee2b075897864c44aaae924
21 DIST courier-authlib-0.66.3.tar.bz2 2085083 SHA256 033402a86e334999eaf17c1b722d6f6cc1961fccb5d2ee88342dfd6c5d534961 SHA512 09d97c8efc79d84437feefca13f5161c0e113864b9c971a4a980b359c9c14699f8d07eac6b52ac0a7d30f9770656e672f64c3445ecf4dcad88f51a427310d530 WHIRLPOOL 4763eaadf6da2cd014f68638a8e2b6be6f00bb64234251c65b0de3af821e2484232919a52bac515fccefa1967ff0c4b3d79516d769ce73c0f2ac57802b6818f9
22 DIST courier-authlib-0.66.4.tar.bz2 2192331 SHA256 a874fa50e83d9b1385f97a47879af781a1aa09f49cdaa7d77e7ea3e5983a4a26 SHA512 0987bc9d33a013ae842e0ea3e4e83ef9d6196c2f923a6970e049a36b8ccddbf0c4465c43c7e27d6718480e981f573795f6417478de1ff685264f3439e8dffdc9 WHIRLPOOL 4140435ab87bb73613c4561bbc0108a55697d179701dae890a8133e8cef49fb1b131894bf3feb4f292801cb33f7b577cbc6d4ee268852d56e546e0e80e81ba83
23 DIST courier-authlib-0.67.0.tar.bz2 2194546 SHA256 d416b9c57ecd9afe6e22d40b26c2e6f9aa87bf7abbe8ca7d04768c30635594a3 SHA512 6e3da28d555761177727c44b1422bf5baf6ffbf28f53cea89a4a8e13daa5433803deba1614295d9679c41b5be4750f464e7869a2d3ecbfd91ae84e7281c4f3ef WHIRLPOOL 9821a3806ca7e6f7ba029d8ee2488a49bc07d493b178980bca520a7bc1f22302dc77d4dc6c2a2807137ea5c2e819436467faf18a0c5da618771bafaf16773ca5
24 +DIST courier-authlib-0.68.0.tar.bz2 2194982 SHA256 9096118823ababfac8f46a1a7393765a414ea3628c9413bfba39af5d70fd3e2e SHA512 5c4adaf0fd69f4b9e780962aa3f9eeac6b15cea3f302288ff4549ce2b0be9ea0808b4501670ef3c4e0419c3d27505c256c082f795dea4683dd5265fd7dcab93b WHIRLPOOL 81f9dc58d5c5e90f846421302762ea81e6bd2ec830725d047d88d2dd01f528fb0e2e2bcca796183f1ced9336ed622521b64e67e3cb6ae1fd3eb39f30bec4b2f9
25
26 diff --git a/net-libs/courier-authlib/courier-authlib-0.68.0.ebuild b/net-libs/courier-authlib/courier-authlib-0.68.0.ebuild
27 new file mode 100644
28 index 00000000000..958e0b90c40
29 --- /dev/null
30 +++ b/net-libs/courier-authlib/courier-authlib-0.68.0.ebuild
31 @@ -0,0 +1,149 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +inherit flag-o-matic
37 +
38 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
39 +
40 +DESCRIPTION="Courier authentication library"
41 +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
42 +HOMEPAGE="http://www.courier-mta.org/"
43 +LICENSE="GPL-3"
44 +SLOT="0"
45 +IUSE="berkdb crypt debug gdbm ldap libressl mysql pam postgres sqlite static-libs"
46 +
47 +RESTRICT="!berkdb? ( test )"
48 +
49 +DEPEND="net-mail/mailbase
50 + >=net-libs/courier-unicode-1.3
51 + gdbm? ( sys-libs/gdbm )
52 + !gdbm? ( sys-libs/db:= )
53 + !libressl? ( dev-libs/openssl:0= )
54 + libressl? ( dev-libs/libressl:= )
55 + ldap? ( >=net-nds/openldap-1.2.11 )
56 + mysql? ( virtual/mysql )
57 + pam? ( virtual/pam )
58 + postgres? ( dev-db/postgresql:= )
59 + sqlite? ( dev-db/sqlite:3 )"
60 +
61 +RDEPEND="${DEPEND}"
62 +
63 +pkg_setup() {
64 + if ! has_version 'dev-tcltk/expect' ; then
65 + ewarn 'The dev-tcltk/expect package is not installed.'
66 + ewarn 'Without it, you will not be able to change system login passwords.'
67 + ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,'
68 + ewarn 'and others) will work just fine.'
69 + fi
70 +}
71 +
72 +src_configure() {
73 + filter-flags -fomit-frame-pointer
74 + local myconf
75 + if use berkdb ; then
76 + if use gdbm ; then
77 + ewarn "Both gdbm and berkdb selected. Using gdbm."
78 + else
79 + myconf="--with-db=db"
80 + fi
81 + fi
82 + use gdbm && myconf="--with-db=gdbm"
83 + use debug && myconf+=" debug=true"
84 + use sqlite && myconf+=" --with-sqlite-libs"
85 +
86 + econf \
87 + --sysconfdir=/etc/courier \
88 + --datadir=/usr/share/courier \
89 + --libexecdir=/usr/$(get_libdir)/courier \
90 + --localstatedir=/var/lib/courier \
91 + --sharedstatedir=/var/lib/courier/com \
92 + --with-authdaemonvar=/var/lib/courier/authdaemon \
93 + --with-authshadow \
94 + --without-redhat \
95 + --with-mailuser=mail \
96 + --with-mailgroup=mail \
97 + --cache-file="${S}/configuring.cache" \
98 + $(use_with pam authpam) \
99 + $(use_with ldap authldap) \
100 + $(use_with mysql authmysql) \
101 + $(use_with postgres authpgsql) \
102 + $(use_with sqlite authsqlite) \
103 + ${myconf}
104 +}
105 +
106 +orderfirst() {
107 + file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}"
108 + if [[ -e "${file}" ]] ; then
109 + orig="$(grep ^${option}= ${file} | cut -d\" -f 2)"
110 + new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\""
111 + sed -i -e "s/^${option}=.*$/${new}/" "${file}" || die
112 + fi
113 +}
114 +
115 +finduserdb() {
116 + for dir in \
117 + /etc/courier/authlib /etc/courier /etc/courier-imap \
118 + /usr/lib/courier/etc /usr/lib/courier-imap/etc \
119 + /usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \
120 + /usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \
121 + /usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do
122 + if [[ -e "${dir}/userdb" ]] ; then
123 + einfo "Found userdb at: ${dir}/userdb"
124 + cp -fR "${dir}/userdb" "${D}/etc/courier/authlib/" || die
125 + chmod go-rwx "${D}/etc/courier/authlib/userdb" || die
126 + continue
127 + fi
128 + done
129 +}
130 +
131 +src_install() {
132 + diropts -o mail -g mail
133 + dodir /etc/courier
134 + keepdir /var/lib/courier/authdaemon
135 + keepdir /etc/courier/authlib
136 + emake DESTDIR="${D}" install
137 + [[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb
138 + emake DESTDIR="${D}" install-configure
139 + rm -f "${D}"/etc/courier/authlib/*.bak
140 + chown mail:mail "${D}"/etc/courier/authlib/* || die
141 + for y in "${D}"/etc/courier/authlib/*.dist ; do
142 + [[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}"
143 + done
144 + use pam && orderfirst authdaemonrc authmodulelist authpam
145 + use ldap && orderfirst authdaemonrc authmodulelist authldap
146 + use sqlite && orderfirst authdaemonrc authmodulelist authsqlite
147 + use postgres && orderfirst authdaemonrc authmodulelist authpgsql
148 + use mysql && orderfirst authdaemonrc authmodulelist authmysql
149 +
150 + DOCS=( AUTHORS ChangeLog* INSTALL NEWS README )
151 + HTML_DOCS=( README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html )
152 + if use mysql ; then
153 + DOCS+=( README.authmysql.myownquery )
154 + HTML_DOCS+=( README.authmysql.html )
155 + fi
156 + if use postgres ; then
157 + HTML_DOCS+=( README.authpostgres.html README.authmysql.html )
158 + fi
159 + if use ldap ; then
160 + DOCS+=( README.ldap )
161 + dodir /etc/openldap/schema
162 + cp -f authldap.schema "${D}/etc/openldap/schema/" || die
163 + fi
164 + if use sqlite ; then
165 + HTML_DOCS+=( README.authsqlite.html README.authmysql.html )
166 + fi
167 + einstalldocs
168 +
169 + newinitd "${FILESDIR}/${PN}-r1" "${PN}"
170 +
171 + use static-libs || find "${D}" -name "*.a" -delete
172 +}
173 +
174 +pkg_postinst() {
175 + if [[ -e /etc/courier/authlib/userdb ]] ; then
176 + einfo "Running makeuserdb ..."
177 + chmod go-rwx /etc/courier/authlib/userdb || die
178 + makeuserdb
179 + fi
180 +}