From 401101f9c8077911929d3f2b60a37098460a5d89 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 24 Mar 2022 23:59:54 +0000 Subject: gentoo resync : 25.03.2022 --- net-libs/courier-authlib/Manifest | 4 +- .../courier-authlib-0.71.0-r3.ebuild | 148 --------------------- .../courier-authlib-0.71.0-r4.ebuild | 148 +++++++++++++++++++++ .../courier-authlib-0.71.3-r1.ebuild | 148 --------------------- .../courier-authlib-0.71.3-r2.ebuild | 148 +++++++++++++++++++++ 5 files changed, 298 insertions(+), 298 deletions(-) delete mode 100644 net-libs/courier-authlib/courier-authlib-0.71.0-r3.ebuild create mode 100644 net-libs/courier-authlib/courier-authlib-0.71.0-r4.ebuild delete mode 100644 net-libs/courier-authlib/courier-authlib-0.71.3-r1.ebuild create mode 100644 net-libs/courier-authlib/courier-authlib-0.71.3-r2.ebuild (limited to 'net-libs/courier-authlib') diff --git a/net-libs/courier-authlib/Manifest b/net-libs/courier-authlib/Manifest index 1cd1a3e8b62f..c1fa42aa2d9d 100644 --- a/net-libs/courier-authlib/Manifest +++ b/net-libs/courier-authlib/Manifest @@ -1,6 +1,6 @@ AUX courier-authlib-r2 978 BLAKE2B e49effed437cc9fd76404054e014a87bf2a207c68c1a440293d73da748d423aca137031a2b043e832f5009f2384f3f7ae352c2d10dfccfeb6082fd42aa1513bb SHA512 8681f041431150027f41058ae8dd5fb2105a74caecb096aef42b1f0e255026c2f8509d9f688f2725ab1e12b792604cb481a95a6eeb177967c16ae5e3390f44d4 DIST courier-authlib-0.71.0.tar.bz2 2207895 BLAKE2B 8eb92b2c07acfb662b34a2234759a80f3a1b5a96c9e537cd6215bd9a9a607ed8995461dd599e4fe2698e70510f11815ad13a0511446303ae5e26ff616f05d92f SHA512 7a9700c472fd9d6942bd15dfd8db474a738817608bcd8106b6211b24cdc0631fd69f99e7a5c9e9f6088c16b53a9304ec429c031b16621f8ef52581af8a4256ec DIST courier-authlib-0.71.3.tar.bz2 2208794 BLAKE2B 4b0f56f066368383d471dd8f46941f7b652a87be939ba6319cf99115991c03dd117d6bc246cc802fa7066ce5c75aaa102c59ae397948dd31ddbbb024059566ef SHA512 02c55ff1a91aac581942f8a4a01edd2bb8e2e1a07faf551d40a97583ce2f6eab12e850e3170df255c1e7680a34e418784ec14bb033825d6bac21192ae37ce55d -EBUILD courier-authlib-0.71.0-r3.ebuild 4444 BLAKE2B 29edcd353d2d1a45c3404c6b83aba0545b0dfbc3ecb4a2bcdc3c780b1b243da6a2e4d9d19b46c015a5a4b1c0701b3ed49888bd6a2e642767071eae23951a8ae8 SHA512 880a8e090c1e00b727135823de254fedbe3994514f37ff530adc9ca3a68519ed38a874cb189cf62c4c59dd2740bbb4c4795762a002e6c8b3deab4be8f2a4b279 -EBUILD courier-authlib-0.71.3-r1.ebuild 4455 BLAKE2B 77c3e47af105ad0d11d13f77e5578464393d414b5ec3fb9fd173e865818ec1eb1a4bed9f469d9d1f0ef5812abb218acb003abe0c0e12467a75ceac3c3cb62d8f SHA512 0aba06a057f4de4f6e8ff6281aca56c391705f26fc060e1f5107bacded5a6b28a239524ce3cfcdda13ace5a1db66d793ac566a8943425f0dd8d707ce02af4494 +EBUILD courier-authlib-0.71.0-r4.ebuild 4446 BLAKE2B 9d0042f3e6c65a735532eb7b0b30223d01d49b7c6197ef88511f734d6b7af9b779c46761eea445420f6ac27ad254b0cf7eff850b99f1c5a69a855341d976a334 SHA512 8f708363dc3519931ae0854543b9060d0209181a5e01c65ea6d2d4f6024043ba7f66bd95815f75f4d9eb6d02e13a32385792461da5ca741553187f4de64ec054 +EBUILD courier-authlib-0.71.3-r2.ebuild 4457 BLAKE2B 54e9a672c2e6c97cdf8c8b411433cd109ea957f49c055d838141798c861b48ee5ae123f9cd92931cd0b5c24908395226ce66ea4e548e94b24d84586eb30820ba SHA512 832d5a1922ead2969ec026929aad0e4e159e65586cf3b472104774637903011ff89baab34dbd2ae1ce4db11551cef98fbf73639086f7aeb3b8942c09fb091110 MISC metadata.xml 302 BLAKE2B f4a6bbc1e616a769172499ca1f863a8e43d608e25d2a99a6384fd0a0880e4e23f2c64c97404ad80ae12c3cd23eda5854ded0ed2c9000875c701aa22ff70b9e80 SHA512 3f25d55e6f6169b696d210cfbd7df486337885cd0905b62d307e6b3fd1595ac1471dccb59794ecfe0bbcd009339348ef7bb9debb4752533d1b28043cb5d1f918 diff --git a/net-libs/courier-authlib/courier-authlib-0.71.0-r3.ebuild b/net-libs/courier-authlib/courier-authlib-0.71.0-r3.ebuild deleted file mode 100644 index 741f18b564d2..000000000000 --- a/net-libs/courier-authlib/courier-authlib-0.71.0-r3.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic - -DESCRIPTION="Courier authentication library" -SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" -HOMEPAGE="https://www.courier-mta.org/authlib/" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ppc64 ~s390 sparc x86" -IUSE="berkdb debug gdbm ldap mysql pam postgres sqlite static-libs" - -RESTRICT="!berkdb? ( test )" - -DEPEND="net-mail/mailbase - >=net-libs/courier-unicode-2.1:= - virtual/libcrypt:= - gdbm? ( sys-libs/gdbm:= ) - !gdbm? ( sys-libs/db:= ) - dev-libs/openssl:0= - ldap? ( >=net-nds/openldap-1.2.11 ) - mysql? ( dev-db/mysql-connector-c:= ) - pam? ( sys-libs/pam ) - postgres? ( dev-db/postgresql:= ) - sqlite? ( dev-db/sqlite:3 )" - -RDEPEND="${DEPEND}" - -pkg_setup() { - if ! has_version 'dev-tcltk/expect' ; then - ewarn 'The dev-tcltk/expect package is not installed.' - ewarn 'Without it, you will not be able to change system login passwords.' - ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,' - ewarn 'and others) will work just fine.' - fi -} - -src_configure() { - filter-flags -fomit-frame-pointer - local myconf - if use berkdb ; then - if use gdbm ; then - ewarn "Both gdbm and berkdb selected. Using gdbm." - else - myconf="--with-db=db" - fi - fi - use gdbm && myconf="--with-db=gdbm" - use debug && myconf+=" debug=true" - use sqlite && myconf+=" --with-sqlite-libs" - - econf \ - --sysconfdir=/etc/courier \ - --datadir=/usr/share/courier \ - --localstatedir=/var/lib/courier \ - --sharedstatedir=/var/lib/courier/com \ - --with-authdaemonvar=/var/lib/courier/authdaemon \ - --with-authshadow \ - --with-mailuser=mail \ - --with-mailgroup=mail \ - --cache-file="${S}/configuring.cache" \ - $(use_with pam authpam) \ - $(use_with ldap authldap) \ - $(use_with mysql authmysql) \ - $(use_with postgres authpgsql) \ - $(use_with sqlite authsqlite) \ - ${myconf} -} - -orderfirst() { - file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}" - if [[ -e "${file}" ]] ; then - orig="$(grep ^${option}= ${file} | cut -d\" -f 2)" - new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\"" - sed -i -e "s/^${option}=.*$/${new}/" "${file}" || die - fi -} - -finduserdb() { - for dir in \ - /etc/courier/authlib /etc/courier /etc/courier-imap \ - /usr/lib/courier/etc /usr/lib/courier-imap/etc \ - /usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \ - /usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \ - /usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do - if [[ -e "${dir}/userdb" ]] ; then - einfo "Found userdb at: ${dir}/userdb" - cp -fR "${dir}/userdb" "${D}/etc/courier/authlib/" || die - chmod go-rwx "${D}/etc/courier/authlib/userdb" || die - continue - fi - done -} - -src_install() { - diropts -o mail -g mail - dodir /etc/courier - keepdir /var/lib/courier/authdaemon - keepdir /etc/courier/authlib - emake DESTDIR="${D}" install - [[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb - emake DESTDIR="${D}" install-configure - rm -f "${D}"/etc/courier/authlib/*.bak - chown mail:mail "${D}"/etc/courier/authlib/* || die - for y in "${D}"/etc/courier/authlib/*.dist ; do - [[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}" - done - use pam && orderfirst authdaemonrc authmodulelist authpam - use ldap && orderfirst authdaemonrc authmodulelist authldap - use sqlite && orderfirst authdaemonrc authmodulelist authsqlite - use postgres && orderfirst authdaemonrc authmodulelist authpgsql - use mysql && orderfirst authdaemonrc authmodulelist authmysql - - DOCS=( AUTHORS ChangeLog* INSTALL NEWS README ) - HTML_DOCS=( README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html ) - if use mysql ; then - DOCS+=( README.authmysql.myownquery ) - HTML_DOCS+=( README.authmysql.html ) - fi - if use postgres ; then - HTML_DOCS+=( README.authpostgres.html README.authmysql.html ) - fi - if use ldap ; then - DOCS+=( README.ldap ) - dodir /etc/openldap/schema - cp -f authldap.schema "${D}/etc/openldap/schema/" || die - fi - if use sqlite ; then - HTML_DOCS+=( README.authsqlite.html README.authmysql.html ) - fi - einstalldocs - - newinitd "${FILESDIR}/${PN}-r2" "${PN}" - - use static-libs || find "${D}" -name "*.a" -delete -} - -pkg_postinst() { - if [[ -e /etc/courier/authlib/userdb ]] ; then - einfo "Running makeuserdb ..." - chmod go-rwx /etc/courier/authlib/userdb || die - makeuserdb - fi -} diff --git a/net-libs/courier-authlib/courier-authlib-0.71.0-r4.ebuild b/net-libs/courier-authlib/courier-authlib-0.71.0-r4.ebuild new file mode 100644 index 000000000000..65762bfae119 --- /dev/null +++ b/net-libs/courier-authlib/courier-authlib-0.71.0-r4.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="Courier authentication library" +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" +HOMEPAGE="https://www.courier-mta.org/authlib/" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ppc64 ~s390 sparc x86" +IUSE="berkdb debug gdbm ldap mysql pam postgres sqlite static-libs" + +RESTRICT="!berkdb? ( test )" + +DEPEND="net-mail/mailbase + >=net-libs/courier-unicode-2.1:= + virtual/libcrypt:= + gdbm? ( sys-libs/gdbm:= ) + !gdbm? ( sys-libs/db:= ) + dev-libs/openssl:0= + ldap? ( >=net-nds/openldap-1.2.11:= ) + mysql? ( dev-db/mysql-connector-c:= ) + pam? ( sys-libs/pam ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite:3 )" + +RDEPEND="${DEPEND}" + +pkg_setup() { + if ! has_version 'dev-tcltk/expect' ; then + ewarn 'The dev-tcltk/expect package is not installed.' + ewarn 'Without it, you will not be able to change system login passwords.' + ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,' + ewarn 'and others) will work just fine.' + fi +} + +src_configure() { + filter-flags -fomit-frame-pointer + local myconf + if use berkdb ; then + if use gdbm ; then + ewarn "Both gdbm and berkdb selected. Using gdbm." + else + myconf="--with-db=db" + fi + fi + use gdbm && myconf="--with-db=gdbm" + use debug && myconf+=" debug=true" + use sqlite && myconf+=" --with-sqlite-libs" + + econf \ + --sysconfdir=/etc/courier \ + --datadir=/usr/share/courier \ + --localstatedir=/var/lib/courier \ + --sharedstatedir=/var/lib/courier/com \ + --with-authdaemonvar=/var/lib/courier/authdaemon \ + --with-authshadow \ + --with-mailuser=mail \ + --with-mailgroup=mail \ + --cache-file="${S}/configuring.cache" \ + $(use_with pam authpam) \ + $(use_with ldap authldap) \ + $(use_with mysql authmysql) \ + $(use_with postgres authpgsql) \ + $(use_with sqlite authsqlite) \ + ${myconf} +} + +orderfirst() { + file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}" + if [[ -e "${file}" ]] ; then + orig="$(grep ^${option}= ${file} | cut -d\" -f 2)" + new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\"" + sed -i -e "s/^${option}=.*$/${new}/" "${file}" || die + fi +} + +finduserdb() { + for dir in \ + /etc/courier/authlib /etc/courier /etc/courier-imap \ + /usr/lib/courier/etc /usr/lib/courier-imap/etc \ + /usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \ + /usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \ + /usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do + if [[ -e "${dir}/userdb" ]] ; then + einfo "Found userdb at: ${dir}/userdb" + cp -fR "${dir}/userdb" "${D}/etc/courier/authlib/" || die + chmod go-rwx "${D}/etc/courier/authlib/userdb" || die + continue + fi + done +} + +src_install() { + diropts -o mail -g mail + dodir /etc/courier + keepdir /var/lib/courier/authdaemon + keepdir /etc/courier/authlib + emake DESTDIR="${D}" install + [[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb + emake DESTDIR="${D}" install-configure + rm -f "${D}"/etc/courier/authlib/*.bak + chown mail:mail "${D}"/etc/courier/authlib/* || die + for y in "${D}"/etc/courier/authlib/*.dist ; do + [[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}" + done + use pam && orderfirst authdaemonrc authmodulelist authpam + use ldap && orderfirst authdaemonrc authmodulelist authldap + use sqlite && orderfirst authdaemonrc authmodulelist authsqlite + use postgres && orderfirst authdaemonrc authmodulelist authpgsql + use mysql && orderfirst authdaemonrc authmodulelist authmysql + + DOCS=( AUTHORS ChangeLog* INSTALL NEWS README ) + HTML_DOCS=( README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html ) + if use mysql ; then + DOCS+=( README.authmysql.myownquery ) + HTML_DOCS+=( README.authmysql.html ) + fi + if use postgres ; then + HTML_DOCS+=( README.authpostgres.html README.authmysql.html ) + fi + if use ldap ; then + DOCS+=( README.ldap ) + dodir /etc/openldap/schema + cp -f authldap.schema "${D}/etc/openldap/schema/" || die + fi + if use sqlite ; then + HTML_DOCS+=( README.authsqlite.html README.authmysql.html ) + fi + einstalldocs + + newinitd "${FILESDIR}/${PN}-r2" "${PN}" + + use static-libs || find "${D}" -name "*.a" -delete +} + +pkg_postinst() { + if [[ -e /etc/courier/authlib/userdb ]] ; then + einfo "Running makeuserdb ..." + chmod go-rwx /etc/courier/authlib/userdb || die + makeuserdb + fi +} diff --git a/net-libs/courier-authlib/courier-authlib-0.71.3-r1.ebuild b/net-libs/courier-authlib/courier-authlib-0.71.3-r1.ebuild deleted file mode 100644 index 2c57e1a9719b..000000000000 --- a/net-libs/courier-authlib/courier-authlib-0.71.3-r1.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic - -DESCRIPTION="Courier authentication library" -SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" -HOMEPAGE="https://www.courier-mta.org/authlib/" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="berkdb debug gdbm ldap mysql pam postgres sqlite static-libs" - -RESTRICT="!berkdb? ( test )" - -DEPEND="net-mail/mailbase - >=net-libs/courier-unicode-2.2.3:= - virtual/libcrypt:= - gdbm? ( sys-libs/gdbm:= ) - !gdbm? ( sys-libs/db:= ) - dev-libs/openssl:0= - ldap? ( >=net-nds/openldap-1.2.11 ) - mysql? ( dev-db/mysql-connector-c:= ) - pam? ( sys-libs/pam ) - postgres? ( dev-db/postgresql:= ) - sqlite? ( dev-db/sqlite:3 )" - -RDEPEND="${DEPEND}" - -pkg_setup() { - if ! has_version 'dev-tcltk/expect' ; then - ewarn 'The dev-tcltk/expect package is not installed.' - ewarn 'Without it, you will not be able to change system login passwords.' - ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,' - ewarn 'and others) will work just fine.' - fi -} - -src_configure() { - filter-flags -fomit-frame-pointer - local myconf - if use berkdb ; then - if use gdbm ; then - ewarn "Both gdbm and berkdb selected. Using gdbm." - else - myconf="--with-db=db" - fi - fi - use gdbm && myconf="--with-db=gdbm" - use debug && myconf+=" debug=true" - use sqlite && myconf+=" --with-sqlite-libs" - - econf \ - --sysconfdir=/etc/courier \ - --datadir=/usr/share/courier \ - --localstatedir=/var/lib/courier \ - --sharedstatedir=/var/lib/courier/com \ - --with-authdaemonvar=/var/lib/courier/authdaemon \ - --with-authshadow \ - --with-mailuser=mail \ - --with-mailgroup=mail \ - --cache-file="${S}/configuring.cache" \ - $(use_with pam authpam) \ - $(use_with ldap authldap) \ - $(use_with mysql authmysql) \ - $(use_with postgres authpgsql) \ - $(use_with sqlite authsqlite) \ - ${myconf} -} - -orderfirst() { - file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}" - if [[ -e "${file}" ]] ; then - orig="$(grep ^${option}= ${file} | cut -d\" -f 2)" - new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\"" - sed -i -e "s/^${option}=.*$/${new}/" "${file}" || die - fi -} - -finduserdb() { - for dir in \ - /etc/courier/authlib /etc/courier /etc/courier-imap \ - /usr/lib/courier/etc /usr/lib/courier-imap/etc \ - /usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \ - /usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \ - /usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do - if [[ -e "${dir}/userdb" ]] ; then - einfo "Found userdb at: ${dir}/userdb" - cp -fR "${dir}/userdb" "${D}/etc/courier/authlib/" || die - chmod go-rwx "${D}/etc/courier/authlib/userdb" || die - continue - fi - done -} - -src_install() { - diropts -o mail -g mail - dodir /etc/courier - keepdir /var/lib/courier/authdaemon - keepdir /etc/courier/authlib - emake DESTDIR="${D}" install - [[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb - emake DESTDIR="${D}" install-configure - rm -f "${D}"/etc/courier/authlib/*.bak - chown mail:mail "${D}"/etc/courier/authlib/* || die - for y in "${D}"/etc/courier/authlib/*.dist ; do - [[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}" - done - use pam && orderfirst authdaemonrc authmodulelist authpam - use ldap && orderfirst authdaemonrc authmodulelist authldap - use sqlite && orderfirst authdaemonrc authmodulelist authsqlite - use postgres && orderfirst authdaemonrc authmodulelist authpgsql - use mysql && orderfirst authdaemonrc authmodulelist authmysql - - DOCS=( AUTHORS ChangeLog* INSTALL NEWS README ) - HTML_DOCS=( README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html ) - if use mysql ; then - DOCS+=( README.authmysql.myownquery ) - HTML_DOCS+=( README.authmysql.html ) - fi - if use postgres ; then - HTML_DOCS+=( README.authpostgres.html README.authmysql.html ) - fi - if use ldap ; then - DOCS+=( README.ldap ) - dodir /etc/openldap/schema - cp -f authldap.schema "${D}/etc/openldap/schema/" || die - fi - if use sqlite ; then - HTML_DOCS+=( README.authsqlite.html README.authmysql.html ) - fi - einstalldocs - - newinitd "${FILESDIR}/${PN}-r2" "${PN}" - - use static-libs || find "${D}" -name "*.a" -delete -} - -pkg_postinst() { - if [[ -e /etc/courier/authlib/userdb ]] ; then - einfo "Running makeuserdb ..." - chmod go-rwx /etc/courier/authlib/userdb || die - makeuserdb - fi -} diff --git a/net-libs/courier-authlib/courier-authlib-0.71.3-r2.ebuild b/net-libs/courier-authlib/courier-authlib-0.71.3-r2.ebuild new file mode 100644 index 000000000000..45725d6e9a45 --- /dev/null +++ b/net-libs/courier-authlib/courier-authlib-0.71.3-r2.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="Courier authentication library" +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" +HOMEPAGE="https://www.courier-mta.org/authlib/" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="berkdb debug gdbm ldap mysql pam postgres sqlite static-libs" + +RESTRICT="!berkdb? ( test )" + +DEPEND="net-mail/mailbase + >=net-libs/courier-unicode-2.2.3:= + virtual/libcrypt:= + gdbm? ( sys-libs/gdbm:= ) + !gdbm? ( sys-libs/db:= ) + dev-libs/openssl:0= + ldap? ( >=net-nds/openldap-1.2.11:= ) + mysql? ( dev-db/mysql-connector-c:= ) + pam? ( sys-libs/pam ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite:3 )" + +RDEPEND="${DEPEND}" + +pkg_setup() { + if ! has_version 'dev-tcltk/expect' ; then + ewarn 'The dev-tcltk/expect package is not installed.' + ewarn 'Without it, you will not be able to change system login passwords.' + ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,' + ewarn 'and others) will work just fine.' + fi +} + +src_configure() { + filter-flags -fomit-frame-pointer + local myconf + if use berkdb ; then + if use gdbm ; then + ewarn "Both gdbm and berkdb selected. Using gdbm." + else + myconf="--with-db=db" + fi + fi + use gdbm && myconf="--with-db=gdbm" + use debug && myconf+=" debug=true" + use sqlite && myconf+=" --with-sqlite-libs" + + econf \ + --sysconfdir=/etc/courier \ + --datadir=/usr/share/courier \ + --localstatedir=/var/lib/courier \ + --sharedstatedir=/var/lib/courier/com \ + --with-authdaemonvar=/var/lib/courier/authdaemon \ + --with-authshadow \ + --with-mailuser=mail \ + --with-mailgroup=mail \ + --cache-file="${S}/configuring.cache" \ + $(use_with pam authpam) \ + $(use_with ldap authldap) \ + $(use_with mysql authmysql) \ + $(use_with postgres authpgsql) \ + $(use_with sqlite authsqlite) \ + ${myconf} +} + +orderfirst() { + file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}" + if [[ -e "${file}" ]] ; then + orig="$(grep ^${option}= ${file} | cut -d\" -f 2)" + new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\"" + sed -i -e "s/^${option}=.*$/${new}/" "${file}" || die + fi +} + +finduserdb() { + for dir in \ + /etc/courier/authlib /etc/courier /etc/courier-imap \ + /usr/lib/courier/etc /usr/lib/courier-imap/etc \ + /usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \ + /usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \ + /usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do + if [[ -e "${dir}/userdb" ]] ; then + einfo "Found userdb at: ${dir}/userdb" + cp -fR "${dir}/userdb" "${D}/etc/courier/authlib/" || die + chmod go-rwx "${D}/etc/courier/authlib/userdb" || die + continue + fi + done +} + +src_install() { + diropts -o mail -g mail + dodir /etc/courier + keepdir /var/lib/courier/authdaemon + keepdir /etc/courier/authlib + emake DESTDIR="${D}" install + [[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb + emake DESTDIR="${D}" install-configure + rm -f "${D}"/etc/courier/authlib/*.bak + chown mail:mail "${D}"/etc/courier/authlib/* || die + for y in "${D}"/etc/courier/authlib/*.dist ; do + [[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}" + done + use pam && orderfirst authdaemonrc authmodulelist authpam + use ldap && orderfirst authdaemonrc authmodulelist authldap + use sqlite && orderfirst authdaemonrc authmodulelist authsqlite + use postgres && orderfirst authdaemonrc authmodulelist authpgsql + use mysql && orderfirst authdaemonrc authmodulelist authmysql + + DOCS=( AUTHORS ChangeLog* INSTALL NEWS README ) + HTML_DOCS=( README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html ) + if use mysql ; then + DOCS+=( README.authmysql.myownquery ) + HTML_DOCS+=( README.authmysql.html ) + fi + if use postgres ; then + HTML_DOCS+=( README.authpostgres.html README.authmysql.html ) + fi + if use ldap ; then + DOCS+=( README.ldap ) + dodir /etc/openldap/schema + cp -f authldap.schema "${D}/etc/openldap/schema/" || die + fi + if use sqlite ; then + HTML_DOCS+=( README.authsqlite.html README.authmysql.html ) + fi + einstalldocs + + newinitd "${FILESDIR}/${PN}-r2" "${PN}" + + use static-libs || find "${D}" -name "*.a" -delete +} + +pkg_postinst() { + if [[ -e /etc/courier/authlib/userdb ]] ; then + einfo "Running makeuserdb ..." + chmod go-rwx /etc/courier/authlib/userdb || die + makeuserdb + fi +} -- cgit v1.2.3