aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorclsung <clsung@FreeBSD.org>2011-07-06 08:26:45 +0800
committerclsung <clsung@FreeBSD.org>2011-07-06 08:26:45 +0800
commitd057d47af128aaf9e0edc8d19e2914d0b66eee6b (patch)
treed9b81981b8b9a084cdbe28bc4b744a965b96523a /www
parent326cfa375581fe70d816290e7410de25baeaa613 (diff)
downloadfreebsd-ports-gnome-d057d47af128aaf9e0edc8d19e2914d0b66eee6b.tar.gz
freebsd-ports-gnome-d057d47af128aaf9e0edc8d19e2914d0b66eee6b.tar.zst
freebsd-ports-gnome-d057d47af128aaf9e0edc8d19e2914d0b66eee6b.zip
- Since trac can work as standalone http server, I copied rc script from old trac-multirepos port.
- also fixed portlint warning about CONFLICTS line. PR: ports/155295 Submitted by: "Grzegorz Blach" <magik_AT_roorback dot net>
Diffstat (limited to 'www')
-rw-r--r--www/trac/Makefile10
-rw-r--r--www/trac/files/tracd.in61
2 files changed, 68 insertions, 3 deletions
diff --git a/www/trac/Makefile b/www/trac/Makefile
index 5c931955c394..4875342567ef 100644
--- a/www/trac/Makefile
+++ b/www/trac/Makefile
@@ -7,7 +7,7 @@
PORTNAME= trac
PORTVERSION= 0.12.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www devel python
MASTER_SITES= http://ftp.edgewall.com/pub/trac/ \
ftp://ftp.edgewall.com/pub/trac/
@@ -18,7 +18,8 @@ COMMENT= An enhanced wiki and issue tracking system for software projects
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Genshi>=0.5:${PORTSDIR}/textproc/py-genshi \
${PYTHON_PKGNAMEPREFIX}Babel>=0.9:${PORTSDIR}/devel/py-babel
-RUN_DEPENDS= ${BUILD_DEPENDS}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Genshi>=0.5:${PORTSDIR}/textproc/py-genshi \
+ ${PYTHON_PKGNAMEPREFIX}Babel>=0.9:${PORTSDIR}/devel/py-babel
OPTIONS= SILVERCITY "Use Silvercity for syntax highlighting" On \
DOCUTILS "Allow additional text markup" On \
@@ -26,13 +27,16 @@ OPTIONS= SILVERCITY "Use Silvercity for syntax highlighting" On \
TZ "Process Time Zones" On \
PGSQL "Use PostgreSQL instead of SQLite3" Off \
SUBVERSION "Support for subversion RCS" On
-CONFLICTS= ja-trac-*
+CONFLICTS= ja-trac-[0-9]*
USE_PYTHON= 2.5+
USE_PYDISTUTILS= easy_install
PYDISTUTILS_PKGNAME= Trac
PYDISTUTILS_NOEGGINFO= yes
+USE_RC_SUBR= tracd
+SUB_LIST= PYTHON_CMD=${PYTHON_CMD}
+
# This target is only meant to be used by the port maintainer.
x-generate-plist:
(${PORTSDIR}/Tools/scripts/plist -d -m ${MTREE_FILE} ${PREFIX} \
diff --git a/www/trac/files/tracd.in b/www/trac/files/tracd.in
new file mode 100644
index 000000000000..89573033dcb8
--- /dev/null
+++ b/www/trac/files/tracd.in
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# tracd startup
+#
+# $FreeBSD$
+
+# PROVIDE: tracd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable or configure tracd:
+# tracd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable tracd.
+# tracd_listen (str): The host name or IP address to bind tracd to.
+# By default tracd listens 0.0.0.0, i.e. all the
+# available addresses on all interfaces.
+# tracd_port (str): The port number to bind to, 80 by default.
+# tracd_pidfile (str): When daemonizing, file to which to write pid
+# if not to /var/run/tracd.pid.
+# tracd_envdir (str): Directory of the project environments. Set to
+# "/home/trac" by default.
+# tracd_env (str): The project environment name while using single
+# environment mode. The default is empty, meaning
+# multiproject mode.
+# tracd_args (str): Extra arguments passed to tracd startup
+# command. Empty by default.
+#
+
+. /etc/rc.subr
+
+name="tracd"
+rcvar="${name}_enable"
+
+tracd_enable=${tracd_enable:-"NO"}
+tracd_listen=${tracd_listen:-"0.0.0.0"}
+tracd_port=${tracd_port:-"80"}
+tracd_pidfile=${tracd_pidfile:-"/var/run/tracd.pid"}
+tracd_envdir=${tracd_envdir:-"/home/trac"}
+tracd_env=${tracd_env:-""}
+tracd_args=${tracd_args:-""}
+
+load_rc_config ${name}
+
+command_args="--daemonize --hostname=${tracd_listen} --port=${tracd_port}"
+command_args="${command_args} --pidfile=${tracd_pidfile} ${tracd_args}"
+
+required_dirs=${tracd_envdir}
+pidfile=${tracd_pidfile}
+
+if [ -z "${tracd_env}" ]; then
+ _trac_env="--env-parent-dir ${tracd_envdir}"
+else
+ _trac_env="${tracd_envdir}/${tracd_env}"
+ command_args="${command_args} --single-env"
+fi
+
+command_args="%%PREFIX%%/bin/tracd ${command_args} ${_trac_env}"
+command="%%PYTHON_CMD%%"
+
+run_rc_command $1