diff options
Diffstat (limited to 'mail-client/drac')
-rw-r--r-- | mail-client/drac/Manifest | 7 | ||||
-rw-r--r-- | mail-client/drac/drac-1.12-r1.ebuild | 71 | ||||
-rw-r--r-- | mail-client/drac/files/drac_rotate | 99 | ||||
-rw-r--r-- | mail-client/drac/files/dracd.rc6 | 20 | ||||
-rw-r--r-- | mail-client/drac/metadata.xml | 8 |
5 files changed, 205 insertions, 0 deletions
diff --git a/mail-client/drac/Manifest b/mail-client/drac/Manifest new file mode 100644 index 000000000000..be7beb407eff --- /dev/null +++ b/mail-client/drac/Manifest @@ -0,0 +1,7 @@ +AUX drac_rotate 2540 SHA256 d24a580354e6775c9050f6430b7324d99e03c1b45b4aaa314533141f401476e7 SHA512 ea7b36ba661d1e85254cd7125ad33006a4e0c378254a05f2de6e7a2121483d16b499f8ca8025e9b01e836a04ad9fa6a2ce3c8752e256c2d0fa4952e50387dcfc WHIRLPOOL 861235cdae2b577360e1422681b78b6fbbdf6e7fa94c8961681450c03ea684e704d1905eea9f34f106cabfda5be830ad8ab5a454a754159ae6b037d46df8db48 +AUX dracd.rc6 403 SHA256 a5212b328b53b7ef8218427be055dd1bc4ba714405f092ed2d7a8fdfc5722331 SHA512 04011ae461fdfaa751507fd5b59721fcbc5d624c52b6c7007431ae2e331d2ebe9111e75bd2273809ca3e26f1aff438751f994a3b1243ea85045625e45f4a6ed5 WHIRLPOOL cbddcb95d31b6a5dbe3eec4028c96a811dad0cf858707bb40f7862131464dc736e568972351e7f61d0be9c4458a73a05896b03a92bcfd182d1bb895b6e9407c7 +DIST drac.tar.Z 20705 SHA256 2c184de422ae4b347464de5083c38cb8d3ab4d53b6584514c7a5bd67870729db SHA512 09f14c5e72f9ca68b12039c16215d29f7d8e8940046b79dc9bb8f2363188b6fdd253af7ca41e42369ed67d5e4f5d6c20b3d3bf9f27cd194c53a7fc6e619b29fc WHIRLPOOL 74375945b1aed33e95b9b19ba4ba3c992db95f58e071a1f7582dac491fafb78a84ba81513aa66956db0880966469e8462c5ae3b23d3d55c9f9719fbe2e2103fd +EBUILD drac-1.12-r1.ebuild 1844 SHA256 afc46e9fdf69ac73a402eb1e69dd799a3e244314899b4c9a982cb6c2e7ede331 SHA512 d87f9e5dc6e0b1c09ee5635eedba83b20be6498c3ade6d8468081568ea7362d19df4a210efe48ee38a1fb259b95685eac3e72d0081eeba1f6f0faee629ee56ac WHIRLPOOL 9f639ff713b3a0cba6d02899fe2ecd276c768036c1b7a9a96ed79da5d80130f0c32e27cdf7f706461d5f711707021cf9033e780f6f69554ff85cbac1b2ac65d4 +MISC ChangeLog 2589 SHA256 5a344390bda06f38e5edae64d4b6dcfe42ff53a471b0aa605e39f9a331e2deac SHA512 840d54b0401d4259e52c3082f7ad19442dbd51fe8886362a26ec9055d4c7270cb13babfba623eeff608adc8695616bc3aebee8b86ae52a41b0d916f8f6b5a0b5 WHIRLPOOL 8e0cd76a21d6cb79ad802cc50cc97692b8238b6f4eeee7d515a0c4aa85ed2e754772b637913f6a9c41cb5e3936f7367f411e6b8ad6858d25b16d78cef95dabc2 +MISC ChangeLog-2015 3372 SHA256 dad4a950448f39ac93a79064058b2eabc35bca494fa9f779e44141bbed0e9564 SHA512 54c73a4e53759a9132a3cfe97dcb48f2ec31153a486f12803749f5a206810061cdab72808d633c1baf5e5707fc16cd3313f4eb0d1a6f3723b906cd1ab0d41847 WHIRLPOOL dd6904cdb56b2699fe53f7cc7d5912556d0888240a8406d18f5596c925522fa199c6c4ccbbba29fe3144ef602fbdd88c07d8976c467681cc30c716140d0adb02 +MISC metadata.xml 240 SHA256 f0e0bb7a24c4b1ff6b6a8a3e9315245c298499c03fbda429c0f775ec6a5396af SHA512 97824dbce22630efb21e647b55212b7a8a19d8e38b5bf05cb0b8078530bbbaaf4dc91284e2a11beab7dfcfb779df82b87b49d11a746c7a4f6dc71f2fda8942db WHIRLPOOL a7adfcb24489ae67a43a59d8350a70b20874fb03de95681c5b516a741d95422560a433f641de5a7222cf5d3500333e215055ec0cb3844e7abc6d6a836de97357 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..faabd717caab --- /dev/null +++ b/mail-client/drac/drac-1.12-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit toolchain-funcs + +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="rc" +SLOT="0" +KEYWORDS="x86 sparc ppc hppa ~amd64 ppc64" +IUSE="debug" + +DEPEND="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 = $(tc-getCC):" \ + -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 + + newinitd "${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() { + elog "After configuring your IMAP/POP server for DRAC, and starting the" + elog "dracd server (e.g. by running /etc/init.d/dracd start) you can" + elog "set up your MTA to check for authenticated hosts in:" + elog " /var/lib/drac/drac" + elog "Please see the MTA documentation for more details." + echo +} 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..fb8e2f109d53 --- /dev/null +++ b/mail-client/drac/files/dracd.rc6 @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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..9a6d80e5da48 --- /dev/null +++ b/mail-client/drac/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>net-mail@gentoo.org</email> + <name>Net-Mail</name> +</maintainer> +</pkgmetadata> |