View | Details | Raw Unified | Return to bug 81417
Collapse All | Expand All

(-)../../../src/workdir/milter-bogom/Makefile (-10 / +15 lines)
Lines 6-14 Link Here
6
#
6
#
7
7
8
PORTNAME=	milter-bogom
8
PORTNAME=	milter-bogom
9
PORTVERSION=	1.5.1
9
PORTVERSION=	1.7.1
10
CATEGORIES=	mail
10
CATEGORIES=	mail
11
MASTER_SITES=	http://www.usebox.net/jjm/bogom/
11
MASTER_SITES=	http://www.usebox.net/jjm/bogom/ \
12
		http://blackshell.usebox.net/bogom/
12
DISTNAME=	bogom-${PORTVERSION}
13
DISTNAME=	bogom-${PORTVERSION}
13
14
14
MAINTAINER=	victor@alf.dyndns.ws
15
MAINTAINER=	victor@alf.dyndns.ws
Lines 18-33 Link Here
18
19
19
MAN8=		bogom.8
20
MAN8=		bogom.8
20
21
22
CFLAGS+=	-DDEF_CONF=\\\"${PREFIX}/etc/bogom.conf\\\" ${PTHREAD_CFLAGS}
23
LIBS+=		-lmilter ${PTHREAD_LIBS}
24
MAKE_ARGS=	LIBS="${LIBS}"
25
26
USE_RC_SUBR=	yes
27
21
PLIST_FILES=	sbin/bogom \
28
PLIST_FILES=	sbin/bogom \
22
		etc/bogom.conf-example \
29
		etc/bogom.conf-example \
23
		etc/rc.d/milter-bogom.sh
30
		etc/rc.d/milter-bogom.sh
24
PORTDOCS=	README CHANGELOG
31
PORTDOCS=	README CHANGELOG COPYING
25
26
post-extract:
27
	@${SED} -e 's/LIBS+=-lmilter -lpthread/LIBS+=-lmilter ${PTHREAD_LIBS}/'\
28
	-i .bak ${WRKSRC}/Makefile
29
	@${SED} -e 's|/etc/bogom.conf|${PREFIX}/etc/bogom.conf|' -i .bak \
30
	${WRKSRC}/milter.c
31
32
32
do-install:
33
do-install:
33
	@${INSTALL_PROGRAM} ${WRKSRC}/bogom ${PREFIX}/sbin
34
	@${INSTALL_PROGRAM} ${WRKSRC}/bogom ${PREFIX}/sbin
Lines 38-47 Link Here
38
	@${MKDIR} ${DOCSDIR}
39
	@${MKDIR} ${DOCSDIR}
39
	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
40
	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
40
	@${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${DOCSDIR}
41
	@${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${DOCSDIR}
42
	@${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR}
41
.endif
43
.endif
42
44
43
post-install:
45
post-install:
44
	@${SED} -e 's|LOCALBASE|${PREFIX}|g' -i "" \
46
	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' -i "" \
47
	${PREFIX}/etc/rc.d/milter-bogom.sh
48
	@${SED} -e 's|%%RC_SUBR%%|${RC_SUBR}|g' -i "" \
45
	${PREFIX}/etc/rc.d/milter-bogom.sh
49
	${PREFIX}/etc/rc.d/milter-bogom.sh
50
	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
46
51
47
.include <bsd.port.mk>
52
.include <bsd.port.mk>
(-)../../../src/workdir/milter-bogom/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (bogom-1.5.1.tar.gz) = 9dc9fc890819e22df3408b8a39837606
1
MD5 (bogom-1.7.1.tar.gz) = e8fa2a2c78ce866b4f23fedf6e0b8764
2
SIZE (bogom-1.5.1.tar.gz) = 16868
2
SIZE (bogom-1.7.1.tar.gz) = 18862
(-)../../../src/workdir/milter-bogom/files/milter-bogom.sh (-20 / +40 lines)
Lines 1-22 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
2
3
case "$1" in
3
# PROVIDE: milterbogom
4
	start)
4
# REQUIRE: LOGIN
5
		if [ -f LOCALBASE/sbin/bogom ]
5
# BEFORE: sendmail
6
		then
6
# KEYWORD: milterbogom
7
			LOCALBASE/sbin/bogom -u root & > /dev/null	
7
8
			echo -n ' milter-bogom' 
8
milterbogom_enable=${milterbogom_enable-"NO"}
9
		fi
9
milterbogom_socket=${milterbogom_socket-"unix:/var/run/bogom/milter.sock"}
10
		;;
10
milterbogom_user=${milterbogom_user-"bogomilter"}
11
	stop)
11
milterbogom_pid=${milterbogom_pid-"/var/run/bogom/bogom.pid"}
12
		killall bogom
12
milterbogom_flags=${milterbogom_flags-"-u ${milterbogom_user} \
13
		sleep 3 # wait for bogom to exit
13
-s ${milterbogom_socket} -p ${milterbogom_pid}"}
14
		;;
14
15
15
16
	*)
16
. %%RC_SUBR%%
17
		echo ""
17
18
		echo "Usage: `basename $0` { start | stop }"
18
name=milterbogom
19
		echo ""
19
pidfile=${milterbogom_pid}
20
		;;
20
rcvar=`set_rcvar`
21
esac
21
command=%%PREFIX%%/sbin/bogom
22
exit 0;
22
start_precmd="bogom_precmd"
23
stop_postcmd="bogom_postcmd"
24
25
load_rc_config $name
26
27
bogom_precmd()
28
{
29
    if [ -d `dirname ${milterbogom_pid}` ]
30
    then
31
	return;
32
    fi
33
    mkdir -p `dirname ${milterbogom_pid}`
34
    chown ${milterbogom_user} `dirname ${milterbogom_pid}`
35
}
36
37
bogom_postcmd()
38
{
39
    # just if the directory is empty
40
    rmdir `dirname ${milterbogom_pid}` > /dev/null 2>&1
41
}
42
run_rc_command "$1"
(-)../../../src/workdir/milter-bogom/pkg-deinstall (+11 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
if [ "$2" = "POST-DEINSTALL" ] 
4
then
5
	echo "***************************************************************"
6
	echo "* The bogomilter user will not be removed by this port        *"
7
	echo "* if you are not upgrading and will not use this port anymore *"
8
	echo "* delete the bogomilter user using:                           *"
9
	echo "* pw userdel bogomilter                                       *"
10
	echo "***************************************************************"
11
fi
(-)../../../src/workdir/milter-bogom/pkg-install (+17 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
if [ "$2" != "POST-INSTALL" ]
4
then
5
	exit 0;
6
fi
7
8
# check if bogomilter user exists
9
pw user show bogomilter > /dev/null 2>&1
10
11
if [ $? != 0 ]
12
then
13
	echo "===>  Adding user bogomilter"
14
	pw useradd bogomilter -u 174 -c "milter-bogom"
15
else
16
	echo "===>  Using existing user bogomilter" 
17
fi

Return to bug 81417