aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2010-03-19 05:42:30 +0800
committerdougb <dougb@FreeBSD.org>2010-03-19 05:42:30 +0800
commitf8d10deacac654f74611d90c9b32abdef04edb70 (patch)
treee490d053a9710f66b27e94909ed02d77dd502d95 /www
parentf04c86fa563b5a3b2171ce7a8272f0afaf0dfc36 (diff)
downloadfreebsd-ports-gnome-f8d10deacac654f74611d90c9b32abdef04edb70.tar.gz
freebsd-ports-gnome-f8d10deacac654f74611d90c9b32abdef04edb70.tar.zst
freebsd-ports-gnome-f8d10deacac654f74611d90c9b32abdef04edb70.zip
Fix the rc.d script-related problems with this port:
1. It's rc.d, not rcng 2. All new ports that use rc.d scripts need to use USE_RC_SUBR 3. The name of the script, PROVIDE, and $name should match the port name. 4. For the script itself: a. Added a $FreeBSD$ b. Added KEYWORD: shutdown since it starts a persistent service. c. Removed _flags from command=, it's spurious and will result in the flags being included twice. d. Moved the default variable assignment to after load_rc_config e. Made the conf file a required_file, and added it to command_args instead of _flags. Approved by: maintainer
Diffstat (limited to 'www')
-rw-r--r--www/thundercache/Makefile6
-rw-r--r--www/thundercache/files/thunder-rcNG.in21
-rw-r--r--www/thundercache/files/thundercache.in28
3 files changed, 32 insertions, 23 deletions
diff --git a/www/thundercache/Makefile b/www/thundercache/Makefile
index 39df9465baa0..15c12089537d 100644
--- a/www/thundercache/Makefile
+++ b/www/thundercache/Makefile
@@ -7,6 +7,7 @@
PORTNAME= thundercache
PORTVERSION= 4.0
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://www.bmsoftware.org/freebsd/ \
http://www6.freebsdbrasil.com.br/~eksffa/l/dev/thunder/ \
@@ -23,6 +24,8 @@ USE_BZIP2= yes
ONLY_FOR_ARCHS= i386 amd64
+USE_RC_SUBR= thundercache
+
NO_BUILD= yes
LICENSE= shareware / commercial
RESTRICTED= Commercial software with shareware license to 50 threads
@@ -49,7 +52,7 @@ RUN_DEPENDS+= sudo:${PORTSDIR}/security/sudo \
postgresql-server>=0:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server \
${LOCALBASE}/lib/php/${PHP_EXT_DIR}/pdo_pgsql.so:${PORTSDIR}/databases/php5-pdo_pgsql
-SUB_FILES= pkg-message thunder-rcNG log.sh
+SUB_FILES= pkg-message log.sh
pre-everything::
.if !defined(WITH_DEPENDACK)
@@ -73,7 +76,6 @@ pre-everything::
do-install:
@${CP} -r ${WRKSRC} ${PREFIX}/
- ${INSTALL_SCRIPT} ${WRKDIR}/thunder-rcNG ${PREFIX}/etc/rc.d/thunder
${INSTALL_SCRIPT} ${WRKDIR}/log.sh ${PREFIX}/thunder/sbin/
post-install:
diff --git a/www/thundercache/files/thunder-rcNG.in b/www/thundercache/files/thunder-rcNG.in
deleted file mode 100644
index 901fe1fb8b27..000000000000
--- a/www/thundercache/files/thunder-rcNG.in
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# PROVIDE: thunder
-# REQUIRE: LOGIN
-#
-# Remember to thunder_enable="YES" in /etc/rc.conf
-#
-# FreeBSD Brasil LTDA <consultoria@freebsdbrasil.com.br>
-#
-
-. /etc/rc.subr
-
-name="thunder"
-rcvar=`set_rcvar`
-command="%%PREFIX%%/thunder/sbin/thunder ${thunder_flags}"
-pidfile="/var/run/thunder/thunder.pid"
-: ${thunder_enable="NO"}
-: ${thunder_flags="-c %%PREFIX%%/thunder/etc/thunder.conf"}
-load_rc_config $name
-run_rc_command "$1"
-
diff --git a/www/thundercache/files/thundercache.in b/www/thundercache/files/thundercache.in
new file mode 100644
index 000000000000..57e30146278b
--- /dev/null
+++ b/www/thundercache/files/thundercache.in
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: thundercache
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Remember to thundercache_enable="YES" in /etc/rc.conf
+# You can also add optional flags to thundercache_flags
+#
+# FreeBSD Brasil LTDA <consultoria@freebsdbrasil.com.br>
+#
+
+. /etc/rc.subr
+
+name="thundercache"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/thunder/sbin/thunder"
+required_files="%%PREFIX%%/thunder/etc/thunder.conf"
+command_args="-c $required_files"
+pidfile="/var/run/thunder/thunder.pid"
+
+load_rc_config $name
+: ${thundercache_enable="NO"}
+
+run_rc_command "$1"