Skip to content

Commit

Permalink
Fixes for PR pkg/45818 (#1 and #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
pettai committed Apr 4, 2012
1 parent 636fb50 commit c27208c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 35 deletions.
4 changes: 2 additions & 2 deletions mail/sid-milter/MESSAGE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2010/03/12 22:42:55 pettai Exp $
$NetBSD: MESSAGE,v 1.2 2012/04/04 22:09:49 pettai Exp $

sid-milter is now installed.
The documentation can be found at ${PREFIX}/share/doc/sid-milter/
Expand All @@ -9,7 +9,7 @@ for setting up sid-milter.

At a minmium you will need to specify:

sidmilter_flags="-p socketfile -d domain"
sidfilter_flags="-p socketfile -d domain"

in your /etc/rc.conf.

Expand Down
11 changes: 6 additions & 5 deletions mail/sid-milter/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.2 2011/12/05 08:07:52 pettai Exp $
# $NetBSD: Makefile,v 1.3 2012/04/04 22:09:49 pettai Exp $
#

DISTNAME= sid-milter-1.0.0
PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sid-milter/}

Expand All @@ -18,7 +19,7 @@ USE_BUILTIN.libmilter= NO
USE_TOOLS+= gm4
MAKE_ENV+= M4=${M4:Q}
PTHREAD_OPTS+= require
RCD_SCRIPTS= sid-milter
RCD_SCRIPTS= sid-filter

SIDDOC= ${PREFIX}/share/doc/sid-milter

Expand All @@ -28,7 +29,7 @@ SUBST_FILES.libs= sid-filter/Makefile.m4
SUBST_SED.libs= -e "s|@LMBASE@|${BUILDLINK_PREFIX.libmilter}|g"
SUBST_MESSAGE.libs= Fixing paths.

INSTALLATION_DIRS= bin include lib ${PKGMANDIR}/cat3 ${PKGMANDIR}/cat8
INSTALLATION_DIRS= bin include lib ${PKGMANDIR}/man3 ${PKGMANDIR}/man8

post-extract:
${CP} ${FILESDIR}/sid-filter.m4 ${WRKSRC}/sid-filter/Makefile.m4
Expand All @@ -43,11 +44,11 @@ do-install:
${INSTALL_LIB} ${WRKSRC}/${SIDWORK}/libar/libar.a \
${DESTDIR}${PREFIX}/lib
${INSTALL_MAN} ${WRKSRC}/${SIDWORK}/libar/ar.0 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/cat3/
${DESTDIR}${PREFIX}/${PKGMANDIR}/man3/
${INSTALL_PROGRAM} ${WRKSRC}/${SIDWORK}/sid-filter/sid-filter \
${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/${SIDWORK}/sid-filter/sid-filter.0 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/cat8/
${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/
${INSTALL_DATA} ${WRKSRC}/FEATURES ${DESTDIR}${SIDDOC}
${INSTALL_DATA} ${WRKSRC}/INSTALL ${DESTDIR}${SIDDOC}
${INSTALL_DATA} ${WRKSRC}/KNOWNBUGS ${DESTDIR}${SIDDOC}
Expand Down
8 changes: 4 additions & 4 deletions mail/sid-milter/PLIST
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2010/03/12 22:42:55 pettai Exp $
@comment $NetBSD: PLIST,v 1.2 2012/04/04 22:09:49 pettai Exp $
bin/sid-filter
include/sm-marid.h
lib/libar.a
man/cat3/ar.0
man/cat8/sid-filter.0
man/man3/ar.0
man/man8/sid-filter.0
share/doc/sid-milter/FEATURES
share/doc/sid-milter/INSTALL
share/doc/sid-milter/KNOWNBUGS
Expand All @@ -14,4 +14,4 @@ share/doc/sid-milter/RELEASE_NOTES
share/doc/sid-milter/rfc4406.txt
share/doc/sid-milter/rfc4407.txt
share/doc/sid-milter/rfc4408.txt
share/examples/rc.d/sid-milter
share/examples/rc.d/sid-filter
38 changes: 38 additions & 0 deletions mail/sid-milter/files/sid-filter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: sid-filter.sh,v 1.1 2012/04/04 22:09:49 pettai Exp $
#
# PROVIDE: sidfilter
# REQUIRE: DAEMON

if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi

name="sidfilter"
rcvar=$name
command="@PREFIX@/bin/sid-filter"
pidfile="@VARBASE@/run/sid-filter/${name}.pid"
command_args="-p local:@VARBASE@/run/sid-filter/${name}.sock -P ${pidfile} -l"
start_precmd="sidfilter_precmd"

sidfilter_precmd()
{
if [ ! -d @VARBASE@/run/sid-filter ]; then
@MKDIR@ @VARBASE@/run/sid-filter
@CHMOD@ 0750 @VARBASE@/run/sid-filter
@CHOWN@ smmsp:smmsp @VARBASE@/run/sid-filter
fi

if [ -f @VARBASE@/run/sid-filter/${name}.sock ]; then
@RM@ -f @VARBASE@/run/sid-filter/${name}.sock
fi
}

if [ -f /etc/rc.subr ]; then
load_rc_config $name
run_rc_command "$1"
else
echo -n " ${name}"
${command} ${sidfilter_flags} ${command_args}
fi
24 changes: 0 additions & 24 deletions mail/sid-milter/files/sid-milter.sh

This file was deleted.

0 comments on commit c27208c

Please sign in to comment.