diff options
author | Charlie Shepherd <masterdriverz@gentoo.org> | 2007-02-03 20:45:02 +0000 |
---|---|---|
committer | Charlie Shepherd <masterdriverz@gentoo.org> | 2007-02-03 20:45:02 +0000 |
commit | 6651ab4d75130588f56975da741ce0fb78e3f538 (patch) | |
tree | 79d6b4c88cb8d9401ac1ff4ef9d3c0b46b8b599c /net-libs/courier-authlib | |
parent | re-add ~amd64; bug 162985 (diff) | |
download | gentoo-2-6651ab4d75130588f56975da741ce0fb78e3f538.tar.gz gentoo-2-6651ab4d75130588f56975da741ce0fb78e3f538.tar.bz2 gentoo-2-6651ab4d75130588f56975da741ce0fb78e3f538.zip |
Bump to version, bug 162531, thanks to Conrad Kostecki. Add a vpopmail use flag, bug 161754, thanks to Georgi Georgiev.
(Portage version: 2.1.2_rc4-r3)
Diffstat (limited to 'net-libs/courier-authlib')
5 files changed, 235 insertions, 1 deletions
diff --git a/net-libs/courier-authlib/ChangeLog b/net-libs/courier-authlib/ChangeLog index dabd698ed209..66ce364b3497 100644 --- a/net-libs/courier-authlib/ChangeLog +++ b/net-libs/courier-authlib/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-libs/courier-authlib # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/ChangeLog,v 1.61 2007/01/16 23:04:09 masterdriverz Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/ChangeLog,v 1.62 2007/02/03 20:45:02 masterdriverz Exp $ + +*courier-authlib-0.59.1 (03 Feb 2007) + + 03 Feb 2007; Charlie Shepherd <masterdriverz@gentoo.org> + +files/0.59.1-configure-db4.patch, + +files/0.59.1-remove-obsolete-macro.patch, +courier-authlib-0.59.1.ebuild: + Bump to version, bug 162531, thanks to Conrad Kostecki. Add a vpopmail use + flag, bug 161754, thanks to Georgi Georgiev. *courier-authlib-0.58-r1 (16 Jan 2007) diff --git a/net-libs/courier-authlib/courier-authlib-0.59.1.ebuild b/net-libs/courier-authlib/courier-authlib-0.59.1.ebuild new file mode 100644 index 000000000000..29264ae49fc4 --- /dev/null +++ b/net-libs/courier-authlib/courier-authlib-0.59.1.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.59.1.ebuild,v 1.1 2007/02/03 20:45:02 masterdriverz Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +inherit eutils flag-o-matic autotools + +DESCRIPTION="courier authentication library" +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" +HOMEPAGE="http://www.courier-mta.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="berkdb crypt debug gdbm ldap mysql pam postgres vpopmail" + +RESTRICT="userpriv" + +RDEPEND="gdbm? ( sys-libs/gdbm ) + !gdbm? ( sys-libs/db )" + +DEPEND="${RDEPEND} + >=dev-libs/openssl-0.9.6 + pam? ( >=sys-libs/pam-0.75 ) + mysql? ( virtual/mysql ) + ldap? ( >=net-nds/openldap-1.2.11 ) + postgres? ( >=dev-db/postgresql-7.2 )" + +S="${WORKDIR}/${P%%_pre}" + +pkg_setup() { + if ! has_version 'dev-tcltk/expect' ; then + ewarn 'The dev-tcltk/expect package is not installed.' + einfo 'Without it, you will not be able to change system login passwords.' + einfo 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,' + einfo 'and others) will work just fine.' + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + sed -e "s|^chk_file .* |&\${DESTDIR}|g" -i.orig authmigrate.in + use elibc_uclibc && sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub + if ! use gdbm; then + epatch "${FILESDIR}/${PV}-configure-db4.patch" + else + epatch "${FILESDIR}/${PV}-remove-obsolete-macro.patch" + fi + + sed -i -e'/for dir in/a@@INDENT@@/etc/courier-imap \\' ${S}/authmigrate.in + sed -i -e'/for dir in/a@@INDENT@@/etc/courier/authlib \\' ${S}/authmigrate.in + sed -i -e"s|@@INDENT@@| |g" ${S}/authmigrate.in + sed -i -e"s|\$sbindir/makeuserdb||g" ${S}/authmigrate.in + + eautoreconf +} + +src_compile() { + filter-flags -fomit-frame-pointer + + local myconf + myconf="$(use_with pam authpam) $(use_with ldap authldap)" + + if use berkdb; then + if use gdbm; then + ewarn "Both gdbm and berkdb selected. Using gdbm." + else + myconf="${myconf} --with-db=db" + fi + fi + use gdbm && myconf="${myconf} --with-db=gdbm" + + if use vpopmail; then + myconf="${myconf} --with-authvchkpw --without-authmysql --without-authpgsql" + use mysql && ewarn "Building vpopmail support instead of authmysql" + use postgres && ewarn "Building vpopmail support instead of authpgsql" + else + myconf="${myconf} --without-authvchkpw $(use_with mysql authmysql) $(use_with postgres authpgsql)" + fi + + use debug && myconf="${myconf} debug=true" + + einfo "Configuring courier-authlib: ${myconf}" + + econf \ + --sysconfdir=/etc/courier \ + --datadir=/usr/share/courier \ + --libexecdir=/usr/$(get_libdir)/courier \ + --localstatedir=/var/lib/courier \ + --sharedstatedir=/var/lib/courier/com \ + --with-authdaemonvar=/var/lib/courier/authdaemon \ + --with-authshadow \ + --without-redhat \ + --with-mailuser=mail \ + --with-mailgroup=mail \ + --cache-file="${S}/configuring.cache" \ + ${myconf} || die "econf failed" + emake || die "emake failed" +} + +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} + 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 $dir/userdb" + cp -v $dir/userdb ${D}/etc/courier/authlib/ + chmod go-rwx ${D}/etc/courier/authlib/userdb + continue + fi + done +} + +src_install() { + diropts -o mail -g mail + dodir /etc/courier + keepdir /var/lib/courier/authdaemon + keepdir /etc/courier/authlib + emake install DESTDIR="${D}" || die "install failed" + emake install-migrate DESTDIR="${D}" || die "migrate failed" + [ ! -e "${D}/etc/courier/authlib/userdb" ] && finduserdb + emake install-configure DESTDIR="${D}" || die "install-configure failed" + rm -vf ${D}/etc/courier/authlib/*.bak + chown mail:mail ${D}/etc/courier/authlib/* + for y in ${D}/etc/courier/authlib/*.dist ; do + [ ! -e "${y%%.dist}" ] && cp -v ${y} ${y%%.dist} + done + use pam && orderfirst authdaemonrc authmodulelist authpam + use ldap && orderfirst authdaemonrc authmodulelist authldap + use postgres && orderfirst authdaemonrc authmodulelist authpgsql + use mysql && orderfirst authdaemonrc authmodulelist authmysql + dodoc AUTHORS COPYING ChangeLog* INSTALL NEWS README + dohtml README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html + if use mysql; then + dodoc README.authmysql.myownquery + dohtml README.authmysql.html + fi + use postgres && dohtml README.authpostgres.html README.authmysql.html + if use ldap; then + dodoc README.ldap + dodir /etc/openldap/schema + cp authldap.schema "${D}/etc/openldap/schema/" + fi + doinitd "${FILESDIR}/initd/courier-authlib" || die "init.d failed" +} + +pkg_postinst() { + if [ -e /etc/courier/authlib/userdb ]; then + einfo "running makeuserdb" + chmod go-rwx /etc/courier/authlib/userdb + makeuserdb + fi + + # Suggest cleaning out the following old files + list="$(find /etc/courier -maxdepth 1 -type f | grep \"^/etc/courier/auth\")" + if [ ! -z "${list}" ] ; then + ewarn "Courier authentication files are now in /etc/courier/authlib/" + einfo "The following files are no longer needed and can likely be removed:" + einfo " rm $(echo \"${list}\")" + fi +} diff --git a/net-libs/courier-authlib/files/0.59.1-configure-db4.patch b/net-libs/courier-authlib/files/0.59.1-configure-db4.patch new file mode 100644 index 000000000000..a784107543e4 --- /dev/null +++ b/net-libs/courier-authlib/files/0.59.1-configure-db4.patch @@ -0,0 +1,37 @@ +--- configure.in.orig 2007-01-17 02:15:46.000000000 +0000 ++++ configure.in 2007-02-03 19:52:48.000000000 +0000 +@@ -22,7 +22,6 @@ + AC_PROG_CPP + AC_PROG_INSTALL + AC_PROG_LN_S +-AC_PROG_SYSCONFTOOL + AC_LIBLTDL_INSTALLABLE + AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL +@@ -264,15 +263,17 @@ + + if test "$db" != "gdbm" + then +- AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ], +- [ AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"], +- [ AC_CHECK_LIB(db, db_env_create, +- [ LIBDB=-ldb; LIBS="-ldb $LIBS"]) ] +- )]) +- +- AC_CHECK_FUNC(dbopen, HAVE_BDB=1) +- AC_CHECK_FUNC(db_open, HAVE_BDB=1) +- AC_CHECK_FUNC(db_env_create, HAVE_BDB=1) ++ for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db ++ do ++ AC_CHECK_LIB($dbname, db_create_4002, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4001, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4000, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ])))) ++ done ++ AC_CHECK_FUNC(db_create_4002, HAVE_BDB=1) ++ AC_CHECK_FUNC(db_create_4001, HAVE_BDB=1) ++ AC_CHECK_FUNC(db_create_4000, HAVE_BDB=1) ++ AC_CHECK_FUNC(db_create, HAVE_BDB=1) + fi + + LIBS="$saveLIBS" diff --git a/net-libs/courier-authlib/files/0.59.1-remove-obsolete-macro.patch b/net-libs/courier-authlib/files/0.59.1-remove-obsolete-macro.patch new file mode 100644 index 000000000000..72a398391aa1 --- /dev/null +++ b/net-libs/courier-authlib/files/0.59.1-remove-obsolete-macro.patch @@ -0,0 +1,10 @@ +--- configure.in.orig 2007-01-17 02:15:46.000000000 +0000 ++++ configure.in 2007-02-03 19:58:19.000000000 +0000 +@@ -22,7 +22,6 @@ + AC_PROG_CPP + AC_PROG_INSTALL + AC_PROG_LN_S +-AC_PROG_SYSCONFTOOL + AC_LIBLTDL_INSTALLABLE + AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL diff --git a/net-libs/courier-authlib/files/digest-courier-authlib-0.59.1 b/net-libs/courier-authlib/files/digest-courier-authlib-0.59.1 new file mode 100644 index 000000000000..ce8150e9da8e --- /dev/null +++ b/net-libs/courier-authlib/files/digest-courier-authlib-0.59.1 @@ -0,0 +1,3 @@ +MD5 4e7327980724c4c327aace23facd5d59 courier-authlib-0.59.1.tar.bz2 2101729 +RMD160 3ccd24004411155b5b5bfe959c557a29e58b9826 courier-authlib-0.59.1.tar.bz2 2101729 +SHA256 72d9faf01b9e211142ee25f414b19e6de06de1f040a5338ab19c2770b9289724 courier-authlib-0.59.1.tar.bz2 2101729 |