summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott W Taylor <swtaylor@gentoo.org>2004-11-27 08:40:33 +0000
committerScott W Taylor <swtaylor@gentoo.org>2004-11-27 08:40:33 +0000
commitb0539344e2f9159f56a720aa3d11d485130c5e7f (patch)
tree616e06e09a0237379ef18cdb07b28fa3ca089087 /net-libs
parentHOMEPAGE changed (Manifest recommit) (diff)
downloadgentoo-2-b0539344e2f9159f56a720aa3d11d485130c5e7f.tar.gz
gentoo-2-b0539344e2f9159f56a720aa3d11d485130c5e7f.tar.bz2
gentoo-2-b0539344e2f9159f56a720aa3d11d485130c5e7f.zip
rock and roll!
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/courier-authlib/ChangeLog6
-rw-r--r--net-libs/courier-authlib/courier-authlib-0.50.20041120.ebuild38
-rw-r--r--net-libs/courier-authlib/files/courier-authlib-initd8
3 files changed, 40 insertions, 12 deletions
diff --git a/net-libs/courier-authlib/ChangeLog b/net-libs/courier-authlib/ChangeLog
index 3e82f99460dd..6d6fc28b99f3 100644
--- a/net-libs/courier-authlib/ChangeLog
+++ b/net-libs/courier-authlib/ChangeLog
@@ -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:
diff --git a/net-libs/courier-authlib/courier-authlib-0.50.20041120.ebuild b/net-libs/courier-authlib/courier-authlib-0.50.20041120.ebuild
index 927d0c19ff83..e12900ca1b25 100644
--- a/net-libs/courier-authlib/courier-authlib-0.50.20041120.ebuild
+++ b/net-libs/courier-authlib/courier-authlib-0.50.20041120.ebuild
@@ -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
}
diff --git a/net-libs/courier-authlib/files/courier-authlib-initd b/net-libs/courier-authlib/files/courier-authlib-initd
index fbce559cbb03..77deba9550de 100644
--- a/net-libs/courier-authlib/files/courier-authlib-initd
+++ b/net-libs/courier-authlib/files/courier-authlib-initd
@@ -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 $?