? patch-bincimap ? patch-bincimapd.diff ? work Index: Makefile =================================================================== RCS file: /home/pcvs/ports/mail/bincimap/Makefile,v retrieving revision 1.16 diff -u -r1.16 Makefile --- Makefile 21 Aug 2008 06:17:32 -0000 1.16 +++ Makefile 3 Feb 2011 10:26:19 -0000 @@ -12,6 +12,7 @@ PORTNAME= bincimap PORTVERSION= 1.2.13 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.bincimap.org/%SUBDIR%/ \ http://www.bincimap.andreas.hanssen.name/%SUBDIR%/ \ @@ -22,6 +23,10 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Light-weight IMAP server for Maildir +RUN_DEPENDS+= checkpassword-pam:${PORTSDIR}/security/checkpassword-pam \ + tcpserver:${PORTSDIR}/sysutils/ucspi-tcp + +USE_RC_SUBR= bincimapd USE_BZIP2= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --sysconfdir=${CONFDIR} Index: files/bincimapd.in =================================================================== RCS file: files/bincimapd.in diff -N files/bincimapd.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/bincimapd.in 3 Feb 2011 10:26:19 -0000 @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Copyright 2007, AnyWi Technologies +# +# PROVIDE: bincimapd +# REQUIRE: LOGIN cleanvar +# +# Note: tcpserver can be found in the sysutils/ucspi-tcp package. +. /etc/rc.subr +name="bincimapd" +rcvar=`set_rcvar` +load_rc_config $name +: ${bincimapd_enable="NO"} +: ${bincimapd_tcpserver="%%PREFIX%%/bin/tcpserver"} +: ${bincimapd_tcpserver_flags="-R -H"} +: ${bincimapd_host="0"} +: ${bincimapd_port="imap"} +: ${bincimapd_conf="%%PREFIX%%/etc/bincimap/bincimap.conf"} +: ${bincimapd_pidfile="/var/run/bincimapd.pid"} +: ${bincimapd_checkpassword="%%PREFIX%%/bin/checkpassword-pam"} # e.g. /usr/local/bin/checkpassword-pam +: ${bincimapd_checksubprogram="/usr/bin/true"} + +bincimapd_start() +{ + echo -n "Starting bincimapd: " + $bincimapd_tcpserver $bincimapd_tcpserver_flags $bincimapd_host $bincimapd_port \ + %%PREFIX%%/bin/bincimap-up --conf=$bincimapd_conf -- \ + %%PREFIX%%/bin/checkpassword-pam -s imap -- %%PREFIX%%/bin/bincimapd & + echo $! > $bincimapd_pidfile + echo "." +} + +bincimapd_stop() +{ + echo "Stopping bincimapd" + pkill -F $bincimapd_pidfile +} + +start_cmd="bincimapd_start" +stop_cmd="bincimapd_stop"