ports/95304: Update port: mail/up-imapproxy fix imapproxyd.conf overwrite
Marcus Alves Grando
mnag at FreeBSD.org
Tue Apr 4 13:20:16 UTC 2006
>Number: 95304
>Category: ports
>Synopsis: Update port: mail/up-imapproxy fix imapproxyd.conf overwrite
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 04 13:20:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Marcus Alves Grando
>Release: FreeBSD 6.1-PRERELEASE i386
>Organization:
Grupos Internet S/A
>Environment:
System: FreeBSD marcus.grupos.com.br 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #3: Tue Apr 4 01:24:07 BRT 2006 root at marcus.grupos.com.br:/usr/obj/usr/src/sys/MARCUS i386
>Description:
- Fix test if imapproxyd.conf exists
- Bump PORTREVISION
- Reorganize and fix rc.d script. Imapproxyd requires imap daemon started
>How-To-Repeat:
>Fix:
--- up-imapproxy.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/up-imapproxy/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile 28 Sep 2005 16:28:30 -0000 1.7
+++ Makefile 3 Apr 2006 17:35:03 -0000
@@ -7,6 +7,7 @@
PORTNAME= imapproxy
PORTVERSION= 1.2.4
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.imapproxy.org/downloads/
PKGNAMEPREFIX= up-
@@ -15,18 +16,21 @@
MAINTAINER= mbr at FreeBSD.org
COMMENT= A caching IMAP proxy server
-USE_REINPLACE= YES
GNU_CONFIGURE= YES
USE_RC_SUBR= imapproxyd.sh
+# Required by ".if !exists()"
+.include <bsd.port.pre.mk>
+
post-patch:
- @${REINPLACE_CMD} -e "s|-lc_r|${PTHREAD_LIBS}|g; s|-lpthread|${PTHREAD_LIBS}|g" ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e "s|-lc_r|${PTHREAD_LIBS}|g" \
+ -e "s|-lpthread|${PTHREAD_LIBS}|g" ${WRKSRC}/configure
post-install:
- ${INSTALL} -m 644 -c ${WRKSRC}/scripts/imapproxy.conf ${PREFIX}/etc/imapproxyd.conf.default
-. if !exists(${PREFIX}/etc/imapproxyd.conf)
- ${INSTALL} -m 644 -c ${WRKSRC}/scripts/imapproxy.conf ${PREFIX}/etc/imapproxyd.conf
-. endif
+ ${INSTALL_DATA} ${WRKSRC}/scripts/imapproxy.conf ${PREFIX}/etc/imapproxyd.conf.default
+.if !exists(${PREFIX}/etc/imapproxyd.conf)
+ ${INSTALL_DATA} ${WRKSRC}/scripts/imapproxy.conf ${PREFIX}/etc/imapproxyd.conf
+.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: files/imapproxyd.sh.in
===================================================================
RCS file: /home/pcvs/ports/mail/up-imapproxy/files/imapproxyd.sh.in,v
retrieving revision 1.2
diff -u -r1.2 imapproxyd.sh.in
--- files/imapproxyd.sh.in 20 Feb 2006 20:47:16 -0000 1.2
+++ files/imapproxyd.sh.in 3 Apr 2006 17:35:03 -0000
@@ -2,24 +2,30 @@
#
# $FreeBSD: ports/mail/up-imapproxy/files/imapproxyd.sh.in,v 1.2 2006/02/20 20:47:16 dougb Exp $
#
-
# PROVIDE: imapproxyd
-# REQUIRE: LOGIN
-# BEFORE: mail
+# REQUIRE: DAEMON courier_imap_imapd courier_imap_imapd_ssl cyrus_imapd
# KEYWORD: shutdown
-
#
# Add the following line to /etc/rc.conf to enable imapproxyd:
#
-#imapproxyd_enable="YES"
+# imapproxyd_enable (bool): Set "YES" to enable imapproxyd
+# Default is "NO"
+# imapproxyd_conf (file): Set location of conf file.
+# Default is "%%PREFIX%%/etc/imapproxyd.conf"
#
. %%RC_SUBR%%
name=imapproxyd
-rcvar=`set_rcvar`
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${imapproxyd_enable="NO"}
+: ${imapproxyd_conf="%%PREFIX%%/etc/imapproxyd.conf"}
command=%%PREFIX%%/sbin/in.imapproxyd
+command_args="-f ${imapproxyd_conf}"
+required_files="%%PREFIX%%/etc/imapproxyd.conf"
-load_rc_config $name
run_rc_command "$1"
--- up-imapproxy.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list