diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2006-04-25 20:05:38 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2006-04-25 20:05:38 +0000 |
commit | 92a340f3baf107f0570b108ddb01a190c3575449 (patch) | |
tree | fa50bd7cc2f70ab05b404286d6f68c58aa001087 /www | |
parent | d57b9367a5247f465c395c785b2fa4f67be7f22d (diff) | |
download | freebsd-ports-92a340f3baf107f0570b108ddb01a190c3575449.zip |
- Update to 0.1.8
- Move WWW root in default config
- Create log dir to avoid initial errors
- Add rc.d script
- Take maintainership
PR: ports/96298
Submitted by: Shaun Amott <shaun@inerd.com>
Diffstat (limited to 'www')
-rw-r--r-- | www/hydra/Makefile | 34 | ||||
-rw-r--r-- | www/hydra/distinfo | 6 | ||||
-rw-r--r-- | www/hydra/files/hydra.sh.in | 22 | ||||
-rw-r--r-- | www/hydra/files/patch-hydra.conf | 93 | ||||
-rw-r--r-- | www/hydra/files/pkg-deinstall.in | 19 |
5 files changed, 157 insertions, 17 deletions
diff --git a/www/hydra/Makefile b/www/hydra/Makefile index a58f7b4e7892..fb4e2bf83c1a 100644 --- a/www/hydra/Makefile +++ b/www/hydra/Makefile @@ -7,18 +7,18 @@ # PORTNAME= hydra -PORTVERSION= 0.1.7 -PORTREVISION= 1 +PORTVERSION= 0.1.8 CATEGORIES= www MASTER_SITES= ftp://ftp.hellug.gr/pub/software/hydra/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= shaun@inerd.com COMMENT= A high performance multi-threaded web server LIB_DEPENDS= gnutls.15:${PORTSDIR}/security/gnutls +USE_RC_SUBR= hydra.sh + NO_LATEST_LINK= yes -USE_REINPLACE= yes GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" @@ -26,18 +26,32 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" CPPFLAGS= -I${LOCALBASE}/include LDFLAGS= -L${LOCALBASE}/lib +WWWOWN?= www +WWWGRP?= www +LOGDIR?= /var/log/hydra + +SUB_FILES= pkg-deinstall +PLIST_SUB= LOGDIR=${LOGDIR} +SUB_LIST= LOGDIR=${LOGDIR} + post-patch: @${REINPLACE_CMD} -e "s,-pthread,${PTHREAD_LIBS},g" ${WRKSRC}/configure -.for file in src/defines.h examples/hydra.conf - @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/${file} +.for f in src/defines.h examples/hydra.conf + @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" \ + -e "s,%%LOGDIR%%,${LOGDIR},g" \ + -e "s,%%WWWOWN%%,${WWWOWN},g" \ + -e "s,%%WWWGRP%%,${WWWGRP},g" \ + ${WRKSRC}/${f} .endfor post-install: @${MKDIR} ${PREFIX}/etc/hydra -.for file in hydra.conf mime.types - ${INSTALL_DATA} ${WRKSRC}/examples/${file} ${PREFIX}/etc/hydra/${file}-dist - [ -f ${PREFIX}/etc/hydra/${file} ] || \ - ${INSTALL_DATA} ${WRKSRC}/examples/${file} ${PREFIX}/etc/hydra/ +.for f in hydra.conf mime.types + ${INSTALL_DATA} ${WRKSRC}/examples/${f} ${PREFIX}/etc/hydra/${f}-dist + [ -f ${PREFIX}/etc/hydra/${f} ] || \ + ${INSTALL_DATA} ${WRKSRC}/examples/${f} ${PREFIX}/etc/hydra/ .endfor + [ -d ${LOGDIR} ] || \ + ( ${MKDIR} ${LOGDIR} && ${CHOWN} ${WWWOWN}:${WWWGRP} ${LOGDIR} ) .include <bsd.port.mk> diff --git a/www/hydra/distinfo b/www/hydra/distinfo index d71523dc0b24..07d5224ec8f7 100644 --- a/www/hydra/distinfo +++ b/www/hydra/distinfo @@ -1,3 +1,3 @@ -MD5 (hydra-0.1.7.tar.gz) = 81f62f6bcf89a8f2e9babed8d9206562 -SHA256 (hydra-0.1.7.tar.gz) = 3406a7343d23d5a014d6c061a45b6233b6bb8bf92cda82e29b5bbd36b266411a -SIZE (hydra-0.1.7.tar.gz) = 286484 +MD5 (hydra-0.1.8.tar.gz) = 895b5e03ec8fb7d023070fcd0c721455 +SHA256 (hydra-0.1.8.tar.gz) = ce139dc891b7220a9c128e702b7c7b8d07ede95c13ecea925eecd72e614c1fa3 +SIZE (hydra-0.1.8.tar.gz) = 282119 diff --git a/www/hydra/files/hydra.sh.in b/www/hydra/files/hydra.sh.in new file mode 100644 index 000000000000..2e3e45d50191 --- /dev/null +++ b/www/hydra/files/hydra.sh.in @@ -0,0 +1,22 @@ +#!/bin/sh +# +# PROVIDE: hydra +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# $FreeBSD$ +# + +hydra_enable=${hydra_enable-"NO"} + +. %%RC_SUBR%% + +load_rc_config hydra + +name=hydra +rcvar=`set_rcvar` + +command=%%PREFIX%%/bin/${name} + +load_rc_config ${name} +run_rc_command "$1" diff --git a/www/hydra/files/patch-hydra.conf b/www/hydra/files/patch-hydra.conf index 8f9706b5662b..8834eaa9987c 100644 --- a/www/hydra/files/patch-hydra.conf +++ b/www/hydra/files/patch-hydra.conf @@ -1,6 +1,91 @@ ---- examples/hydra.conf.orig Wed Apr 2 22:05:45 2003 -+++ examples/hydra.conf Wed Apr 2 22:08:18 2003 -@@ -163,7 +163,7 @@ +--- examples/hydra.conf.orig Thu Mar 9 18:31:13 2006 ++++ examples/hydra.conf Tue Apr 25 03:06:31 2006 +@@ -12,7 +12,7 @@ + # $Id: hydra.conf,v 1.23 2006-03-09 18:31:13 nmav Exp $ + + # ServerRoot: The directory the .html (and related) files are placed. +-ServerRoot /var/www ++ServerRoot %%PREFIX%%/www + + # number of threads to spawn + # One thread might be ok for a single CPU system, but in some systems, +@@ -53,8 +53,8 @@ + # User: The name or UID the server should run as. + # Group: The group name or GID the server should run as. + +-User nobody +-Group nogroup ++User %%WWWOWN%% ++Group %%WWWGRP%% + + # ServerAdmin: The email address where server problems should be sent. + # Note: this is not currently used, except as an environment variable +@@ -74,26 +74,26 @@ + # Set to /dev/null if you don't want errors logged. + # If unset, defaults to /dev/stderr + +-ErrorLog /var/log/hydra/error_log ++ErrorLog %%LOGDIR%%/error_log + # Please NOTE: Sending the logs to a pipe ('|'), as shown below, + # is somewhat experimental and might fail under heavy load. + # "Usual libc implementations of printf will stall the whole + # process if the receiving end of a pipe stops reading." +-#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/hydra/error_log /var/log/hydra/error-%Y%m%d.log" ++#ErrorLog "|/usr/sbin/cronolog --symlink=%%LOGDIR%%/error_log %%LOGDIR%%/error-%Y%m%d.log" + + # AccessLog: The location of the access log file. If this does not + # start with /, it is considered relative to the server root. + # Comment out or set to /dev/null (less effective) to disable + # Access logging. + +-AccessLog /var/log/hydra/access_log ++AccessLog %%LOGDIR%%/access_log + # Please NOTE: Sending the logs to a pipe ('|'), as shown below, + # is somewhat experimental and might fail under heavy load. + # "Usual libc implementations of printf will stall the whole + # process if the receiving end of a pipe stops reading." +-#AccessLog "|/usr/sbin/cronolog --symlink=/var/log/hydra/access_log /var/log/hydra/access-%Y%m%d.log" ++#AccessLog "|/usr/sbin/cronolog --symlink=%%LOGDIR%%/access_log %%LOGDIR%%/access-%Y%m%d.log" + +-# CGILog /var/log/hydra/cgi_log ++# CGILog %%LOGDIR%%/cgi_log + # CGILog: The location of the CGI stderr log file. If this does not + # start with /, it is considered relative to the server root. + # The log file would contain any contents send to /dev/stderr +@@ -103,7 +103,7 @@ + # is somewhat experimental and might fail under heavy load. + # "Usual libc implementations of printf will stall the whole + # process if the receiving end of a pipe stops reading." +-#CGILog "|/usr/sbin/cronolog --symlink=/var/log/hydra/cgi_log /var/log/hydra/cgi-%Y%m%d.log" ++#CGILog "|/usr/sbin/cronolog --symlink=%%LOGDIR%%/cgi_log %%LOGDIR%%/cgi-%Y%m%d.log" + + # CGIumask 027 (no mask for user, read-only for group, and nothing for user) + # CGIumask 027 +@@ -132,11 +132,11 @@ + # directory if a ~user request is received. + # + # Example: +-# VirtualHost www.dot.com * /var/www public_html +-# VirtualHost www.dot.com 127.0.0.1 /var/www "" ++# VirtualHost www.dot.com * %%PREFIX%%/www public_html ++# VirtualHost www.dot.com 127.0.0.1 %%PREFIX%%/www "" + # + +-#VirtualHost www.dot.com * /var/www "" ++#VirtualHost www.dot.com * %%PREFIX%%/www "" + + # DocumentRoot: The root directory of the HTML documents. + # Comment out to disable server non user files. +@@ -144,7 +144,7 @@ + # Note that if VirtualHost is enabled, this will be the fallback + # for the clients that did not supply any host. + +-DocumentRoot /var/www ++DocumentRoot %%PREFIX%%/www + + # DirectoryIndex: Name of the file to use as a pre-written HTML + # directory index. Please MAKE AND USE THESE FILES. On the +@@ -160,7 +160,7 @@ # DirectoryIndex are commented out, accessing a directory will give # an error (though accessing files in the directory are still ok). @@ -9,7 +94,7 @@ # DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker # has been commented out, the the on-the-fly indexing of Hydra can be used -@@ -199,7 +199,7 @@ +@@ -196,7 +196,7 @@ # Set to /dev/null if you do not want to load a mime types file. # Do *not* comment out (better use AddType!) diff --git a/www/hydra/files/pkg-deinstall.in b/www/hydra/files/pkg-deinstall.in new file mode 100644 index 000000000000..fc6fc639a76c --- /dev/null +++ b/www/hydra/files/pkg-deinstall.in @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +case $2 in + DEINSTALL) + ;; + POST-DEINSTALL) + if [ ! -d %%LOGDIR%% ] ; then + rmdir %%LOGDIR%% + else + echo "--------------------------------------------" + echo " Don't forget to delete %%LOGDIR%% when" + echo " you've finished with hydra's log files." + echo "--------------------------------------------" + fi + ;; +esac |