summaryrefslogtreecommitdiff
path: root/net-libs/courier-authlib
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-20 14:08:57 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-20 14:08:57 +0000
commit6aa0d33a65c735f3148967b62316c2e71f43589a (patch)
tree4ddfb479a93b928f4ad0507a58e779e6de3eb403 /net-libs/courier-authlib
parenta332b8e207ac6a51fa349c699b486d870c9cdc70 (diff)
gentoo auto-resync : 20:01:2024 - 14:08:56
Diffstat (limited to 'net-libs/courier-authlib')
-rw-r--r--net-libs/courier-authlib/Manifest1
-rw-r--r--net-libs/courier-authlib/courier-authlib-0.72.0-r1.ebuild149
2 files changed, 150 insertions, 0 deletions
diff --git a/net-libs/courier-authlib/Manifest b/net-libs/courier-authlib/Manifest
index 44caaead89df..82dbb0fb7366 100644
--- a/net-libs/courier-authlib/Manifest
+++ b/net-libs/courier-authlib/Manifest
@@ -4,5 +4,6 @@ DIST courier-authlib-0.71.3.tar.bz2 2208794 BLAKE2B 4b0f56f066368383d471dd8f4694
DIST courier-authlib-0.72.0.tar.bz2 2274507 BLAKE2B 238fbc8d046dd3c1f2eb6357f9b1995dd666171dfb8a6ba40ee68446bc6cfb9624b53f4603376119798130d5319f5489690bf1567d9d59db4448a4478aff2dc9 SHA512 1d04c3a10fffddfd2c3cae1c5543a01ec6fcc4ccdf77b13714542ce7189e4924836a64123a9e7231fda698cca9a930be65a4a2382f3cd96364635f754bf40ce3
EBUILD courier-authlib-0.71.0-r4.ebuild 4446 BLAKE2B 9d0042f3e6c65a735532eb7b0b30223d01d49b7c6197ef88511f734d6b7af9b779c46761eea445420f6ac27ad254b0cf7eff850b99f1c5a69a855341d976a334 SHA512 8f708363dc3519931ae0854543b9060d0209181a5e01c65ea6d2d4f6024043ba7f66bd95815f75f4d9eb6d02e13a32385792461da5ca741553187f4de64ec054
EBUILD courier-authlib-0.71.3-r2.ebuild 4464 BLAKE2B 1469bbcb3278771bde697bdc752bffe0f54b441d0fc4894dc9892f3ff99c4baa03e56a8a209ab012482723f3c531b64c12569532165caa2c31828fe360fb0718 SHA512 94bcc0daef666993dec1e48cab6cd84bef3e9dab40416e06344084ba76d84872f1c78639ee05db1716f5642bab4ae945b1a812d38a9b7030432e2a4df53d6f14
+EBUILD courier-authlib-0.72.0-r1.ebuild 4487 BLAKE2B dcb530c0429010a7ea5e381f883f2bc85cd9d3797a11be748d074019e9d2e2172cf104769bba6c7efbc209821f7cbc5a31c847575e784a177a55bce3ea30b317 SHA512 072a581a2367ebcb77cc72022474d0a3f0f1fcdc76b5a7b22fb29659682c211e25b1214c2d0a47724604f6c49a96a5ad650376c6d6be1bc3d158ad2750464fdc
EBUILD courier-authlib-0.72.0.ebuild 4464 BLAKE2B d7d9e2f9084b4decc45d56fd95da770befe9c8d40fb10dc122a0c61184f8216483cd5718cddcce285320ffec6b46b73fa25adad46a6a0c3c4898986fb769d052 SHA512 1eacf02025cb15b8c20d70a0410d926af1f44247b3ef922166f39f365514b65cb17de4248add057f2e1c07237de167bffa45b31a725b03e5b9d90eb3da4efc62
MISC metadata.xml 302 BLAKE2B f4a6bbc1e616a769172499ca1f863a8e43d608e25d2a99a6384fd0a0880e4e23f2c64c97404ad80ae12c3cd23eda5854ded0ed2c9000875c701aa22ff70b9e80 SHA512 3f25d55e6f6169b696d210cfbd7df486337885cd0905b62d307e6b3fd1595ac1471dccb59794ecfe0bbcd009339348ef7bb9debb4752533d1b28043cb5d1f918
diff --git a/net-libs/courier-authlib/courier-authlib-0.72.0-r1.ebuild b/net-libs/courier-authlib/courier-authlib-0.72.0-r1.ebuild
new file mode 100644
index 000000000000..e6df5d269c67
--- /dev/null
+++ b/net-libs/courier-authlib/courier-authlib-0.72.0-r1.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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 ~loong ~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.6:=
+ virtual/libcrypt:=
+ dev-libs/libltdl
+ 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
+}