rock and roll!
authorScott W Taylor <swtaylor@gentoo.org>
Sat, 27 Nov 2004 08:40:33 +0000 (08:40 +0000)
committerScott W Taylor <swtaylor@gentoo.org>
Sat, 27 Nov 2004 08:40:33 +0000 (08:40 +0000)
net-libs/courier-authlib/ChangeLog
net-libs/courier-authlib/Manifest
net-libs/courier-authlib/courier-authlib-0.50.20041120.ebuild
net-libs/courier-authlib/files/courier-authlib-initd

index 3e82f99460dd5cc0e2949807ec487cfefbf5e389..6d6fc28b99f36847acb270f69eee61989ac9976a 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for net-libs/courier-authlib
 # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/ChangeLog,v 1.5 2004/11/27 04:47:35 swtaylor Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/ChangeLog,v 1.6 2004/11/27 08:40:33 swtaylor Exp $
+
+  27 Nov 2004; Scott W Taylor <swtaylor@gentoo.org>
+  files/courier-authlib-initd, courier-authlib-0.50.20041120.ebuild:
+  almost there
 
   26 Nov 2004; Scott W Taylor <swtaylor@gentoo.org>
   courier-authlib-0.50.20041120.ebuild:
index 24fec128b1c9b7d789291bc8baea335ddaca1030..109eb83ae9a446a46eea95c2204b603e04047e06 100644 (file)
@@ -1,8 +1,8 @@
-MD5 d956bdfffb11110588613dda0cf4babd courier-authlib-0.50.20041120.ebuild 3655
+MD5 02042db41c81f90f43c093490bf842cf courier-authlib-0.50.20041120.ebuild 4837
 MD5 ba4b54b9a8731ede67c15cd93467a9e9 courier-authlib-0.50.20041116.ebuild 3486
-MD5 868184db1be746d0778886d2a7e80351 ChangeLog 940
+MD5 6d192b3539b83369592853f1d2d3ca21 ChangeLog 1077
 MD5 1639b87658242c2406f7f7f8deda7388 metadata.xml 334
-MD5 923c23f282c95659585375cad227b0eb files/courier-authlib-initd 1099
+MD5 4c7dedb4c21da2d9e4dbc586459de426 files/courier-authlib-initd 1038
 MD5 ee0f85c1e7a26c660ce65b08a89fcfbb files/digest-courier-authlib-0.50.20041116 83
 MD5 bf19f3ead9756c1dadc9c520fc03bd16 files/digest-courier-authlib-0.50.20041120 83
 MD5 29207299a025b05adedda64ede97bb1c files/configure-db4.patch 2556
index 927d0c19ff832d9eeb37ee1ee702fd4c6982acd0..e12900ca1b25bb0102c77a047abd5970ac0f8779 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.50.20041120.ebuild,v 1.2 2004/11/27 04:47:35 swtaylor Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.50.20041120.ebuild,v 1.3 2004/11/27 08:40:33 swtaylor Exp $
 
 inherit eutils gnuconfig
 
@@ -10,8 +10,7 @@ HOMEPAGE="http://www.courier-mta.org/"
 
 SLOT="0"
 LICENSE="GPL-2"
-#KEYWORDS="~x86 ~alpha ~ppc ~sparc ~amd64"
-KEYWORDS="-*"
+KEYWORDS="~x86 ~alpha ~ppc ~sparc ~amd64"
 IUSE="postgres ldap mysql berkdb gdbm pam crypt uclibc debug"
 
 DEPEND="virtual/libc
@@ -30,7 +29,9 @@ RDEPEND="virtual/libc
 src_unpack() {
        if ! has_version 'dev-tcltk/expect' ; then
                ewarn 'The dev-tcltk/expect package is not installed.'
-               einfo 'This only limits using webmail to change authpam passwords.'
+               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
        unpack ${A}
        cd ${S}
@@ -57,11 +58,10 @@ src_compile() {
        if use berkdb ; then
                use gdbm && \
                        einfo "Both gdbm and berkdb selected. Using gdbm." || \
-                       myconf="${myconf} --with-db=db"
+                               myconf="${myconf} --with-db=db"
        fi
        use gdbm && myconf="${myconf} --with-db=gdbm"
 
-
        if [ -f /var/vpopmail/etc/lib_deps ]; then
                myconf="${myconf} --with-authvchkpw --without-authmysql --without-authpgsql"
                use mysql && ewarn "vpopmail found. authmysql will not be built."
@@ -92,15 +92,33 @@ ewarn "${myconf}"
        emake || die "Compile problem"
 }
 
+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
+}
+
 src_install() {
        dodir /var/lib/courier
        dodir /etc/courier/authlib
        dodir /etc/init.d
+       keepdir /var/lib/courier
+       keepdir /etc/courier/authlib
        emake install DESTDIR="${D}" || die "install"
        emake install-migrate DESTDIR="${D}" || die "migrate"
        emake install-configure DESTDIR="${D}" || die "configure"
        rm ${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 ${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
        use ldap && dodoc authldap.schema
@@ -108,5 +126,13 @@ src_install() {
        use postgres && dohtml README.authpostgres.html
        exeinto /etc/init.d
        newexe ${FILESDIR}/courier-authlib-initd courier-authlib || die "init.d failed"
+
+       # Suggest cleaning out the following old files
+       list="`find /etc/courier -type f -maxdepth 1 | grep \"^/etc/courier/auth\"`"
+       if [ ! -z "${list}" ] ; then
+               ewarn "Courier authentication files are now in /etc/courier/authlib/"
+               einfo "The following files are now obsolete and can likely be removed:"
+               einfo " rm `echo \"${list}\" | xargs echo`"
+       fi
 }
 
index fbce559cbb03436763fa6eeca48430c1455fab27..77deba9550debd49ee3264407176d7e2b74e3dfa 100644 (file)
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/files/courier-authlib-initd,v 1.2 2004/11/27 03:53:37 swtaylor Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/files/courier-authlib-initd,v 1.3 2004/11/27 08:40:33 swtaylor Exp $
 depend() {
        need net
 }
@@ -17,8 +17,6 @@ setauth() {
        source /etc/courier/authlib/authdaemonrc
        AUTHLIB="/usr/lib/courier/courier-authlib"
        AUTHDAEMOND="authdaemond"
-       #source /etc/courier/authlib/authdaemond.conf
-       #[ -z "$version" ] && version="${AUTHDAEMOND}"
        pidfile="/var/run/authdaemon.pid"
        logger="/usr/sbin/courierlogger"
 }
@@ -27,7 +25,7 @@ start() {
        checkconfig || return 1
        setauth
        
-       ebegin "Starting ${AUTHDAEMOND}"
+       ebegin "Starting courier-authlib: ${AUTHDAEMOND}"
        start-stop-daemon --quiet --start --pidfile "$pidfile" --exec \
                /usr/bin/env -- - $logger -pid="$pidfile" -start "${AUTHLIB}/${AUTHDAEMOND}" 
        eend $?
@@ -36,7 +34,7 @@ start() {
 stop() {
        setauth
        
-       ebegin "Stopping ${AUTHDAEMOND}"
+       ebegin "Stopping courier-authlib: ${AUTHDAEMOND}"
        start-stop-daemon --quiet --stop \
                --pidfile "$pidfile"
        eend $?