1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

- 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>
This commit is contained in:
Cheng-Lung Sung 2011-07-06 00:26:45 +00:00
parent b679a85bec
commit 8213c0c255
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=277158
2 changed files with 68 additions and 3 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= trac PORTNAME= trac
PORTVERSION= 0.12.2 PORTVERSION= 0.12.2
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= www devel python CATEGORIES= www devel python
MASTER_SITES= http://ftp.edgewall.com/pub/trac/ \ MASTER_SITES= http://ftp.edgewall.com/pub/trac/ \
ftp://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 \ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Genshi>=0.5:${PORTSDIR}/textproc/py-genshi \
${PYTHON_PKGNAMEPREFIX}Babel>=0.9:${PORTSDIR}/devel/py-babel ${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 \ OPTIONS= SILVERCITY "Use Silvercity for syntax highlighting" On \
DOCUTILS "Allow additional text markup" On \ DOCUTILS "Allow additional text markup" On \
@ -26,13 +27,16 @@ OPTIONS= SILVERCITY "Use Silvercity for syntax highlighting" On \
TZ "Process Time Zones" On \ TZ "Process Time Zones" On \
PGSQL "Use PostgreSQL instead of SQLite3" Off \ PGSQL "Use PostgreSQL instead of SQLite3" Off \
SUBVERSION "Support for subversion RCS" On SUBVERSION "Support for subversion RCS" On
CONFLICTS= ja-trac-* CONFLICTS= ja-trac-[0-9]*
USE_PYTHON= 2.5+ USE_PYTHON= 2.5+
USE_PYDISTUTILS= easy_install USE_PYDISTUTILS= easy_install
PYDISTUTILS_PKGNAME= Trac PYDISTUTILS_PKGNAME= Trac
PYDISTUTILS_NOEGGINFO= yes 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. # This target is only meant to be used by the port maintainer.
x-generate-plist: x-generate-plist:
(${PORTSDIR}/Tools/scripts/plist -d -m ${MTREE_FILE} ${PREFIX} \ (${PORTSDIR}/Tools/scripts/plist -d -m ${MTREE_FILE} ${PREFIX} \

61
www/trac/files/tracd.in Normal file
View File

@ -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