aboutsummaryrefslogtreecommitdiffstats
path: root/www/redmine
diff options
context:
space:
mode:
authorwxs <wxs@FreeBSD.org>2010-03-14 12:07:41 +0800
committerwxs <wxs@FreeBSD.org>2010-03-14 12:07:41 +0800
commit1499e8fe18cac4ce22253afcd0d7982d2cb2de7e (patch)
tree966a43bcedeefc7233bfc8bacd2c62c4ddf301e7 /www/redmine
parent472f0bccc638359b53a00ce766599c56b9b6b3e8 (diff)
downloadfreebsd-ports-gnome-1499e8fe18cac4ce22253afcd0d7982d2cb2de7e.tar.gz
freebsd-ports-gnome-1499e8fe18cac4ce22253afcd0d7982d2cb2de7e.tar.zst
freebsd-ports-gnome-1499e8fe18cac4ce22253afcd0d7982d2cb2de7e.zip
- Add RC script.
PR: ports/144299 Submitted by: Bernhard Froehlich <decke@bluelife.at> (maintainer)
Diffstat (limited to 'www/redmine')
-rw-r--r--www/redmine/Makefile6
-rw-r--r--www/redmine/files/redmine.in32
2 files changed, 38 insertions, 0 deletions
diff --git a/www/redmine/Makefile b/www/redmine/Makefile
index 22b41d0d55a7..573aa670a223 100644
--- a/www/redmine/Makefile
+++ b/www/redmine/Makefile
@@ -7,6 +7,7 @@
PORTNAME= redmine
PORTVERSION= 0.9.3
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_RUBYFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -14,10 +15,15 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= decke@bluelife.at
COMMENT= A flexible project management web application
+RUN_DEPENDS= rackup:${PORTSDIR}/www/rubygem-rack \
+ thin:${PORTSDIR}/www/rubygem-thin
+
USE_RUBY= yes
USE_RUBY_FEATURES= iconv
USE_RAKE= yes
NO_BUILD= yes
+USE_RC_SUBR= redmine
+SUB_LIST+= RUBY_NAME=${RUBY_NAME}
OPTIONS= MYSQL "Enable MySQL Support" on \
POSTGRESQL "Enable PostgreSQL Support" off
diff --git a/www/redmine/files/redmine.in b/www/redmine/files/redmine.in
new file mode 100644
index 000000000000..1d224aefe2ef
--- /dev/null
+++ b/www/redmine/files/redmine.in
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# PROVIDE: redmine
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf[.local] to enable redmine
+#
+# redmine_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable redmine.
+# redmine_flags (str): Custom additional arguments to be passed
+# to redmine.
+#
+
+. %%RC_SUBR%%
+
+name="redmine"
+rcvar=`set_rcvar`
+command=%%RUBY_NAME%%
+redmine_home="%%WWWDIR%%"
+pidfile="${redmine_home}/tmp/pids/thin.pid"
+
+load_rc_config $name
+
+# set defaults
+: ${redmine_enable="NO"}
+: ${redmine_flags="-a 0.0.0.0 -p 3000 -e production -u www -g www"}
+
+command_args="-d -D -c ${redmine_home} ${redmine_flags}"
+start_cmd="%%PREFIX%%/bin/thin ${command_args} start"
+
+run_rc_command "$1"