Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/cyrus-sasl/
Date: Sun, 10 Feb 2019 00:19:16
Message-Id: 1549757933.70178eeac640150e47b27d441452c653615e6b46.grknight@gentoo
1 commit: 70178eeac640150e47b27d441452c653615e6b46
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 10 00:18:53 2019 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 10 00:18:53 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70178eea
7
8 dev-libs/cyrus-sasl: Fix mysql dependency
9
10 Non-maintainer commit
11
12 Bug: https://bugs.gentoo.org/665876
13 Package-Manager: Portage-2.3.59, Repoman-2.3.12
14 Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
15
16 dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild | 260 +++++++++++++++++++++++
17 dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r2.ebuild | 256 ++++++++++++++++++++++
18 2 files changed, 516 insertions(+)
19
20 diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild
21 new file mode 100644
22 index 00000000000..fd823635a6a
23 --- /dev/null
24 +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild
25 @@ -0,0 +1,260 @@
26 +# Copyright 1999-2019 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=6
30 +
31 +inherit flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd
32 +
33 +SASLAUTHD_CONF_VER="2.1.26"
34 +
35 +DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)"
36 +HOMEPAGE="https://www.cyrusimap.org/sasl/"
37 +SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
38 +
39 +LICENSE="BSD-with-attribution"
40 +SLOT="2"
41 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
42 +IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite
43 +srp ssl static-libs urandom"
44 +
45 +DEPEND="
46 + net-mail/mailbase
47 + authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) )
48 + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
49 + gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] )
50 + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
51 + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
52 + mysql? ( dev-db/mysql-connector-c:0=[${MULTILIB_USEDEP}] )
53 + pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] )
54 + postgres? ( dev-db/postgresql:* )
55 + sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] )
56 + ssl? (
57 + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
58 + libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
59 + )
60 + java? ( >=virtual/jdk-1.6:= )"
61 +
62 +RDEPEND="
63 + ${DEPEND}
64 + selinux? ( sec-policy/selinux-sasl )"
65 +
66 +MULTILIB_WRAPPED_HEADERS=(
67 + /usr/include/sasl/md5global.h
68 +)
69 +
70 +PATCHES=(
71 + "${FILESDIR}/${PN}-2.1.25-sasldb_al.patch"
72 + "${FILESDIR}/${PN}-2.1.25-saslauthd_libtool.patch"
73 + "${FILESDIR}/${PN}-2.1.25-avoid_pic_overwrite.patch"
74 + "${FILESDIR}/${PN}-2.1.25-autotools_fixes.patch"
75 + "${FILESDIR}/${PN}-2.1.25-as_needed.patch"
76 + "${FILESDIR}/${PN}-2.1.25-missing_header.patch"
77 + "${FILESDIR}/${PN}-2.1.25-fix_heimdal.patch"
78 + "${FILESDIR}/${PN}-2.1.25-auxprop.patch"
79 + "${FILESDIR}/${PN}-2.1.23-gss_c_nt_hostbased_service.patch"
80 + "${FILESDIR}/${PN}-2.1.25-service_keytabs.patch"
81 + "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch"
82 + "${FILESDIR}/${PN}-2.1.26-CVE-2013-4122.patch"
83 + "${FILESDIR}/${PN}-2.1.26-send-imap-logout.patch"
84 + "${FILESDIR}/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch"
85 + "${FILESDIR}/${PN}-2.1.26-fix_dovecot_authentication.patch"
86 + "${FILESDIR}/${PN}-2.1.26-openssl-1.1.patch" #592528
87 +)
88 +
89 +pkg_setup() {
90 + java-pkg-opt-2_pkg_setup
91 +}
92 +
93 +src_prepare() {
94 + default
95 +
96 + # Get rid of the -R switch (runpath_switch for Sun)
97 + # >=gcc-4.6 errors out with unknown option
98 + sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
99 + configure.in || die
100 +
101 + # Use plugindir for sasldir
102 + sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
103 + "${S}"/plugins/Makefile.{am,in} || die "sed failed"
104 +
105 + # #486740 #468556
106 + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
107 + -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
108 + configure.in || die
109 + sed -i -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
110 + saslauthd/configure.in || die
111 +
112 + eautoreconf
113 +}
114 +
115 +src_configure() {
116 + append-flags -fno-strict-aliasing
117 + if [[ ${CHOST} == *-solaris* ]] ; then
118 + # getpassphrase is defined in /usr/include/stdlib.h
119 + append-cppflags -DHAVE_GETPASSPHRASE
120 + else
121 + # this horrendously breaks things on Solaris
122 + append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
123 + fi
124 +
125 + multilib-minimal_src_configure
126 +}
127 +
128 +multilib_src_configure() {
129 + # Java support.
130 + multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
131 +
132 + local myeconfargs=(
133 + --enable-login
134 + --enable-ntlm
135 + --enable-auth-sasldb
136 + --disable-cmulocal
137 + --disable-krb4
138 + --disable-macos-framework
139 + --enable-otp
140 + --without-sqlite
141 + --with-saslauthd="${EPREFIX}"/run/saslauthd
142 + --with-pwcheck="${EPREFIX}"/run/saslauthd
143 + --with-configdir="${EPREFIX}"/etc/sasl2
144 + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2
145 + --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2
146 + $(use_with ssl openssl)
147 + $(use_with pam)
148 + $(use_with openldap ldap)
149 + $(use_enable ldapdb)
150 + $(multilib_native_use_enable sample)
151 + $(use_enable kerberos gssapi)
152 + $(multilib_native_use_enable java)
153 + $(multilib_native_use_with java javahome ${JAVA_HOME})
154 + $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr)
155 + $(multilib_native_use_with postgres pgsql "${EPREFIX}"/usr/$(get_libdir)/postgresql)
156 + $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir))
157 + $(use_enable srp)
158 + $(use_enable static-libs static)
159 +
160 + # Add authdaemond support (bug #56523).
161 + $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '')
162 +
163 + # Fix for bug #59634.
164 + $(usex ssl '' --without-des)
165 +
166 + # Use /dev/urandom instead of /dev/random (bug #46038).
167 + $(usex urandom --with-devrandom=/dev/urandom '')
168 + )
169 +
170 + if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then
171 + myeconfargs+=( --enable-sql )
172 + else
173 + myeconfargs+=( --disable-sql )
174 + fi
175 +
176 + # Default to GDBM if both 'gdbm' and 'berkdb' are present.
177 + if use gdbm ; then
178 + einfo "Building with GNU DB as database backend for your SASLdb"
179 + myeconfargs+=( --with-dblib=gdbm )
180 + elif use berkdb ; then
181 + einfo "Building with BerkeleyDB as database backend for your SASLdb"
182 + myeconfargs+=(
183 + --with-dblib=berkeley
184 + --with-bdb-incdir="$(db_includedir)"
185 + )
186 + else
187 + einfo "Building without SASLdb support"
188 + myeconfargs+=( --with-dblib=none )
189 + fi
190 +
191 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
192 +}
193 +
194 +multilib_src_compile() {
195 + emake
196 +
197 + # Default location for java classes breaks OpenOffice (bug #60769).
198 + # Thanks to axxo@g.o for the solution.
199 + if multilib_is_native_abi && use java ; then
200 + jar -cvf ${PN}.jar -C java $(find java -name "*.class")
201 + fi
202 +}
203 +
204 +multilib_src_install() {
205 + default
206 +
207 + if multilib_is_native_abi; then
208 + if use sample ; then
209 + docinto sample
210 + dodoc "${S}"/sample/*.c
211 + exeinto /usr/share/doc/${P}/sample
212 + doexe sample/client sample/server
213 + fi
214 +
215 + # Default location for java classes breaks OpenOffice (bug #60769).
216 + if use java; then
217 + java-pkg_dojar ${PN}.jar
218 + java-pkg_regso "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)"
219 + # hackish, don't wanna dig through makefile
220 + rm -rf "${ED}/usr/$(get_libdir)/java" || die
221 + docinto "java"
222 + dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
223 + dodir "/usr/share/doc/${PF}/java/Test"
224 + insinto "/usr/share/doc/${PF}/java/Test"
225 + doins "${S}"/java/Test/*.java
226 + fi
227 +
228 + dosbin saslauthd/testsaslauthd
229 + fi
230 +}
231 +
232 +multilib_src_install_all() {
233 + keepdir /etc/sasl2
234 +
235 + dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt
236 + newdoc pwcheck/README README.pwcheck
237 +
238 + docinto html
239 + dodoc doc/*.html
240 +
241 + docinto "saslauthd"
242 + dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README}
243 +
244 + newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd
245 +
246 + newinitd "${FILESDIR}/pwcheck.rc6" pwcheck
247 + systemd_dounit "${FILESDIR}/pwcheck.service"
248 +
249 + newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd
250 + newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd
251 + systemd_dounit "${FILESDIR}/saslauthd.service"
252 + systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
253 +
254 + # The get_modname bit is important: do not remove the .la files on
255 + # platforms where the lib isn't called .so for cyrus searches the .la to
256 + # figure out what the name is supposed to be instead
257 + if ! use static-libs && [[ $(get_modname) == .so ]] ; then
258 + find "${ED}" -name "*.la" -delete || die
259 + fi
260 +}
261 +
262 +pkg_postinst () {
263 + # Generate an empty sasldb2 with correct permissions.
264 + if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then
265 + einfo "Generating an empty sasldb2 with correct permissions ..."
266 + echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \
267 + || die "Failed to generate sasldb2"
268 + "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \
269 + || die "Failed to delete temp user"
270 + chown root:mail "${EROOT}/etc/sasl2/sasldb2" \
271 + || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2"
272 + chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \
273 + || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2"
274 + fi
275 +
276 + if use authdaemond ; then
277 + elog "You need to add a user running a service using Courier's"
278 + elog "authdaemon to the 'mail' group. For example, do:"
279 + elog " gpasswd -a postfix mail"
280 + elog "to add the 'postfix' user to the 'mail' group."
281 + fi
282 +
283 + elog "pwcheck and saslauthd home directories have moved to:"
284 + elog " /run/saslauthd, using tmpfiles.d"
285 +}
286
287 diff --git a/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r2.ebuild b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r2.ebuild
288 new file mode 100644
289 index 00000000000..b31b213093b
290 --- /dev/null
291 +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r2.ebuild
292 @@ -0,0 +1,256 @@
293 +# Copyright 1999-2019 Gentoo Authors
294 +# Distributed under the terms of the GNU General Public License v2
295 +
296 +EAPI=6
297 +
298 +inherit flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd eapi7-ver
299 +
300 +SASLAUTHD_CONF_VER="2.1.26"
301 +
302 +DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)"
303 +HOMEPAGE="https://www.cyrusimap.org/sasl/"
304 +#SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz"
305 +SRC_URI="https://github.com/cyrusimap/${PN}/releases/download/${P}/${P}.tar.gz"
306 +
307 +LICENSE="BSD-with-attribution"
308 +SLOT="2"
309 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
310 +IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite srp ssl static-libs urandom"
311 +
312 +CDEPEND="
313 + net-mail/mailbase
314 + authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) )
315 + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] )
316 + gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] )
317 + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
318 + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
319 + mysql? ( dev-db/mysql-connector-c:0=[${MULTILIB_USEDEP}] )
320 + pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] )
321 + postgres? ( dev-db/postgresql:* )
322 + sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] )
323 + ssl? (
324 + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
325 + libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
326 + )
327 + java? ( >=virtual/jdk-1.6:= )"
328 +
329 +RDEPEND="
330 + ${CDEPEND}
331 + selinux? ( sec-policy/selinux-sasl )"
332 +
333 +DEPEND="${CDEPEND}"
334 +
335 +MULTILIB_WRAPPED_HEADERS=(
336 + /usr/include/sasl/md5global.h
337 +)
338 +
339 +PATCHES=(
340 + "${FILESDIR}/${PN}-2.1.27-avoid_pic_overwrite.patch"
341 + "${FILESDIR}/${PN}-2.1.27-autotools_fixes.patch"
342 + "${FILESDIR}/${PN}-2.1.27-as_needed.patch"
343 + "${FILESDIR}/${PN}-2.1.25-auxprop.patch"
344 + "${FILESDIR}/${PN}-2.1.27-gss_c_nt_hostbased_service.patch"
345 + "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch"
346 + "${FILESDIR}/${PN}-2.1.27-doc_build_fix.patch"
347 + "${FILESDIR}/${PN}-2.1.27-memmem.patch"
348 +)
349 +
350 +pkg_setup() {
351 + java-pkg-opt-2_pkg_setup
352 +}
353 +
354 +src_prepare() {
355 + default
356 +
357 + # Get rid of the -R switch (runpath_switch for Sun)
358 + # >=gcc-4.6 errors out with unknown option
359 + sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
360 + configure.ac || die
361 +
362 + # Use plugindir for sasldir
363 + sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
364 + "${S}"/plugins/Makefile.{am,in} || die "sed failed"
365 +
366 + # #486740 #468556
367 + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
368 + -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
369 + configure.ac || die
370 +
371 + eautoreconf
372 +}
373 +
374 +src_configure() {
375 + append-flags -fno-strict-aliasing
376 + if [[ ${CHOST} == *-solaris* ]] ; then
377 + # getpassphrase is defined in /usr/include/stdlib.h
378 + append-cppflags -DHAVE_GETPASSPHRASE
379 + else
380 + # this horrendously breaks things on Solaris
381 + append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
382 + fi
383 +
384 + multilib-minimal_src_configure
385 +}
386 +
387 +multilib_src_configure() {
388 + # Java support.
389 + multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
390 +
391 + local myeconfargs=(
392 + --enable-login
393 + --enable-ntlm
394 + --enable-auth-sasldb
395 + --disable-cmulocal
396 + --disable-krb4
397 + --disable-macos-framework
398 + --enable-otp
399 + --without-sqlite
400 + --with-saslauthd="${EPREFIX}"/run/saslauthd
401 + --with-pwcheck="${EPREFIX}"/run/saslauthd
402 + --with-configdir="${EPREFIX}"/etc/sasl2
403 + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2
404 + --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2
405 + --with-sphinx-build=no
406 + $(use_with ssl openssl)
407 + $(use_with pam)
408 + $(use_with openldap ldap)
409 + $(use_enable ldapdb)
410 + $(multilib_native_use_enable sample)
411 + $(use_enable kerberos gssapi)
412 + $(multilib_native_use_enable java)
413 + $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr)
414 + $(multilib_native_use_with postgres pgsql "${EPREFIX}"/usr/$(get_libdir)/postgresql)
415 + $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir))
416 + $(use_enable srp)
417 + $(use_enable static-libs static)
418 +
419 + # Add authdaemond support (bug #56523).
420 + $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '')
421 +
422 + # Fix for bug #59634.
423 + $(usex ssl '' --without-des)
424 +
425 + # Use /dev/urandom instead of /dev/random (bug #46038).
426 + $(usex urandom --with-devrandom=/dev/urandom '')
427 + )
428 +
429 + if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then
430 + myeconfargs+=( --enable-sql )
431 + else
432 + myeconfargs+=( --disable-sql )
433 + fi
434 +
435 + # Default to GDBM if both 'gdbm' and 'berkdb' are present.
436 + if use gdbm ; then
437 + einfo "Building with GNU DB as database backend for your SASLdb"
438 + myeconfargs+=( --with-dblib=gdbm )
439 + elif use berkdb ; then
440 + einfo "Building with BerkeleyDB as database backend for your SASLdb"
441 + myeconfargs+=(
442 + --with-dblib=berkeley
443 + --with-bdb-incdir="$(db_includedir)"
444 + )
445 + else
446 + einfo "Building without SASLdb support"
447 + myeconfargs+=( --with-dblib=none )
448 + fi
449 +
450 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
451 +}
452 +
453 +multilib_src_compile() {
454 + emake
455 +
456 + # Default location for java classes breaks OpenOffice (bug #60769).
457 + # Thanks to axxo@g.o for the solution.
458 + if multilib_is_native_abi && use java ; then
459 + jar -cvf ${PN}.jar -C java $(find java -name "*.class")
460 + fi
461 +}
462 +
463 +multilib_src_install() {
464 + default
465 +
466 + if multilib_is_native_abi; then
467 + if use sample ; then
468 + docinto sample
469 + dodoc "${S}"/sample/*.c
470 + exeinto /usr/share/doc/${P}/sample
471 + doexe sample/client sample/server
472 + fi
473 +
474 + # Default location for java classes breaks OpenOffice (bug #60769).
475 + if use java; then
476 + java-pkg_dojar ${PN}.jar
477 + java-pkg_regso "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)"
478 + # hackish, don't wanna dig through makefile
479 + rm -rf "${ED}/usr/$(get_libdir)/java" || die
480 + docinto "java"
481 + dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
482 + dodir "/usr/share/doc/${PF}/java/Test"
483 + insinto "/usr/share/doc/${PF}/java/Test"
484 + doins "${S}"/java/Test/*.java
485 + fi
486 +
487 + dosbin saslauthd/testsaslauthd
488 + fi
489 +}
490 +
491 +multilib_src_install_all() {
492 + doman man/*
493 +
494 + keepdir /etc/sasl2
495 +
496 + # Reset docinto to default value (#674296)
497 + docinto
498 + dodoc AUTHORS ChangeLog doc/legacy/TODO
499 + newdoc pwcheck/README README.pwcheck
500 +
501 + newdoc docsrc/sasl/release-notes/$(ver_cut 1-2)/index.rst release-notes
502 + edos2unix ${ED%/}/usr/share/doc/${PF}/release-notes
503 +
504 + docinto html
505 + dodoc doc/html/*.html
506 +
507 + newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd
508 +
509 + newinitd "${FILESDIR}/pwcheck.rc6" pwcheck
510 + systemd_dounit "${FILESDIR}/pwcheck.service"
511 +
512 + newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd
513 + newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd
514 + systemd_dounit "${FILESDIR}/saslauthd.service"
515 + systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
516 +
517 + # The get_modname bit is important: do not remove the .la files on
518 + # platforms where the lib isn't called .so for cyrus searches the .la to
519 + # figure out what the name is supposed to be instead
520 + if ! use static-libs && [[ $(get_modname) == .so ]] ; then
521 + find "${ED}" -name "*.la" -delete || die
522 + fi
523 +}
524 +
525 +pkg_postinst () {
526 + # Generate an empty sasldb2 with correct permissions.
527 + if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then
528 + einfo "Generating an empty sasldb2 with correct permissions ..."
529 + echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \
530 + || die "Failed to generate sasldb2"
531 + "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \
532 + || die "Failed to delete temp user"
533 + chown root:mail "${EROOT}/etc/sasl2/sasldb2" \
534 + || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2"
535 + chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \
536 + || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2"
537 + fi
538 +
539 + if use authdaemond ; then
540 + elog "You need to add a user running a service using Courier's"
541 + elog "authdaemon to the 'mail' group. For example, do:"
542 + elog " gpasswd -a postfix mail"
543 + elog "to add the 'postfix' user to the 'mail' group."
544 + fi
545 +
546 + elog "pwcheck and saslauthd home directories have moved to:"
547 + elog " /run/saslauthd, using tmpfiles.d"
548 +}