aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/esecanna
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2010-03-27 08:33:31 +0800
committerdougb <dougb@FreeBSD.org>2010-03-27 08:33:31 +0800
commitb856146c9d4ae5e4c2fa70b9031c9e13f7b5f194 (patch)
treef69cc3d52bdfa20efc33c0da84cd3d92886cd8f2 /japanese/esecanna
parentc95757bf8977796444544918518204869dc4cfb0 (diff)
downloadfreebsd-ports-gnome-b856146c9d4ae5e4c2fa70b9031c9e13f7b5f194.tar.gz
freebsd-ports-gnome-b856146c9d4ae5e4c2fa70b9031c9e13f7b5f194.tar.zst
freebsd-ports-gnome-b856146c9d4ae5e4c2fa70b9031c9e13f7b5f194.zip
Properly utilize USE_RC_SUBR
Diffstat (limited to 'japanese/esecanna')
-rw-r--r--japanese/esecanna/Makefile13
-rw-r--r--japanese/esecanna/files/esecanna.in (renamed from japanese/esecanna/files/esecanna.sh)17
2 files changed, 16 insertions, 14 deletions
diff --git a/japanese/esecanna/Makefile b/japanese/esecanna/Makefile
index 6bd5f1e9a54a..40912dbbdb6c 100644
--- a/japanese/esecanna/Makefile
+++ b/japanese/esecanna/Makefile
@@ -7,7 +7,7 @@
PORTNAME= esecanna
PORTVERSION= 1.0.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= japanese
MASTER_SITES= http://esecanna.netfort.gr.jp/ \
${MASTER_SITE_LOCAL}
@@ -18,19 +18,14 @@ DIST_SUBDIR= esecanna
MAINTAINER= ports@FreeBSD.org
COMMENT= Pseudo cannaserver which wraps some other input engines
-USE_RC_SUBR= yes
+USE_RC_SUBR= esecanna
GNU_CONFIGURE= yes
USE_GMAKE= yes
-CONFIGURE_ARGS= --with-piddir="${PIDDIR}"
+CONFIGURE_ARGS= --with-piddir="/var/run/esecanna"
-PIDDIR= /var/run/esecanna
DOCS= CREDITS CHANGES.jp README.First.jp README.jp
-post-extract:
- ${SED} -e 's,%%PREFIX%%,${PREFIX},g' -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
- ${FILESDIR}/esecanna.sh > ${WRKSRC}/esecanna.sh
-
post-patch:
${REINPLACE_CMD} -e " \
s,!!PREFIX!!,${PREFIX},g; \
@@ -39,13 +34,11 @@ post-patch:
${WRKSRC}/esecannarc
post-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/esecanna.sh ${PREFIX}/etc/rc.d/
${MKDIR} ${PREFIX}/lib/esecanna
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/esecanna
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/esecanna/
.endif
- ${MKDIR} ${PIDDIR}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/japanese/esecanna/files/esecanna.sh b/japanese/esecanna/files/esecanna.in
index fd4390a787f4..6306ecbfbe97 100644
--- a/japanese/esecanna/files/esecanna.sh
+++ b/japanese/esecanna/files/esecanna.in
@@ -1,11 +1,17 @@
#!/bin/sh
-#
-# $FreeBSD$
+# $FreeBSD$
+#
# PROVIDE: esecanna
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# esecanna_enable (bool): Set to NO by default.
+# Set it to YES to enable esecanna.
. /etc/rc.subr
@@ -25,8 +31,6 @@ required_files=%%PREFIX%%/etc/esecannarc
start_precmd="esecanna_prestart"
-[ -z "$esecanna_enable" ] && esecanna_enable=NO
-
esecanna_prestart () {
if [ -f %%PREFIX%%/vje30/.version ] \
&& grep -qw 'FREE TRIAL VERSION' %%PREFIX%%/vje30/.version; then
@@ -36,7 +40,12 @@ esecanna_prestart () {
fi
/bin/rm -f /tmp/.iroha_unix/IROHA
+
+ /bin/mkdir -p /var/run/esecanna
}
load_rc_config $name
+
+: ${esecanna_enable="NO"}
+
run_rc_command "$1"