1 |
commit: e0a6c0b6ffa8267280c7532e253e83a3a1107db0 |
2 |
Author: Hanno Böck <hanno <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 10 16:22:09 2020 +0000 |
4 |
Commit: Hanno Böck <hanno <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 10 16:22:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0a6c0b6 |
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.6, Repoman-3.0.1 |
12 |
|
13 |
net-libs/courier-authlib/Manifest | 1 + |
14 |
.../courier-authlib/courier-authlib-0.71.0.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 c3aa495c3c3..fe589cd8d47 100644 |
19 |
--- a/net-libs/courier-authlib/Manifest |
20 |
+++ b/net-libs/courier-authlib/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST courier-authlib-0.69.0.tar.bz2 2197718 BLAKE2B 63c273a85983ce7bd57496eeefac51107e3132dc9eb372f199530dbf6c5a5ddde7f8ee285aa54a096002f9058dc7e1cd9eb1194e3d512ea19882f93b1147345a SHA512 c3806aa50d7ff13f75536064ec46028db3d5e1f4ef64692b5ece64810b4042ae0840bb346c73ae9d36f6113173f0e5e922356a178c10815640a26caa921e1614 |
23 |
DIST courier-authlib-0.70.0.tar.bz2 2183323 BLAKE2B ebf58f8c4e7b58766edc684ced590ea7bfa692eff19a483f4ab7748a73e96e1c66858985ac89e281205838660a72e9a33e3b3c28fce3f94d981b61ca56b1e2b1 SHA512 61ce62860cc7ceb51f255a0659bf9b8f4172d0c1c8aee06d9821144330f9526f54e6bdb0158f2fd754d6ad92fd4cc84306b949d46c92e8aed47a397023b36b65 |
24 |
+DIST courier-authlib-0.71.0.tar.bz2 2207895 BLAKE2B 8eb92b2c07acfb662b34a2234759a80f3a1b5a96c9e537cd6215bd9a9a607ed8995461dd599e4fe2698e70510f11815ad13a0511446303ae5e26ff616f05d92f SHA512 7a9700c472fd9d6942bd15dfd8db474a738817608bcd8106b6211b24cdc0631fd69f99e7a5c9e9f6088c16b53a9304ec429c031b16621f8ef52581af8a4256ec |
25 |
|
26 |
diff --git a/net-libs/courier-authlib/courier-authlib-0.71.0.ebuild b/net-libs/courier-authlib/courier-authlib-0.71.0.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..b76a874e6b5 |
29 |
--- /dev/null |
30 |
+++ b/net-libs/courier-authlib/courier-authlib-0.71.0.ebuild |
31 |
@@ -0,0 +1,148 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+inherit flag-o-matic |
37 |
+ |
38 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
39 |
+ |
40 |
+DESCRIPTION="Courier authentication library" |
41 |
+SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" |
42 |
+HOMEPAGE="https://www.courier-mta.org/authlib/" |
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-2.1 |
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? ( dev-db/mysql-connector-c ) |
57 |
+ pam? ( sys-libs/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 |
+ --localstatedir=/var/lib/courier \ |
90 |
+ --sharedstatedir=/var/lib/courier/com \ |
91 |
+ --with-authdaemonvar=/var/lib/courier/authdaemon \ |
92 |
+ --with-authshadow \ |
93 |
+ --without-redhat \ |
94 |
+ --with-mailuser=mail \ |
95 |
+ --with-mailgroup=mail \ |
96 |
+ --cache-file="${S}/configuring.cache" \ |
97 |
+ $(use_with pam authpam) \ |
98 |
+ $(use_with ldap authldap) \ |
99 |
+ $(use_with mysql authmysql) \ |
100 |
+ $(use_with postgres authpgsql) \ |
101 |
+ $(use_with sqlite authsqlite) \ |
102 |
+ ${myconf} |
103 |
+} |
104 |
+ |
105 |
+orderfirst() { |
106 |
+ file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}" |
107 |
+ if [[ -e "${file}" ]] ; then |
108 |
+ orig="$(grep ^${option}= ${file} | cut -d\" -f 2)" |
109 |
+ new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\"" |
110 |
+ sed -i -e "s/^${option}=.*$/${new}/" "${file}" || die |
111 |
+ fi |
112 |
+} |
113 |
+ |
114 |
+finduserdb() { |
115 |
+ for dir in \ |
116 |
+ /etc/courier/authlib /etc/courier /etc/courier-imap \ |
117 |
+ /usr/lib/courier/etc /usr/lib/courier-imap/etc \ |
118 |
+ /usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \ |
119 |
+ /usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \ |
120 |
+ /usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do |
121 |
+ if [[ -e "${dir}/userdb" ]] ; then |
122 |
+ einfo "Found userdb at: ${dir}/userdb" |
123 |
+ cp -fR "${dir}/userdb" "${D}/etc/courier/authlib/" || die |
124 |
+ chmod go-rwx "${D}/etc/courier/authlib/userdb" || die |
125 |
+ continue |
126 |
+ fi |
127 |
+ done |
128 |
+} |
129 |
+ |
130 |
+src_install() { |
131 |
+ diropts -o mail -g mail |
132 |
+ dodir /etc/courier |
133 |
+ keepdir /var/lib/courier/authdaemon |
134 |
+ keepdir /etc/courier/authlib |
135 |
+ emake DESTDIR="${D}" install |
136 |
+ [[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb |
137 |
+ emake DESTDIR="${D}" install-configure |
138 |
+ rm -f "${D}"/etc/courier/authlib/*.bak |
139 |
+ chown mail:mail "${D}"/etc/courier/authlib/* || die |
140 |
+ for y in "${D}"/etc/courier/authlib/*.dist ; do |
141 |
+ [[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}" |
142 |
+ done |
143 |
+ use pam && orderfirst authdaemonrc authmodulelist authpam |
144 |
+ use ldap && orderfirst authdaemonrc authmodulelist authldap |
145 |
+ use sqlite && orderfirst authdaemonrc authmodulelist authsqlite |
146 |
+ use postgres && orderfirst authdaemonrc authmodulelist authpgsql |
147 |
+ use mysql && orderfirst authdaemonrc authmodulelist authmysql |
148 |
+ |
149 |
+ DOCS=( AUTHORS ChangeLog* INSTALL NEWS README ) |
150 |
+ HTML_DOCS=( README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html ) |
151 |
+ if use mysql ; then |
152 |
+ DOCS+=( README.authmysql.myownquery ) |
153 |
+ HTML_DOCS+=( README.authmysql.html ) |
154 |
+ fi |
155 |
+ if use postgres ; then |
156 |
+ HTML_DOCS+=( README.authpostgres.html README.authmysql.html ) |
157 |
+ fi |
158 |
+ if use ldap ; then |
159 |
+ DOCS+=( README.ldap ) |
160 |
+ dodir /etc/openldap/schema |
161 |
+ cp -f authldap.schema "${D}/etc/openldap/schema/" || die |
162 |
+ fi |
163 |
+ if use sqlite ; then |
164 |
+ HTML_DOCS+=( README.authsqlite.html README.authmysql.html ) |
165 |
+ fi |
166 |
+ einstalldocs |
167 |
+ |
168 |
+ newinitd "${FILESDIR}/${PN}-r2" "${PN}" |
169 |
+ |
170 |
+ use static-libs || find "${D}" -name "*.a" -delete |
171 |
+} |
172 |
+ |
173 |
+pkg_postinst() { |
174 |
+ if [[ -e /etc/courier/authlib/userdb ]] ; then |
175 |
+ einfo "Running makeuserdb ..." |
176 |
+ chmod go-rwx /etc/courier/authlib/userdb || die |
177 |
+ makeuserdb |
178 |
+ fi |
179 |
+} |