diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2004-05-30 03:09:23 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2004-05-30 03:09:23 +0000 |
commit | eac9a62ab57fa949e082c619776b69919d745b64 (patch) | |
tree | 62673b6301278403773eefe4b4ea980015ac1818 /mail-client | |
parent | Moving to mail-client/drac (diff) | |
download | gentoo-2-eac9a62ab57fa949e082c619776b69919d745b64.tar.gz gentoo-2-eac9a62ab57fa949e082c619776b69919d745b64.tar.bz2 gentoo-2-eac9a62ab57fa949e082c619776b69919d745b64.zip |
Moved from net-mail/drac to mail-client/drac.
Diffstat (limited to 'mail-client')
-rw-r--r-- | mail-client/drac/ChangeLog | 34 | ||||
-rw-r--r-- | mail-client/drac/Manifest | 8 | ||||
-rw-r--r-- | mail-client/drac/drac-1.12-r1.ebuild | 72 | ||||
-rw-r--r-- | mail-client/drac/drac-1.12.ebuild | 51 | ||||
-rw-r--r-- | mail-client/drac/files/digest-drac-1.12 | 1 | ||||
-rw-r--r-- | mail-client/drac/files/digest-drac-1.12-r1 | 1 | ||||
-rw-r--r-- | mail-client/drac/files/drac_rotate | 99 | ||||
-rw-r--r-- | mail-client/drac/files/dracd.rc6 | 21 | ||||
-rw-r--r-- | mail-client/drac/metadata.xml | 5 |
9 files changed, 292 insertions, 0 deletions
diff --git a/mail-client/drac/ChangeLog b/mail-client/drac/ChangeLog new file mode 100644 index 000000000000..ac6d14b989d0 --- /dev/null +++ b/mail-client/drac/ChangeLog @@ -0,0 +1,34 @@ +# ChangeLog for net-mail/drac +# Copyright 1999-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-client/drac/ChangeLog,v 1.1 2004/05/30 03:09:23 seemant Exp $ + +*drac-1.12-r1 (29 May 2004) + + 29 May 2004; Seemant Kulleen <seemant@gentoo.org> +metadata.xml, + +files/drac_rotate, +files/dracd.rc6, +drac-1.12-r1.ebuild, + +drac-1.12.ebuild: + Moved from net-mail/drac to mail-client/drac. + + 23 May 2004; Jason Wever <weeve@gentoo.org> drac-1.12-r1.ebuild: + Added ~sparc keyword. + + 31 Oct 2003; Max Kalika <max@gentoo.org> drac-1.12-r1.ebuild: + Bump to stable x86. + +*drac-1.12-r1 (17 Sep 2003) + + 17 Sep 2003; Max Kalika <max@gentoo.org> drac-1.12-r1.ebuild, + files/drac_rotate, files/dracd.rc6: + Major cleanup/rewrite: quote variables where possible; whitespace consistancy; + depend on virtual/mta instead of hard-coded sendmail; depend on >=sed-4 + because of inlinedd sed usage; drop eutils inheritance because nothing from + here is being used; simpify Makefile sed command; install binary as dracd + instead of rpc.dracd; install libdrac.a (needed for compiling imap servers + with drac support); add rc6 file; create new drac_rotate script and install + it; change $DEBUGBUILD to `use debug`. Die on sed failure. + +*drac-1.12 (19 Jan 2003) + + 19 Jan 2003; Nick Hadaway <raker@gentoo.org> drac-1.12.ebuild, + files/digest-drac-1.12 : + New ebuild added for a more robust tpop3d build. diff --git a/mail-client/drac/Manifest b/mail-client/drac/Manifest new file mode 100644 index 000000000000..9ce02104f8f8 --- /dev/null +++ b/mail-client/drac/Manifest @@ -0,0 +1,8 @@ +MD5 9474eac06da5748616e2db9fb692ff40 ChangeLog 1213 +MD5 005925e0d001dca81c6ce20ab2c1171b drac-1.12-r1.ebuild 1957 +MD5 1ed296d9081d7fcfe27388699acaf574 drac-1.12.ebuild 1635 +MD5 5721b86fd871bdfab77231abc6e02f68 metadata.xml 161 +MD5 478bde42ed4cbed7f9a62e34be244e68 files/digest-drac-1.12 54 +MD5 478bde42ed4cbed7f9a62e34be244e68 files/digest-drac-1.12-r1 54 +MD5 cfc3ac36408fc92b1bde9a5a59c0f80e files/drac_rotate 2540 +MD5 eece4cd292ee157f65e0cd62becfbb86 files/dracd.rc6 515 diff --git a/mail-client/drac/drac-1.12-r1.ebuild b/mail-client/drac/drac-1.12-r1.ebuild new file mode 100644 index 000000000000..97699727a089 --- /dev/null +++ b/mail-client/drac/drac-1.12-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-client/drac/drac-1.12-r1.ebuild,v 1.1 2004/05/30 03:09:23 seemant Exp $ + +DESCRIPTION="A robust implementation of POP-before-SMTP." +HOMEPAGE="http://mail.cc.umanitoba.ca/drac/" +SRC_URI="ftp://ftp.cc.umanitoba.ca/src/${PN}.tar.Z" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="x86 ~sparc" +IUSE="debug" + +DEPEND="virtual/glibc + virtual/mta + >=sys-libs/db-3.2.9 + >=sys-apps/sed-4" +RDEPEND="${DEPEND} + >=net-nds/portmap-5b-r6" + +S="${WORKDIR}" + +src_compile() { + local mysed + if [ "`use debug`" ] ; then + mysed="s:^CFLAGS.*:CFLAGS = \$(DEFS) -g ${CFLAGS}:" + else + mysed="s:^CFLAGS.*:CFLAGS = \$(DEFS) ${CFLAGS}:" + fi + + sed -e "s:^INSTALL = .*:INSTALL = /usr/bin/install:" \ + -e "s:^EBIN = .*:EBIN = /usr/sbin:" \ + -e "s:^MAN = .*:MAN = /usr/share/man/man:" \ + -e "s:^DEFS = .*:DEFS = -DSOCK_RPC -DFCNTL_LOCK -DGETHOST -DDASH_C:" \ + -e "s:^CC = .*:CC = gcc:" \ + -e "s:^LDLIBS = .*:LDLIBS = -ldb:" \ + -e "s:^TSTLIBS = .*:TSTLIBS = -L. -ldrac:" \ + -e "s:^RPCGENFLAGS = .*:RPCGENFLAGS = -C -I:" \ + -e "s:^MANADM = .*:MANADM = 8:" \ + -e "${mysed}" \ + -i Makefile || die "sed failed" + + # Parallel build does not work. + emake -j1 || die "compile problem" +} + +src_install() { + newsbin rpc.dracd dracd + dosbin "${FILESDIR}/drac_rotate" + + dolib.a libdrac.a + + exeinto /etc/init.d + newexe "${FILESDIR}/dracd.rc6" dracd + + dodoc Changes COPYRIGHT INSTALL PORTING README + newman rpc.dracd.1m dracd.8 + doman dracauth.3 + + keepdir /var/lib/drac + fowners mail:mail /var/lib/drac + fperms 750 /var/lib/drac +} + +pkg_postinst() { + einfo "After configuring your IMAP/POP server for DRAC, and starting the" + einfo "dracd server (e.g. by running /etc/init.d/dracd start) you can" + einfo "set up your MTA to check for authenticated hosts in:" + einfo " /var/lib/drac/drac" + einfo "Please see the MTA documentation for more details." + echo +} diff --git a/mail-client/drac/drac-1.12.ebuild b/mail-client/drac/drac-1.12.ebuild new file mode 100644 index 000000000000..4e058eeec285 --- /dev/null +++ b/mail-client/drac/drac-1.12.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-client/drac/drac-1.12.ebuild,v 1.1 2004/05/30 03:09:23 seemant Exp $ + +inherit eutils + +DESCRIPTION="A robust implementation of POP-before-SMTP" +HOMEPAGE="http://mail.cc.umanitoba.ca/drac/" +SRC_URI="ftp://ftp.cc.umanitoba.ca/src/${PN}.tar.Z" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="x86" +IUSE="debug" + +DEPEND="virtual/glibc + sys-libs/db + >=net-mail/sendmail-8.9" + +S=${WORKDIR} + +src_compile() { + cp Makefile Makefile.orig + sed \ + -e "s:INSTALL = /usr/ucb/install:INSTALL = install:" \ + -e "s:EBIN = /usr/local/sbin:EBIN = /usr/sbin:" \ + -e "s:MAN = /usr/local/man/man:MAN = /usr/share/man/man:" \ + -e "s:DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO:DEFS = -DSOCK_RPC -DFCNTL_LOCK -DGETHOST -DDASH_C:" \ + -e "s:CC = cc:CC = gcc:" \ + -e "s:LDLIBS = -L/usr/local/src/db/db-4.1.25/build_unix -lnsl -ldb-4.1:LDLIBS = -ldb:" \ + -e "s:TSTLIBS = -L. -ldrac -lnsl:TSTLIBS = -L. -ldrac:" \ + -e "s:RPCGENFLAGS =:RPCGENFLAGS = -C -I:" \ + -e "s:MANADM = 1m:MANADM = 8:" \ + < Makefile.orig > Makefile + if [ `use debug` ]; then + cp Makefile Makefile.posthacked + sed -e "s:CFLAGS = \$(DEFS) -g -I/usr/local/src/db/db-4.1.25/build_unix:CFLAGS = \$(DEFS) -g ${CFLAGS}:" \ + < Makefile.posthacked > Makefile + else + cp Makefile Makefile.posthacked + sed -e "s:CFLAGS = \$(DEFS) -g -I/usr/local/src/db/db-4.1.25/build_unix:CFLAGS = \$(DEFS) ${CFLAGS}:" \ + < Makefile.posthacked > Makefile + fi + make || die +} + +src_install() { + dobin rpc.dracd + mv rpc.dracd.1m rpc.dracd.8 + doman dracauth.3 rpc.dracd.8 +} diff --git a/mail-client/drac/files/digest-drac-1.12 b/mail-client/drac/files/digest-drac-1.12 new file mode 100644 index 000000000000..c04ee89baf19 --- /dev/null +++ b/mail-client/drac/files/digest-drac-1.12 @@ -0,0 +1 @@ +MD5 fadaee589bf1dd9067222d58637d5fe4 drac.tar.Z 20705 diff --git a/mail-client/drac/files/digest-drac-1.12-r1 b/mail-client/drac/files/digest-drac-1.12-r1 new file mode 100644 index 000000000000..c04ee89baf19 --- /dev/null +++ b/mail-client/drac/files/digest-drac-1.12-r1 @@ -0,0 +1 @@ +MD5 fadaee589bf1dd9067222d58637d5fe4 drac.tar.Z 20705 diff --git a/mail-client/drac/files/drac_rotate b/mail-client/drac/files/drac_rotate new file mode 100644 index 000000000000..45cce3a4dc4d --- /dev/null +++ b/mail-client/drac/files/drac_rotate @@ -0,0 +1,99 @@ +#!/bin/bash + +usage="[/path/to/real_file.db [/path/to/link_file.db]] [--debug] [--verbose]" +help=" +A DRAC-enabled MTA performs better by using a seldomly, instead of +constantly changing, access database. This script creates a link +to a snapshotted database which the MTA can use. It is designed +to run every minute from cron. Here is an example cron configuration: + + * * * * * $(basename "$0") +" + +for i in $* ; do + case "${i}" in + --verbose | -verbose | -v | --debug | -debug | -d) + debug=1 + ;; + --usage | -usage | -u ) + echo "usage: $(basename "$0") ${usage}" + exit 1 + ;; + --help | -help | -h) + echo "${help}" + echo "usage: $(basename "$0") ${usage}" + echo + exit 1 + ;; + *) + args[${#args}]="${i}" + ;; + esac +done + +debug_print() { + if [ -n "${debug}" ] ; then + if [ -n "$2" ] ; then + echo -n "$1 ... " + else + echo "$1" + fi + fi +} + +check_result() { + if [ "$?" -ne 0 ] ; then + debug_print + if [ -n "$1" ] ; then + echo "$(basename "$0"): $1, exiting ..." + else + echo "$(basename "$0"): exiting ..." + fi + exit 1 + fi +} + +debug_print "finding current minute" "1" +min="$(date '+%-M')" && \ +[ -n "${min}" ] +check_result "can't determine current minute" +debug_print "success! (${min})" + +debug_print "finding drac database file" "1" +real="${args[0]:-/var/lib/drac/drac.db}" && \ +[ -n "${real}" -a -f "${real}" ] +check_result "can't find drac database file" +debug_print "success! (${real})" + +debug_print "setting drac link file" "1" +link="${args[1]:-/var/lib/drac/drac_link.db}" && \ +[ -n "${link}" -a -d "$(dirname "${link}")" ] +check_result "can't set drac link file" +debug_print "success! (${link})" + +debug_print "finding new drac database" "1" +new="${real}$(( ${min} % 3 ))" && \ +[ "${new}" != "${real}" ] +check_result "can't set new drac database" +debug_print "success! (${new})" + +debug_print "finding old drac database" "1" +old="${real}$(( (${min} + 1) % 3 ))" && \ +[ "${old}" != "${real}" -a "${old}" != "${new}" ] +check_result "can't set old drac database" +debug_print "success! (${old})" + +debug_print "creating new drac database" "1" +cp "${real}" "${new}" +check_result "can't create new drac database" +debug_print "success! ($(basename "${real}") -> $(basename "${new}"))" + +debug_print "linking new drac database" "1" +ln -sf "${new}" "${link}" +check_result "can't link new drac database" +debug_print "success! ($(basename "${new}") -> $(basename "${link}"))" + +debug_print "removing old drac database" "1" +rm -f "${old}" +check_result "can't remove old drac database" +debug_print "success! (${old})" diff --git a/mail-client/drac/files/dracd.rc6 b/mail-client/drac/files/dracd.rc6 new file mode 100644 index 000000000000..cddcbdc39466 --- /dev/null +++ b/mail-client/drac/files/dracd.rc6 @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-client/drac/files/dracd.rc6,v 1.1 2004/05/30 03:09:23 seemant Exp $ + +depend() { + need net portmap +} + +start() { + ebegin "Starting dracd" + start-stop-daemon --start --quiet --exec /usr/sbin/dracd \ + -- -i -e 5 /var/lib/drac/drac.db + eend $? +} + +stop() { + ebegin "Stopping dracd" + start-stop-daemon --stop --quiet --exec /usr/sbin/dracd + eend $? +} diff --git a/mail-client/drac/metadata.xml b/mail-client/drac/metadata.xml new file mode 100644 index 000000000000..51f94e3fbe0e --- /dev/null +++ b/mail-client/drac/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-mail</herd> +</pkgmetadata> |