From 6bc2e4d7c5906e46a8f275a876ead6ec41aca5bb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 10 Feb 2019 15:40:27 +0000 Subject: gentoo resync : 10.02.2019 --- dev-libs/cyrus-sasl/Manifest | 2 + dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild | 260 +++++++++++++++++++++++ dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r2.ebuild | 256 ++++++++++++++++++++++ 3 files changed, 518 insertions(+) create mode 100644 dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild create mode 100644 dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r2.ebuild (limited to 'dev-libs/cyrus-sasl') diff --git a/dev-libs/cyrus-sasl/Manifest b/dev-libs/cyrus-sasl/Manifest index e905d04c9f22..ca591649cf36 100644 --- a/dev-libs/cyrus-sasl/Manifest +++ b/dev-libs/cyrus-sasl/Manifest @@ -32,6 +32,8 @@ DIST cyrus-sasl-2.1.26.tar.gz 5220231 BLAKE2B 08fe5c1624e7cccb4b5e562f6987fddd04 DIST cyrus-sasl-2.1.27.tar.gz 4111249 BLAKE2B 82c9acce8534521ce5c5806f093e927f1854b4bc4b83ea7db1b32ceaa811adc1a5b6fc16d03233d729194cd603836f6e58de67f915abab2cb74561a80d03f5a8 SHA512 d11549a99b3b06af79fc62d5478dba3305d7e7cc0824f4b91f0d2638daafbe940623eab235f85af9be38dcf5d42fc131db531c177040a85187aee5096b8df63b EBUILD cyrus-sasl-2.1.26-r10.ebuild 7743 BLAKE2B 26b36b8f68ae6af768e41dba4b7946c814411c70fab471dc9c93dc1487d39079306a1e3eb768920720dc7369883804a0b2a92b8a3c1ed6c997879001ea198eb6 SHA512 2b3f5221dfd76f463642ba9fee1d983c383bd9e490dda8cf41ab63e1f63723866faba25bb2042bc35ab954fb4021d9e2450c99da778185c92aa1527dd53eb9e7 EBUILD cyrus-sasl-2.1.26-r12.ebuild 8431 BLAKE2B 0b769d0f97c9607da49eb82b57203513d7f3c8a82c410085c487f39a54706741700025164188dcef9a8b4622c7491ea995e8c33f374b893044a4a608dca3e1c3 SHA512 741e51ddbe4393927fd637ef84d953126c5fc2c5a877077113e36973239cfd3b0879d20c69dafc74a8b108ba363bc8e87db8bfd533da818ede78f20010efdc5e +EBUILD cyrus-sasl-2.1.26-r13.ebuild 8465 BLAKE2B 48ad450be4078bea4077b8e22d664eab654136b264af31cd08037d78846d4989d3ca16d31123cbd266af0e62f29b0b5017a26dad4673fe56dac61a6e5519edd0 SHA512 80635f22cebf55ab59ae7575d3ea3e6eeeffaee25ad452577ef5af16c04eb9c5dbf300cd824814c09dfe701415b19343951dea40b8cbe957de848693c2d609b9 EBUILD cyrus-sasl-2.1.26-r9.ebuild 7662 BLAKE2B 8a7b96ca43d133164a9818727486f2d15bd6f66d66e083dee2ac0a8d83c921a86e3e1f34dfa04689c81b5227cf80f06d1fea3c1da74b48c828e4a31f51b67c9e SHA512 6515a66682bc8c0d18b13a3cc540d00f07d26374a6bbefdcb6c974b3184164cfcce80e965b29bc10e81345e2abb8c04eb7edb21adf4097af741d5df1557ae04d EBUILD cyrus-sasl-2.1.27-r1.ebuild 8080 BLAKE2B e5ec4df72f32f8e29cb06fe0ab9015dfdc906721065ea09d1a625b04687a02cdcdf93df8aa1661849d8341c3a9432d49fbf052f3f9adbaf8d59e1e0827503cec SHA512 345fe84f61ff18b8fb6917d264db8db552d029937d9de242cfc6df0c36e2728d02bac6a7c7a1975b64ffdf1e0922da27339304b9fa5984689382b2650c94ac0a +EBUILD cyrus-sasl-2.1.27-r2.ebuild 8114 BLAKE2B b396d82febfbb4838a19264810cce829f6b1e1cb58782ddfbb5112ab2fda5acbfe41742f2dfd5d3620359ee7a396c7551f3bb10feefba489fa8870503984ba3f SHA512 002dcb256b34b9af1d0cd1c7b292f96fd8d3e7f9a6268a6d5d03bdffb176f6b8db364769f77f5caa14d5069aa25dc1462e1b32b4e8a89532c2c2993e318a5068 MISC metadata.xml 706 BLAKE2B a5682e5daac9c1a7a3a021989ae9ca856bb08c9eb0ba3a71070b7150cccc7ddfcd1d3d0fe1df33e688d0223ab7fb760ae028e4753523b28a4cedcb625c899d73 SHA512 1e7495deff4727296d29b25b7af535c0b36054b9172763ca8634b40f324dbc33697424a7e5565791c3131def3708c9ffb7e3e2362cbd8b334d650921fc2291ce 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 new file mode 100644 index 000000000000..fd823635a6a8 --- /dev/null +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.26-r13.ebuild @@ -0,0 +1,260 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd + +SASLAUTHD_CONF_VER="2.1.26" + +DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)" +HOMEPAGE="https://www.cyrusimap.org/sasl/" +SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz" + +LICENSE="BSD-with-attribution" +SLOT="2" +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" +IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite +srp ssl static-libs urandom" + +DEPEND=" + net-mail/mailbase + authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) ) + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] ) + gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] ) + mysql? ( dev-db/mysql-connector-c:0=[${MULTILIB_USEDEP}] ) + pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] ) + ) + java? ( >=virtual/jdk-1.6:= )" + +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-sasl )" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/sasl/md5global.h +) + +PATCHES=( + "${FILESDIR}/${PN}-2.1.25-sasldb_al.patch" + "${FILESDIR}/${PN}-2.1.25-saslauthd_libtool.patch" + "${FILESDIR}/${PN}-2.1.25-avoid_pic_overwrite.patch" + "${FILESDIR}/${PN}-2.1.25-autotools_fixes.patch" + "${FILESDIR}/${PN}-2.1.25-as_needed.patch" + "${FILESDIR}/${PN}-2.1.25-missing_header.patch" + "${FILESDIR}/${PN}-2.1.25-fix_heimdal.patch" + "${FILESDIR}/${PN}-2.1.25-auxprop.patch" + "${FILESDIR}/${PN}-2.1.23-gss_c_nt_hostbased_service.patch" + "${FILESDIR}/${PN}-2.1.25-service_keytabs.patch" + "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch" + "${FILESDIR}/${PN}-2.1.26-CVE-2013-4122.patch" + "${FILESDIR}/${PN}-2.1.26-send-imap-logout.patch" + "${FILESDIR}/${PN}-2.1.26-canonuser-ldapdb-garbage-in-out-buffer.patch" + "${FILESDIR}/${PN}-2.1.26-fix_dovecot_authentication.patch" + "${FILESDIR}/${PN}-2.1.26-openssl-1.1.patch" #592528 +) + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default + + # Get rid of the -R switch (runpath_switch for Sun) + # >=gcc-4.6 errors out with unknown option + sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \ + configure.in || die + + # Use plugindir for sasldir + sed -i '/^sasldir =/s:=.*:= $(plugindir):' \ + "${S}"/plugins/Makefile.{am,in} || die "sed failed" + + # #486740 #468556 + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \ + -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \ + configure.in || die + sed -i -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \ + saslauthd/configure.in || die + + eautoreconf +} + +src_configure() { + append-flags -fno-strict-aliasing + if [[ ${CHOST} == *-solaris* ]] ; then + # getpassphrase is defined in /usr/include/stdlib.h + append-cppflags -DHAVE_GETPASSPHRASE + else + # this horrendously breaks things on Solaris + append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # Java support. + multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}" + + local myeconfargs=( + --enable-login + --enable-ntlm + --enable-auth-sasldb + --disable-cmulocal + --disable-krb4 + --disable-macos-framework + --enable-otp + --without-sqlite + --with-saslauthd="${EPREFIX}"/run/saslauthd + --with-pwcheck="${EPREFIX}"/run/saslauthd + --with-configdir="${EPREFIX}"/etc/sasl2 + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2 + --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2 + $(use_with ssl openssl) + $(use_with pam) + $(use_with openldap ldap) + $(use_enable ldapdb) + $(multilib_native_use_enable sample) + $(use_enable kerberos gssapi) + $(multilib_native_use_enable java) + $(multilib_native_use_with java javahome ${JAVA_HOME}) + $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr) + $(multilib_native_use_with postgres pgsql "${EPREFIX}"/usr/$(get_libdir)/postgresql) + $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir)) + $(use_enable srp) + $(use_enable static-libs static) + + # Add authdaemond support (bug #56523). + $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '') + + # Fix for bug #59634. + $(usex ssl '' --without-des) + + # Use /dev/urandom instead of /dev/random (bug #46038). + $(usex urandom --with-devrandom=/dev/urandom '') + ) + + if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then + myeconfargs+=( --enable-sql ) + else + myeconfargs+=( --disable-sql ) + fi + + # Default to GDBM if both 'gdbm' and 'berkdb' are present. + if use gdbm ; then + einfo "Building with GNU DB as database backend for your SASLdb" + myeconfargs+=( --with-dblib=gdbm ) + elif use berkdb ; then + einfo "Building with BerkeleyDB as database backend for your SASLdb" + myeconfargs+=( + --with-dblib=berkeley + --with-bdb-incdir="$(db_includedir)" + ) + else + einfo "Building without SASLdb support" + myeconfargs+=( --with-dblib=none ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake + + # Default location for java classes breaks OpenOffice (bug #60769). + # Thanks to axxo@gentoo.org for the solution. + if multilib_is_native_abi && use java ; then + jar -cvf ${PN}.jar -C java $(find java -name "*.class") + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi; then + if use sample ; then + docinto sample + dodoc "${S}"/sample/*.c + exeinto /usr/share/doc/${P}/sample + doexe sample/client sample/server + fi + + # Default location for java classes breaks OpenOffice (bug #60769). + if use java; then + java-pkg_dojar ${PN}.jar + java-pkg_regso "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)" + # hackish, don't wanna dig through makefile + rm -rf "${ED}/usr/$(get_libdir)/java" || die + docinto "java" + dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/* + dodir "/usr/share/doc/${PF}/java/Test" + insinto "/usr/share/doc/${PF}/java/Test" + doins "${S}"/java/Test/*.java + fi + + dosbin saslauthd/testsaslauthd + fi +} + +multilib_src_install_all() { + keepdir /etc/sasl2 + + dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt + newdoc pwcheck/README README.pwcheck + + docinto html + dodoc doc/*.html + + docinto "saslauthd" + dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README} + + newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd + + newinitd "${FILESDIR}/pwcheck.rc6" pwcheck + systemd_dounit "${FILESDIR}/pwcheck.service" + + newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd + newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd + systemd_dounit "${FILESDIR}/saslauthd.service" + systemd_dotmpfilesd "${FILESDIR}/${PN}.conf" + + # The get_modname bit is important: do not remove the .la files on + # platforms where the lib isn't called .so for cyrus searches the .la to + # figure out what the name is supposed to be instead + if ! use static-libs && [[ $(get_modname) == .so ]] ; then + find "${ED}" -name "*.la" -delete || die + fi +} + +pkg_postinst () { + # Generate an empty sasldb2 with correct permissions. + if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then + einfo "Generating an empty sasldb2 with correct permissions ..." + echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \ + || die "Failed to generate sasldb2" + "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \ + || die "Failed to delete temp user" + chown root:mail "${EROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2" + chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2" + fi + + if use authdaemond ; then + elog "You need to add a user running a service using Courier's" + elog "authdaemon to the 'mail' group. For example, do:" + elog " gpasswd -a postfix mail" + elog "to add the 'postfix' user to the 'mail' group." + fi + + elog "pwcheck and saslauthd home directories have moved to:" + elog " /run/saslauthd, using tmpfiles.d" +} 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 new file mode 100644 index 000000000000..b31b213093bc --- /dev/null +++ b/dev-libs/cyrus-sasl/cyrus-sasl-2.1.27-r2.ebuild @@ -0,0 +1,256 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic multilib multilib-minimal autotools pam java-pkg-opt-2 db-use systemd eapi7-ver + +SASLAUTHD_CONF_VER="2.1.26" + +DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)" +HOMEPAGE="https://www.cyrusimap.org/sasl/" +#SRC_URI="ftp://ftp.cyrusimap.org/cyrus-sasl/${P}.tar.gz" +SRC_URI="https://github.com/cyrusimap/${PN}/releases/download/${P}/${P}.tar.gz" + +LICENSE="BSD-with-attribution" +SLOT="2" +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" +IUSE="authdaemond berkdb gdbm kerberos ldapdb libressl openldap mysql pam postgres sample selinux sqlite srp ssl static-libs urandom" + +CDEPEND=" + net-mail/mailbase + authdaemond? ( || ( net-mail/courier-imap mail-mta/courier ) ) + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] ) + gdbm? ( >=sys-libs/gdbm-1.10-r1:=[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] ) + mysql? ( dev-db/mysql-connector-c:0=[${MULTILIB_USEDEP}] ) + pam? ( >=virtual/pam-0-r1[${MULTILIB_USEDEP}] ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}] ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] ) + ) + java? ( >=virtual/jdk-1.6:= )" + +RDEPEND=" + ${CDEPEND} + selinux? ( sec-policy/selinux-sasl )" + +DEPEND="${CDEPEND}" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/sasl/md5global.h +) + +PATCHES=( + "${FILESDIR}/${PN}-2.1.27-avoid_pic_overwrite.patch" + "${FILESDIR}/${PN}-2.1.27-autotools_fixes.patch" + "${FILESDIR}/${PN}-2.1.27-as_needed.patch" + "${FILESDIR}/${PN}-2.1.25-auxprop.patch" + "${FILESDIR}/${PN}-2.1.27-gss_c_nt_hostbased_service.patch" + "${FILESDIR}/${PN}-2.1.26-missing-size_t.patch" + "${FILESDIR}/${PN}-2.1.27-doc_build_fix.patch" + "${FILESDIR}/${PN}-2.1.27-memmem.patch" +) + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default + + # Get rid of the -R switch (runpath_switch for Sun) + # >=gcc-4.6 errors out with unknown option + sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \ + configure.ac || die + + # Use plugindir for sasldir + sed -i '/^sasldir =/s:=.*:= $(plugindir):' \ + "${S}"/plugins/Makefile.{am,in} || die "sed failed" + + # #486740 #468556 + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \ + -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \ + configure.ac || die + + eautoreconf +} + +src_configure() { + append-flags -fno-strict-aliasing + if [[ ${CHOST} == *-solaris* ]] ; then + # getpassphrase is defined in /usr/include/stdlib.h + append-cppflags -DHAVE_GETPASSPHRASE + else + # this horrendously breaks things on Solaris + append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # Java support. + multilib_is_native_abi && use java && export JAVAC="${JAVAC} ${JAVACFLAGS}" + + local myeconfargs=( + --enable-login + --enable-ntlm + --enable-auth-sasldb + --disable-cmulocal + --disable-krb4 + --disable-macos-framework + --enable-otp + --without-sqlite + --with-saslauthd="${EPREFIX}"/run/saslauthd + --with-pwcheck="${EPREFIX}"/run/saslauthd + --with-configdir="${EPREFIX}"/etc/sasl2 + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sasl2 + --with-dbpath="${EPREFIX}"/etc/sasl2/sasldb2 + --with-sphinx-build=no + $(use_with ssl openssl) + $(use_with pam) + $(use_with openldap ldap) + $(use_enable ldapdb) + $(multilib_native_use_enable sample) + $(use_enable kerberos gssapi) + $(multilib_native_use_enable java) + $(multilib_native_use_with mysql mysql "${EPREFIX}"/usr) + $(multilib_native_use_with postgres pgsql "${EPREFIX}"/usr/$(get_libdir)/postgresql) + $(use_with sqlite sqlite3 "${EPREFIX}"/usr/$(get_libdir)) + $(use_enable srp) + $(use_enable static-libs static) + + # Add authdaemond support (bug #56523). + $(usex authdaemond --with-authdaemond="${EPREFIX}"/var/lib/courier/authdaemon/socket '') + + # Fix for bug #59634. + $(usex ssl '' --without-des) + + # Use /dev/urandom instead of /dev/random (bug #46038). + $(usex urandom --with-devrandom=/dev/urandom '') + ) + + if use sqlite || { multilib_is_native_abi && { use mysql || use postgres; }; } ; then + myeconfargs+=( --enable-sql ) + else + myeconfargs+=( --disable-sql ) + fi + + # Default to GDBM if both 'gdbm' and 'berkdb' are present. + if use gdbm ; then + einfo "Building with GNU DB as database backend for your SASLdb" + myeconfargs+=( --with-dblib=gdbm ) + elif use berkdb ; then + einfo "Building with BerkeleyDB as database backend for your SASLdb" + myeconfargs+=( + --with-dblib=berkeley + --with-bdb-incdir="$(db_includedir)" + ) + else + einfo "Building without SASLdb support" + myeconfargs+=( --with-dblib=none ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake + + # Default location for java classes breaks OpenOffice (bug #60769). + # Thanks to axxo@gentoo.org for the solution. + if multilib_is_native_abi && use java ; then + jar -cvf ${PN}.jar -C java $(find java -name "*.class") + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi; then + if use sample ; then + docinto sample + dodoc "${S}"/sample/*.c + exeinto /usr/share/doc/${P}/sample + doexe sample/client sample/server + fi + + # Default location for java classes breaks OpenOffice (bug #60769). + if use java; then + java-pkg_dojar ${PN}.jar + java-pkg_regso "${ED}/usr/$(get_libdir)/libjavasasl$(get_libname)" + # hackish, don't wanna dig through makefile + rm -rf "${ED}/usr/$(get_libdir)/java" || die + docinto "java" + dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/* + dodir "/usr/share/doc/${PF}/java/Test" + insinto "/usr/share/doc/${PF}/java/Test" + doins "${S}"/java/Test/*.java + fi + + dosbin saslauthd/testsaslauthd + fi +} + +multilib_src_install_all() { + doman man/* + + keepdir /etc/sasl2 + + # Reset docinto to default value (#674296) + docinto + dodoc AUTHORS ChangeLog doc/legacy/TODO + newdoc pwcheck/README README.pwcheck + + newdoc docsrc/sasl/release-notes/$(ver_cut 1-2)/index.rst release-notes + edos2unix ${ED%/}/usr/share/doc/${PF}/release-notes + + docinto html + dodoc doc/html/*.html + + newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd + + newinitd "${FILESDIR}/pwcheck.rc6" pwcheck + systemd_dounit "${FILESDIR}/pwcheck.service" + + newinitd "${FILESDIR}/saslauthd2.rc7" saslauthd + newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd + systemd_dounit "${FILESDIR}/saslauthd.service" + systemd_dotmpfilesd "${FILESDIR}/${PN}.conf" + + # The get_modname bit is important: do not remove the .la files on + # platforms where the lib isn't called .so for cyrus searches the .la to + # figure out what the name is supposed to be instead + if ! use static-libs && [[ $(get_modname) == .so ]] ; then + find "${ED}" -name "*.la" -delete || die + fi +} + +pkg_postinst () { + # Generate an empty sasldb2 with correct permissions. + if ( use berkdb || use gdbm ) && [[ ! -f "${EROOT}/etc/sasl2/sasldb2" ]] ; then + einfo "Generating an empty sasldb2 with correct permissions ..." + echo "p" | "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -p login \ + || die "Failed to generate sasldb2" + "${EROOT}/usr/sbin/saslpasswd2" -f "${EROOT}/etc/sasl2/sasldb2" -d login \ + || die "Failed to delete temp user" + chown root:mail "${EROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chown ${EROOT}/etc/sasl2/sasldb2" + chmod 0640 "${EROOT}/etc/sasl2/sasldb2" \ + || die "Failed to chmod ${EROOT}/etc/sasl2/sasldb2" + fi + + if use authdaemond ; then + elog "You need to add a user running a service using Courier's" + elog "authdaemon to the 'mail' group. For example, do:" + elog " gpasswd -a postfix mail" + elog "to add the 'postfix' user to the 'mail' group." + fi + + elog "pwcheck and saslauthd home directories have moved to:" + elog " /run/saslauthd, using tmpfiles.d" +} -- cgit v1.2.3