diff options
author | mbr <mbr@FreeBSD.org> | 2006-04-15 16:37:18 +0800 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2006-04-15 16:37:18 +0800 |
commit | 6bcd4cb833979b8555af30e4b74f08e19e2e7bb2 (patch) | |
tree | 19e7cd8de31546571b0b237a854920deca91f5ba /mail/up-imapproxy | |
parent | 0e62a4a2f80ae4530c2971c88c740c5a69b82df2 (diff) | |
download | freebsd-ports-gnome-6bcd4cb833979b8555af30e4b74f08e19e2e7bb2.tar.gz freebsd-ports-gnome-6bcd4cb833979b8555af30e4b74f08e19e2e7bb2.tar.zst freebsd-ports-gnome-6bcd4cb833979b8555af30e4b74f08e19e2e7bb2.zip |
Fix test if imapproxyd.conf exists
Bump PORTREVISION
Reorganize and fix rc.d script. Imapproxyd requires imap daemon started
PR: 95304
Submitted by: Marcus Alves Grando <mnag _ at _ FreeBSD.org>
Diffstat (limited to 'mail/up-imapproxy')
-rw-r--r-- | mail/up-imapproxy/Makefile | 16 | ||||
-rw-r--r-- | mail/up-imapproxy/files/imapproxyd.sh.in | 19 |
2 files changed, 22 insertions, 13 deletions
diff --git a/mail/up-imapproxy/Makefile b/mail/up-imapproxy/Makefile index 5b354ec73298..1796626beff6 100644 --- a/mail/up-imapproxy/Makefile +++ b/mail/up-imapproxy/Makefile @@ -7,6 +7,7 @@ PORTNAME= imapproxy PORTVERSION= 1.2.4 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.imapproxy.org/downloads/ PKGNAMEPREFIX= up- @@ -19,14 +20,17 @@ USE_REINPLACE= YES GNU_CONFIGURE= YES USE_RC_SUBR= imapproxyd.sh +.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> diff --git a/mail/up-imapproxy/files/imapproxyd.sh.in b/mail/up-imapproxy/files/imapproxyd.sh.in index 2938c658f7df..306b2b941257 100644 --- a/mail/up-imapproxy/files/imapproxyd.sh.in +++ b/mail/up-imapproxy/files/imapproxyd.sh.in @@ -2,24 +2,29 @@ # # $FreeBSD$ # - # 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 +required_files="${imapproxyd_conf}" -load_rc_config $name run_rc_command "$1" |