diff options
author | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2008-08-19 21:59:24 +0000 |
---|---|---|
committer | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2008-08-19 21:59:24 +0000 |
commit | 767ed5108abb0e3608587e65a24cafa15a7dc071 (patch) | |
tree | 44dab292a58e66852baf4b1f23a9550054259b51 | |
parent | 83eab871cca294e8b530c581547554f710de4d50 (diff) | |
download | ports-767ed5108abb0e3608587e65a24cafa15a7dc071.tar.gz ports-767ed5108abb0e3608587e65a24cafa15a7dc071.zip |
Notes
-rw-r--r-- | devel/viewvc/Makefile | 61 | ||||
-rw-r--r-- | devel/viewvc/files/pkg-message.in | 56 | ||||
-rw-r--r-- | devel/viewvc/files/viewvc.in | 51 |
3 files changed, 153 insertions, 15 deletions
diff --git a/devel/viewvc/Makefile b/devel/viewvc/Makefile index d193fa89ae2e..c92ffe8b5045 100644 --- a/devel/viewvc/Makefile +++ b/devel/viewvc/Makefile @@ -7,30 +7,71 @@ PORTNAME= viewvc PORTVERSION= 1.0.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel python MASTER_SITES= http://viewvc.tigris.org/files/documents/3330/41694/ MAINTAINER= pgollucci@FreeBSD.org COMMENT= Web-based Version Control Repository Browsing -RUN_DEPENDS= ${PYTHON_LIBDIR}/site-packages/svn/__init__.py:${PORTSDIR}/devel/py-subversion \ - ${PYTHON_LIBDIR}/site-packages/_mysql.so:${PORTSDIR}/databases/py-MySQLdb +OPTIONS= SUBVERSION "use svn binding" on \ + APACHE2 "use Apache as webserver" on \ + LIGHTTPD "use Lighttp as webserver" off \ + MODPYTHON3 "enable mod_python3 support" off \ + MYSQL "enable experimental MYSQL support" off +NO_BUILD= yes USE_PYTHON= yes -.if defined (WITH_APACHE) +SUB_FILES= pkg-message +SUB_LIST= INSTDIR="${PREFIX}/${INSTDIR}" + +INSTDIR?= ${PORTNAME} +PLIST_SUB= INSTDIR=${INSTDIR} + +.include <bsd.port.pre.mk> + +.if !defined(WITH_APACHE2) && !defined(WITH_LIGHTTPD) +USE_RC_SUBR= viewvc +.endif + +# viewvc can support CVS or SVN, controlled with the parameter +# cvs_roots (for CVS), svn_roots (for Subversion) in viewvc.conf +.if defined (WITH_SUBVERSION) +RUN_DEPENDS+= ${PYTHON_LIBDIR}/site-packages/svn/__init__.py:${PORTSDIR}/devel/py-subversion +.endif + +.if defined (WITH_APACHE2) USE_APACHE= 2.0+ .endif + +.if defined(WITH_LIGHTTPD) +RUN_DEPENDS+= lighttpd:${PORTSDIR}/www/lighttpd +.endif + .if defined(WITH_MODPYTHON3) RUN_DEPENDS+= ${APACHEMODDIR}/mod_python.so:${PORTSDIR}/www/mod_python3 .endif -NO_BUILD= yes -SUB_FILES= pkg-message -SUB_LIST= INSTDIR="${PREFIX}/${INSTDIR}" +# This feature is a clone of the Mozilla Project's Bonsai database. +# It catalogs every commit in the CVS or Subversion repository into a SQL database. +# In fact, the databases are 100% compatible. +.if defined(WITH_MYSQL) +RUN_DEPENDS+= ${PYTHON_LIBDIR}/site-packages/_mysql.so:${PORTSDIR}/databases/py-MySQLdb +.endif -INSTDIR?= ${PORTNAME} -PLIST_SUB= INSTDIR=${INSTDIR} +pre-everything:: +.if defined(WITH_APACHE2) && defined(WITH_LIGHTTPD) + @${ECHO_CMD} "It doesn't make sense to depend on Apache *and* LighHTTPD choose only one." + @${FALSE} +.endif + +.if defined(WITH_MODPYTHON3) && !defined(WITH_APACHE2) && defined(WITH_LIGHTTPD) + @${ECHO_CMD} "mod_python3 needs Apache, please select Apache and deselect LighHTTPD" + @${FALSE} +.elif defined(WITH_MODPYTHON3) && !defined(WITH_APACHE2) + @${ECHO_CMD} "mod_python3 needs Apache, please select Apache" + @${FALSE} +.endif do-install: @(cd ${WRKSRC} && ${PYTHON_CMD} viewvc-install --prefix=${PREFIX}/${INSTDIR} --destdir="" --clean-mode=false) @@ -38,4 +79,4 @@ do-install: post-install: @${CAT} ${PKGMESSAGE} -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/devel/viewvc/files/pkg-message.in b/devel/viewvc/files/pkg-message.in index b77b77442ab8..3ae99ae63f4f 100644 --- a/devel/viewvc/files/pkg-message.in +++ b/devel/viewvc/files/pkg-message.in @@ -1,9 +1,55 @@ ***************************************************************** -If you would like to set up ViewVC in a usable manner, all -you need to do is modify the configuration file, located at -%%INSTDIR%%/viewvc.conf, to note where your -CVSROOT is, and then copy the actual CGI (located at -%%INSTDIR%%/bin/cgi/viewvc.cgi) to your cgi-bin. + 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 + 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. + + If you want to run the ViewVC standalone server with another + IP/PORT use the parameter viewvc_flags + + To see all aviable 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. + + Example config lines for Apache + ================================== + Alias /viewvc "%%PREFIX%%/viewvc/bin/cgi/" + <Directory "%%PRFIX%%/viewvc/bin/cgi"> + Options NONE +ExecCGI + DirectoryIndex /viewvc/viewvc.cgi + Order allow,deny + Allow from all + </Directory> + + + Example config lines for LigHTTP + ================================ + server.modules = ( + "mod_alias", + "mod_access" + ) + + alias.url += ( "/viewvc" => "%%PREFIX%%/viewvc/bin/cgi" ) + + $HTTP["url"] =~ "^/viewvc/" { + index-file.names = ( "viewvc.cgi" ) + cgi.assign = ( + ".cgi" => "%%PREFIX%%/bin/python", + ) + } ***************************************************************** + + + + + diff --git a/devel/viewvc/files/viewvc.in b/devel/viewvc/files/viewvc.in new file mode 100644 index 000000000000..d6b3aee8096c --- /dev/null +++ b/devel/viewvc/files/viewvc.in @@ -0,0 +1,51 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: viewvc +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line 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 +# for more info. +# +# Note: +# 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. +# +# INFO: +# The default port will change with the next release of ViewVC +# from 7467 to 49152 +# see http://viewvc.tigris.org/issues/show_bug.cgi?id=234 + +. %%RC_SUBR%% + +name="viewvc" +rcvar=${name}_enable + +command="%%PREFIX%%/viewvc/bin/standalone.py" + +# we need this, since our script interpreter is python +command_interpreter="%%PREFIX%%/bin/%%PYTHON_VERSION%%" + +# extra required arguments +command_args="2>/dev/null 1>/dev/null &" + +load_rc_config ${name} + +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} + +run_rc_command "$1" |