Gentoo Archives: gentoo-commits

From: "Hanno Böck" <hanno@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/courier-authlib/
Date: Wed, 31 Mar 2021 13:06:49
Message-Id: 1617196003.47e9cf1a90abc3f6792797c08dd5dc57f625383c.hanno@gentoo
1 commit: 47e9cf1a90abc3f6792797c08dd5dc57f625383c
2 Author: Hanno Böck <hanno <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 31 13:06:43 2021 +0000
4 Commit: Hanno Böck <hanno <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 31 13:06:43 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47e9cf1a
7
8 net-libs/courier-authlib: Version bump
9
10 Signed-off-by: Hanno Böck <hanno <AT> gentoo.org>
11 Package-Manager: Portage-3.0.18, Repoman-3.0.3
12
13 net-libs/courier-authlib/Manifest | 1 +
14 .../courier-authlib/courier-authlib-0.71.2.ebuild | 148 +++++++++++++++++++++
15 2 files changed, 149 insertions(+)
16
17 diff --git a/net-libs/courier-authlib/Manifest b/net-libs/courier-authlib/Manifest
18 index 27f8ac5997c..7f602ce6de1 100644
19 --- a/net-libs/courier-authlib/Manifest
20 +++ b/net-libs/courier-authlib/Manifest
21 @@ -2,3 +2,4 @@ DIST courier-authlib-0.69.0.tar.bz2 2197718 BLAKE2B 63c273a85983ce7bd57496eeefac
22 DIST courier-authlib-0.70.0.tar.bz2 2183323 BLAKE2B ebf58f8c4e7b58766edc684ced590ea7bfa692eff19a483f4ab7748a73e96e1c66858985ac89e281205838660a72e9a33e3b3c28fce3f94d981b61ca56b1e2b1 SHA512 61ce62860cc7ceb51f255a0659bf9b8f4172d0c1c8aee06d9821144330f9526f54e6bdb0158f2fd754d6ad92fd4cc84306b949d46c92e8aed47a397023b36b65
23 DIST courier-authlib-0.71.0.tar.bz2 2207895 BLAKE2B 8eb92b2c07acfb662b34a2234759a80f3a1b5a96c9e537cd6215bd9a9a607ed8995461dd599e4fe2698e70510f11815ad13a0511446303ae5e26ff616f05d92f SHA512 7a9700c472fd9d6942bd15dfd8db474a738817608bcd8106b6211b24cdc0631fd69f99e7a5c9e9f6088c16b53a9304ec429c031b16621f8ef52581af8a4256ec
24 DIST courier-authlib-0.71.1.tar.bz2 2208870 BLAKE2B 5058a5d3182c53020c3be0a693908bd90e6e2397f03124df3efd7c3bd39ebdc794166d49c6153880bbf93518afbf4388160680cd701236b075b6e59624fb6882 SHA512 a1b36f4f3b0f11fb34e5dab197b3a0471bc6a99528fe77836b3b2d12f9dac292be4c181aeba5afa3410685dd6882ed00ff6692e74cd0132ba591de1294d0f2d7
25 +DIST courier-authlib-0.71.2.tar.bz2 2208460 BLAKE2B 49aaea85032166ba4867e7834bb2f6c8d3eccb0ebe24b94bac3033a3da2154e3162d06892354b37eb0c38db092ce0096b050246db341b18a32065c19f322238a SHA512 b0bd2356013d48a998908d4825901e8e730ec276699005696948781e8af4014e25eded3116fa5a8a38b6236e9713f454170628b51aedab7b7d2ebec082643a47
26
27 diff --git a/net-libs/courier-authlib/courier-authlib-0.71.2.ebuild b/net-libs/courier-authlib/courier-authlib-0.71.2.ebuild
28 new file mode 100644
29 index 00000000000..923d27fc838
30 --- /dev/null
31 +++ b/net-libs/courier-authlib/courier-authlib-0.71.2.ebuild
32 @@ -0,0 +1,148 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +inherit flag-o-matic
38 +
39 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
40 +
41 +DESCRIPTION="Courier authentication library"
42 +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
43 +HOMEPAGE="https://www.courier-mta.org/authlib/"
44 +LICENSE="GPL-3"
45 +SLOT="0"
46 +IUSE="berkdb crypt debug gdbm ldap libressl mysql pam postgres sqlite static-libs"
47 +
48 +RESTRICT="!berkdb? ( test )"
49 +
50 +DEPEND="net-mail/mailbase
51 + >=net-libs/courier-unicode-2.2.3
52 + gdbm? ( sys-libs/gdbm )
53 + !gdbm? ( sys-libs/db:= )
54 + !libressl? ( dev-libs/openssl:0= )
55 + libressl? ( dev-libs/libressl:= )
56 + ldap? ( >=net-nds/openldap-1.2.11 )
57 + mysql? ( dev-db/mysql-connector-c )
58 + pam? ( sys-libs/pam )
59 + postgres? ( dev-db/postgresql:= )
60 + sqlite? ( dev-db/sqlite:3 )"
61 +
62 +RDEPEND="${DEPEND}"
63 +
64 +pkg_setup() {
65 + if ! has_version 'dev-tcltk/expect' ; then
66 + ewarn 'The dev-tcltk/expect package is not installed.'
67 + ewarn 'Without it, you will not be able to change system login passwords.'
68 + ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,'
69 + ewarn 'and others) will work just fine.'
70 + fi
71 +}
72 +
73 +src_configure() {
74 + filter-flags -fomit-frame-pointer
75 + local myconf
76 + if use berkdb ; then
77 + if use gdbm ; then
78 + ewarn "Both gdbm and berkdb selected. Using gdbm."
79 + else
80 + myconf="--with-db=db"
81 + fi
82 + fi
83 + use gdbm && myconf="--with-db=gdbm"
84 + use debug && myconf+=" debug=true"
85 + use sqlite && myconf+=" --with-sqlite-libs"
86 +
87 + econf \
88 + --sysconfdir=/etc/courier \
89 + --datadir=/usr/share/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}-r2" "${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 +}