diff options
author | Greg Larkin <glarkin@FreeBSD.org> | 2010-07-07 18:03:21 +0000 |
---|---|---|
committer | Greg Larkin <glarkin@FreeBSD.org> | 2010-07-07 18:03:21 +0000 |
commit | ebe2ededd6c64f78da430171eca40b02e38d49ce (patch) | |
tree | ba3076843a6a20b51f9a85cd523fcd5d3bc4f638 /devel/viewvc | |
parent | f39290782c4f29662c6609533baf133a600f2e16 (diff) | |
download | ports-ebe2ededd6c64f78da430171eca40b02e38d49ce.tar.gz ports-ebe2ededd6c64f78da430171eca40b02e38d49ce.zip |
Notes
Diffstat (limited to 'devel/viewvc')
-rw-r--r-- | devel/viewvc/Makefile | 26 | ||||
-rw-r--r-- | devel/viewvc/distinfo | 6 | ||||
-rw-r--r-- | devel/viewvc/files/patch-lib__sapi.py | 10 | ||||
-rw-r--r-- | devel/viewvc/files/pkg-message.in | 30 | ||||
-rw-r--r-- | devel/viewvc/files/viewvc.in | 54 | ||||
-rw-r--r-- | devel/viewvc/pkg-plist | 3 |
6 files changed, 69 insertions, 60 deletions
diff --git a/devel/viewvc/Makefile b/devel/viewvc/Makefile index 9633c75c5cc5..c91a4047305b 100644 --- a/devel/viewvc/Makefile +++ b/devel/viewvc/Makefile @@ -6,27 +6,27 @@ # PORTNAME= viewvc -PORTVERSION= 1.1.5 -PORTREVISION= 3 +PORTVERSION= 1.1.6 CATEGORIES= devel python -MASTER_SITES= http://viewvc.tigris.org/files/documents/3330/47458/ \ - LOCAL/pgollucci +MASTER_SITES= http://www.viewvc.org/ \ + LOCAL/glarkin MAINTAINER= glarkin@FreeBSD.org COMMENT= Web-based Version Control Repository Browsing -OPTIONS=\ - SUBVERSION "use svn binding" on \ - APACHE "use ${APACHE_PORT} as webserver" on \ - LIGHTTPD "use Lighttp as webserver" off \ - MODPYTHON3 "enable mod_python3 support" off \ - MYSQL "enable experimental MYSQL support" off +OPTIONS= SUBVERSION "use svn binding" on \ + APACHE "Use ${APACHE_PORT} as webserver" on \ + LIGHTTPD "Use lighttpd as webserver" off \ + MODPYTHON3 "Enable mod_python3 support" off \ + MYSQL "Enable experimental MYSQL support" off NO_BUILD= yes USE_PYTHON= yes SUB_FILES= pkg-message SUB_LIST= INSTDIR="${PREFIX}/${INSTDIR}" \ - PYTHON_CMD=${PYTHON_CMD} + PYTHON_CMD=${PYTHON_CMD} \ + ECHO=${ECHO} EGREP=${EGREP} TOUCH=${TOUCH} \ + CHOWN=${CHOWN} RM=${RM} INSTDIR?= ${PORTNAME} PLIST_SUB= INSTDIR=${INSTDIR} @@ -66,12 +66,12 @@ RUN_DEPENDS+= ${PYTHON_LIBDIR}/site-packages/_mysql.so:${PORTSDIR}/databases/py- pre-everything:: .if defined(WITH_APACHE) && defined(WITH_LIGHTTPD) - @${ECHO_CMD} "It doesn't make sense to depend on Apache *and* LighHTTPD choose only one." + @${ECHO_CMD} "It doesn't make sense to depend on Apache *and* lighttpd choose only one." @${FALSE} .endif .if defined(WITH_MODPYTHON3) && !defined(WITH_APACHE) && defined(WITH_LIGHTTPD) - @${ECHO_CMD} "mod_python3 needs Apache, please select Apache and deselect LighHTTPD" + @${ECHO_CMD} "mod_python3 needs Apache, please select Apache and deselect lighttpd" @${FALSE} .elif defined(WITH_MODPYTHON3) && !defined(WITH_APACHE) @${ECHO_CMD} "mod_python3 needs Apache, please select Apache" diff --git a/devel/viewvc/distinfo b/devel/viewvc/distinfo index cfc2bff2ea4b..7302b78f1f38 100644 --- a/devel/viewvc/distinfo +++ b/devel/viewvc/distinfo @@ -1,3 +1,3 @@ -MD5 (viewvc-1.1.5.tar.gz) = da7bbcf6800383ebb23405a064c6faf8 -SHA256 (viewvc-1.1.5.tar.gz) = 32ce717330fc780e9c2341cca800079078e9935581d4dfd526e4a15fc1d94919 -SIZE (viewvc-1.1.5.tar.gz) = 593630 +MD5 (viewvc-1.1.6.tar.gz) = 9b0fd59fe4410dfc809d9b7d07f9baf6 +SHA256 (viewvc-1.1.6.tar.gz) = 857a2685740ba2793753cccd1ce96ddeb7249692c0d0843d0f59e32423fbfd0c +SIZE (viewvc-1.1.6.tar.gz) = 595029 diff --git a/devel/viewvc/files/patch-lib__sapi.py b/devel/viewvc/files/patch-lib__sapi.py deleted file mode 100644 index dd1153d6ecbe..000000000000 --- a/devel/viewvc/files/patch-lib__sapi.py +++ /dev/null @@ -1,10 +0,0 @@ ---- ./lib/sapi.py.orig 2010-03-29 17:32:43.000000000 +0200 -+++ ./lib/sapi.py 2010-05-07 18:36:29.000000000 +0200 -@@ -33,6 +33,7 @@ - # that character as-is, and sometimes needs to embed escaped values - # into HTML attributes. - def escape(s): -+ s = str(s) - s = string.replace(s, '&', '&') - s = string.replace(s, '>', '>') - s = string.replace(s, '<', '<') diff --git a/devel/viewvc/files/pkg-message.in b/devel/viewvc/files/pkg-message.in index f4f96a143904..193a27432125 100644 --- a/devel/viewvc/files/pkg-message.in +++ b/devel/viewvc/files/pkg-message.in @@ -1,38 +1,39 @@ ***************************************************************** - To use ViewVC modify the configuration file, located at + To use ViewVC, modify the configuration file located at %%INSTDIR%%/viewvc.conf. - There is no need for an Webserver, all you have to do is + There is no need for a web server - all you have to do is enable the standalone ViewVC server in rc.conf with the parameter viewvc_enable="YES". - You can also adjust the user wich runs the ViewVC standalone - server with the paramter viewvc_user. + You can also adjust the user which runs the ViewVC standalone + server with the parameter "viewvc_user". If you want to run the ViewVC standalone server with another - IP/PORT use the parameter viewvc_flags + IP/PORT, use the parameter "viewvc_flags". - To see all aviable parameters use the command + To see all available parameters, use the command %%PREFIX%%/viewvc/bin/standalone.py --help - To use ViewVC with Apache or LigHTTP as cgi script - see the following config exmples. + To use ViewVC with Apache or lighttpd as a CGI script, + see the following config examples. Example config lines for Apache - ================================== + =============================== Alias /viewvc "%%PREFIX%%/viewvc/bin/cgi/" <Directory "%%PREFIX%%/viewvc/bin/cgi"> + AddHandler cgi-script .cgi Options NONE +ExecCGI - DirectoryIndex /viewvc/viewvc.cgi + DirectoryIndex viewvc.cgi Order allow,deny Allow from all </Directory> - Example config lines for LigHTTP - ================================ + Example config lines for lighttpd + ================================= server.modules = ( "mod_alias", "mod_access" @@ -48,8 +49,3 @@ } ***************************************************************** - - - - - diff --git a/devel/viewvc/files/viewvc.in b/devel/viewvc/files/viewvc.in index e3cdd0baefca..03f0cd3c26a8 100644 --- a/devel/viewvc/files/viewvc.in +++ b/devel/viewvc/files/viewvc.in @@ -6,22 +6,22 @@ # REQUIRE: LOGIN # KEYWORD: shutdown # -# Add the following line to /etc/rc.conf to enable ViewVC: +# Add the following line(s) to /etc/rc.conf to enable ViewVC: # # viewvc_enable="YES" # # optional # viewvc_flags="-h localhost -p PORT" # viewvc_user="www" # -# To get aviable parameters and the default values use the -# command %%PREFIX%%/viewvc/bin/standalone.py --help +# To get available parameters and the default values, use the +# command %%PREFIX%%/viewvc/bin/standalone.py --help # for more info. # # Note: -# If you choose a listen port less then 1024 then you have +# If you choose a listen port less then 1024 then you have # to use a privileged user. -# If the user www can not access your cvs/svn repository -# adust the parameter viewvc_user and it should work. +# If the user www cannot access your cvs/svn repository, +# adjust the parameter viewvc_user and it should work. # # INFO: # The default port will change with the next release of ViewVC @@ -30,22 +30,42 @@ . /etc/rc.subr -name="viewvc" +name=viewvc rcvar=${name}_enable +load_rc_config $name -command="%%PREFIX%%/viewvc/bin/standalone.py" +# Set defaults +viewvc_enable=${viewvc_enable:-"NO"} +viewvc_flags=${viewvc_flags:-"-p 49152"} +viewvc_user=${viewvc_user:-"www"} -# we need this, since our script interpreter is python -command_interpreter="%%PYTHON_CMD%%" +pidfile=/var/run/viewvc.pid +command=%%PYTHON_CMD%% +standalone=%%INSTDIR%%/bin/standalone.py -# extra required arguments -command_args="2>/dev/null 1>/dev/null &" +start_precmd=viewvc_precmd +start_cmd=viewvc_start +stop_postcmd=viewvc_cleanup -load_rc_config ${name} +viewvc_precmd() +{ + # with param -d we get another pid so prevent this + %%ECHO%% "${viewvc_flags}" | %%EGREP%% -q "(^\-d| \-d)" 2>&1 > /dev/null + if [ $? -eq 0 ]; then + %%ECHO%% "Please remove parameter -d from viewvc_flags" + %%ECHO%% + return 1 + fi +} -viewvc_enable=${viewvc_enable-NO} -viewvc_flags=${viewvc_flags-"-p 49152"} -viewvc_user=${viewvc_user-www} -viewvc_procname=${viewvc_procname-%%PREFIX%%/viewvc/bin/standalone.py} +viewvc_start() { + echo "Starting viewvc." + %%TOUCH%% ${pidfile} && %%CHOWN%% ${viewvc_user} ${pidfile} + /usr/sbin/daemon -cf -p ${pidfile} -u ${viewvc_user} -c ${standalone} ${viewvc_flags} +} + +viewvc_cleanup() { + [ -f ${pidfile} ] && %%RM%% ${pidfile} +} run_rc_command "$1" diff --git a/devel/viewvc/pkg-plist b/devel/viewvc/pkg-plist index 6cf862cbcce7..a5258d388bdb 100644 --- a/devel/viewvc/pkg-plist +++ b/devel/viewvc/pkg-plist @@ -1,6 +1,8 @@ @unexec if cmp -s %D/%%INSTDIR%%/cvsgraph.conf %D/%%INSTDIR%%/cvsgraph.conf.dist; then rm -f %D/%%INSTDIR%%/cvsgraph.conf; fi @unexec if cmp -s %D/%%INSTDIR%%/mimetypes.conf %D/%%INSTDIR%%/mimetypes.conf.dist; then rm -f %D/%%INSTDIR%%/mimetypes.conf; fi @unexec if cmp -s %D/%%INSTDIR%%/viewvc.conf %D/%%INSTDIR%%/viewvc.conf.dist; then rm -f %D/%%INSTDIR%%/viewvc.conf; fi +%%INSTDIR%%/bin/wsgi/query.wsgi +%%INSTDIR%%/bin/wsgi/viewvc.wsgi %%INSTDIR%%/bin/cgi/viewvc.cgi %%INSTDIR%%/bin/cgi/query.cgi %%INSTDIR%%/bin/mod_python/viewvc.py @@ -271,6 +273,7 @@ @dirrm %%INSTDIR%%/lib/vcauth/forbidden @dirrm %%INSTDIR%%/lib/vcauth @dirrm %%INSTDIR%%/lib +@dirrm %%INSTDIR%%/bin/wsgi @dirrm %%INSTDIR%%/bin/mod_python @dirrm %%INSTDIR%%/bin/cgi @dirrm %%INSTDIR%%/bin |