aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormnag <mnag@FreeBSD.org>2005-11-13 04:18:42 +0800
committermnag <mnag@FreeBSD.org>2005-11-13 04:18:42 +0800
commit4a52f63c61871e977f24c3f89a26d3c38f51afdd (patch)
tree7a3e9957816f6ca08b1ef4854cb6f3d4dbda157b
parentd570ee60f85cc7b2f27e333abc40b2cc772ed204 (diff)
downloadfreebsd-ports-gnome-4a52f63c61871e977f24c3f89a26d3c38f51afdd.tar.gz
freebsd-ports-gnome-4a52f63c61871e977f24c3f89a26d3c38f51afdd.tar.zst
freebsd-ports-gnome-4a52f63c61871e977f24c3f89a26d3c38f51afdd.zip
Add rc scripts dkfilter_in.sh and dkfilter_out.sh
Fix pkg-descr and one patch to fix Signature.pm Bump PORTREVISION PR: 88881 Submitted by: Yoshisato YANAGISAWA <yanagisawa@csg.is.titech.ac.jp> (maintainer)
-rw-r--r--mail/dkfilter/Makefile3
-rw-r--r--mail/dkfilter/distinfo1
-rw-r--r--mail/dkfilter/files/dkfilter_in.sh.in56
-rw-r--r--mail/dkfilter/files/dkfilter_out.sh.in62
-rw-r--r--mail/dkfilter/files/patch-lib__Mail__DomainKeys__Signature.pm23
-rw-r--r--mail/dkfilter/pkg-descr4
6 files changed, 147 insertions, 2 deletions
diff --git a/mail/dkfilter/Makefile b/mail/dkfilter/Makefile
index bd9055a91dae..241b88bb300f 100644
--- a/mail/dkfilter/Makefile
+++ b/mail/dkfilter/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dkfilter
PORTVERSION= 0.8
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://jason.long.name/dkfilter/
DISTNAME= ${PORTNAME}
@@ -23,6 +24,8 @@ BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Crypt/OpenSSL/RSA.pm:${PORTSDIR}/securi
RUN_DEPENDS= ${BUILD_DEPENDS}
GNU_CONFIGURE= yes
+USE_RC_SUBR= dkfilter_in.sh dkfilter_out.sh
+
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
.include <bsd.port.pre.mk>
diff --git a/mail/dkfilter/distinfo b/mail/dkfilter/distinfo
index a852a9b80334..735b74c308bf 100644
--- a/mail/dkfilter/distinfo
+++ b/mail/dkfilter/distinfo
@@ -1,2 +1,3 @@
MD5 (dkfilter.tgz) = ab0bab68dc09d3a86acccd1115b4c28a
+SHA256 (dkfilter.tgz) = 7113453ab611f322513fb980d5e50026435934d60e863511ac1e7e3a87400742
SIZE (dkfilter.tgz) = 76885
diff --git a/mail/dkfilter/files/dkfilter_in.sh.in b/mail/dkfilter/files/dkfilter_in.sh.in
new file mode 100644
index 000000000000..fb947977e123
--- /dev/null
+++ b/mail/dkfilter/files/dkfilter_in.sh.in
@@ -0,0 +1,56 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+# PROVIDE: dkfilter_in
+# REQUIRE: LOGIN
+# BEFORE: mail
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable dkfilter.in:
+#
+# dkfilter_in_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=dkfilter_in
+rcvar=`set_rcvar`
+
+# set defaults
+
+dkfilter_in_enable=${dkfilter_in_enable:-"NO"}
+dkfilter_in_flags=${dkfilter_in_flags:-"127.0.0.1:10025 127.0.0.1:10026"}
+dkfilter_in_pidfile=${dkfilter_in_pidfile:-"/var/run/dkfilter_in.pid"}
+dkfilter_in_user=${dkfilter_user:-"dkfilter"}
+
+start_cmd="dkfilter_in_start"
+stop_cmd="dkfilter_in_stop"
+
+dkfilter_in_start()
+{
+ if [ -f ${dkfilter_in_pidfile} ]; then
+ echo "${name} already running?"
+ exit 1
+ fi
+ touch ${dkfilter_in_pidfile}
+ chown ${dkfilter_in_user} ${dkfilter_in_pidfile}
+ su -m ${dkfilter_in_user} -c "daemon -p ${dkfilter_in_pidfile} \
+ %%PREFIX%%/bin/dkfilter.in ${dkfilter_in_flags}"
+ echo "Starting ${name}"
+}
+
+dkfilter_in_stop()
+{
+ if [ ! -f ${dkfilter_in_pidfile} ]; then
+ echo "${name} not running?"
+ exit 1
+ fi
+ kill `cat ${dkfilter_in_pidfile}`
+ rm -f ${dkfilter_in_pidfile}
+ echo "Stopping ${name}"
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/dkfilter/files/dkfilter_out.sh.in b/mail/dkfilter/files/dkfilter_out.sh.in
new file mode 100644
index 000000000000..349c6be559a3
--- /dev/null
+++ b/mail/dkfilter/files/dkfilter_out.sh.in
@@ -0,0 +1,62 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+# PROVIDE: dkfilter_out
+# REQUIRE: LOGIN
+# BEFORE: mail
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable dkfilter.out:
+#
+# dkfilter_out_enable="YES"
+#
+# Before you enable dkfilter.out, you also need to make your domainkey to
+# set it to DNS and configurate dkfilter_flags.
+#
+
+. %%RC_SUBR%%
+
+name="dkfilter_out"
+rcvar=`set_rcvar`
+
+# set defaults
+
+dkfilter_out_enable=${dkfilter_out_enable:-"NO"}
+dkfilter_out_flags=${dkfilter_out_flags:-" --header \
+ --keyfile=%%PREFIX%%/etc/dkfilter/private.key \
+ --selector=selector1 --domain=example.org --method=nofws \
+ 127.0.0.1:10027 127.0.0.1:10028"}
+dkfilter_out_pidfile=${dkfilter_out_pidfile:-"/var/run/dkfilter_out.pid"}
+dkfilter_out_user=${dkfilter_user:-"dkfilter"}
+
+start_cmd="dkfilter_out_start"
+stop_cmd="dkfilter_out_stop"
+
+dkfilter_out_start()
+{
+ if [ -f ${dkfilter_out_pidfile} ]; then
+ echo "${name} already running?"
+ exit 1
+ fi
+ touch ${dkfilter_out_pidfile}
+ chown ${dkfilter_out_user} ${dkfilter_out_pidfile}
+ su -m ${dkfilter_out_user} -c "daemon -p ${dkfilter_out_pidfile} \
+ %%PREFIX%%/bin/dkfilter.out ${dkfilter_out_flags}"
+ echo "Starting ${name}."
+}
+
+dkfilter_out_stop()
+{
+ if [ ! -f ${dkfilter_out_pidfile} ]; then
+ echo "${name} not running?"
+ exit 1
+ fi
+ kill `cat ${dkfilter_out_pidfile}`
+ rm -f ${dkfilter_out_pidfile}
+ echo "Stopping ${name}"
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/dkfilter/files/patch-lib__Mail__DomainKeys__Signature.pm b/mail/dkfilter/files/patch-lib__Mail__DomainKeys__Signature.pm
new file mode 100644
index 000000000000..b4503f7de64f
--- /dev/null
+++ b/mail/dkfilter/files/patch-lib__Mail__DomainKeys__Signature.pm
@@ -0,0 +1,23 @@
+--- lib/Mail/DomainKeys/Signature.pm.orig Wed Jun 22 00:43:53 2005
++++ lib/Mail/DomainKeys/Signature.pm Sat Nov 12 01:49:56 2005
+@@ -78,14 +78,15 @@
+ $self->algorithm and
+ $text .= "a=" . $self->algorithm . "; ";
+
++ $text .= "q=" . $self->protocol . "; ";
++ $text .= "c=" . $self->method . ";\n\t";
++ $text .= "s=" . $self->selector . "; ";
++ $text .= "d=" . $self->domain . ";\n\t";
++
+ $self->headerlist and
+- $text .= "h=" . $self->headerlist . "; ";
++ $text .= "h=" . $self->headerlist . ";\n\t";
+
+ $text .= "b=" . $self->signature . "; ";
+- $text .= "c=" . $self->method . "; ";
+- $text .= "d=" . $self->domain . "; ";
+- $text .= "q=" . $self->protocol . "; ";
+- $text .= "s=" . $self->selector;
+
+ length $text and
+ return $text;
diff --git a/mail/dkfilter/pkg-descr b/mail/dkfilter/pkg-descr
index 187dc4b64cc0..7c81b3cd9cd0 100644
--- a/mail/dkfilter/pkg-descr
+++ b/mail/dkfilter/pkg-descr
@@ -1,7 +1,7 @@
-This is implementation of DomainKeys draft standard for the Postfix mail
+This is an implementation of DomainKeys draft standard for the Postfix mail
transfer agent. DomainKeys is proposed by Yahoo!, Inc. and this is a scheme
to sign and verify e-mail messages on a per-domain basis.
Protocol and other issues about this draft standard can be found at
-http://antispam.yahoo.com/domain/keys.
+http://antispam.yahoo.com/domainkeys.
WWW: http://jason.long.name/dkfilter/