View | Details | Raw Unified | Return to bug 96298
Collapse All | Expand All

(-)hydra/Makefile (-10 / +24 lines)
Lines 7-24 Link Here
7
#
7
#
8
8
9
PORTNAME=	hydra
9
PORTNAME=	hydra
10
PORTVERSION=	0.1.7
10
PORTVERSION=	0.1.8
11
PORTREVISION=	1
12
CATEGORIES=	www
11
CATEGORIES=	www
13
MASTER_SITES=	ftp://ftp.hellug.gr/pub/software/hydra/
12
MASTER_SITES=	ftp://ftp.hellug.gr/pub/software/hydra/
14
13
15
MAINTAINER=	ports@FreeBSD.org
14
MAINTAINER=	shaun@inerd.com
16
COMMENT=	A high performance multi-threaded web server
15
COMMENT=	A high performance multi-threaded web server
17
16
18
LIB_DEPENDS=	gnutls.15:${PORTSDIR}/security/gnutls
17
LIB_DEPENDS=	gnutls.15:${PORTSDIR}/security/gnutls
19
18
19
USE_RC_SUBR=	hydra.sh
20
20
NO_LATEST_LINK=	yes
21
NO_LATEST_LINK=	yes
21
USE_REINPLACE=	yes
22
GNU_CONFIGURE=	yes
22
GNU_CONFIGURE=	yes
23
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
23
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
24
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
24
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
Lines 26-43 Link Here
26
CPPFLAGS=	-I${LOCALBASE}/include
26
CPPFLAGS=	-I${LOCALBASE}/include
27
LDFLAGS=	-L${LOCALBASE}/lib
27
LDFLAGS=	-L${LOCALBASE}/lib
28
28
29
WWWOWN?=	www
30
WWWGRP?=	www
31
LOGDIR?=	/var/log/hydra
32
33
SUB_FILES=	pkg-deinstall
34
PLIST_SUB=	LOGDIR=${LOGDIR}
35
SUB_LIST=	LOGDIR=${LOGDIR}
36
29
post-patch:
37
post-patch:
30
	@${REINPLACE_CMD} -e "s,-pthread,${PTHREAD_LIBS},g" ${WRKSRC}/configure
38
	@${REINPLACE_CMD} -e "s,-pthread,${PTHREAD_LIBS},g" ${WRKSRC}/configure
31
.for file in src/defines.h examples/hydra.conf
39
.for f in src/defines.h examples/hydra.conf
32
	@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/${file}
40
	@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" \
41
	                  -e "s,%%LOGDIR%%,${LOGDIR},g" \
42
	                  -e "s,%%WWWOWN%%,${WWWOWN},g" \
43
	                  -e "s,%%WWWGRP%%,${WWWGRP},g" \
44
	                  ${WRKSRC}/${f}
33
.endfor
45
.endfor
34
46
35
post-install:
47
post-install:
36
	@${MKDIR} ${PREFIX}/etc/hydra
48
	@${MKDIR} ${PREFIX}/etc/hydra
37
.for file in hydra.conf mime.types
49
.for f in hydra.conf mime.types
38
	${INSTALL_DATA} ${WRKSRC}/examples/${file} ${PREFIX}/etc/hydra/${file}-dist
50
	${INSTALL_DATA} ${WRKSRC}/examples/${f} ${PREFIX}/etc/hydra/${f}-dist
39
	[ -f ${PREFIX}/etc/hydra/${file} ] || \
51
	[ -f ${PREFIX}/etc/hydra/${f} ] || \
40
		${INSTALL_DATA} ${WRKSRC}/examples/${file} ${PREFIX}/etc/hydra/
52
		${INSTALL_DATA} ${WRKSRC}/examples/${f} ${PREFIX}/etc/hydra/
41
.endfor
53
.endfor
54
	[ -d ${LOGDIR} ] || \
55
		( ${MKDIR} ${LOGDIR} && ${CHOWN} ${WWWOWN}:${WWWGRP} ${LOGDIR} )
42
56
43
.include <bsd.port.mk>
57
.include <bsd.port.mk>
(-)hydra/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (hydra-0.1.7.tar.gz) = 81f62f6bcf89a8f2e9babed8d9206562
1
MD5 (hydra-0.1.8.tar.gz) = 895b5e03ec8fb7d023070fcd0c721455
2
SHA256 (hydra-0.1.7.tar.gz) = 3406a7343d23d5a014d6c061a45b6233b6bb8bf92cda82e29b5bbd36b266411a
2
SHA256 (hydra-0.1.8.tar.gz) = ce139dc891b7220a9c128e702b7c7b8d07ede95c13ecea925eecd72e614c1fa3
3
SIZE (hydra-0.1.7.tar.gz) = 286484
3
SIZE (hydra-0.1.8.tar.gz) = 282119
(-)hydra/files/hydra.sh.in (+22 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# PROVIDE: hydra
4
# REQUIRE: DAEMON
5
# KEYWORD: shutdown
6
#
7
# $FreeBSD$
8
#
9
10
hydra_enable=${hydra_enable-"NO"}
11
12
. %%RC_SUBR%%
13
14
load_rc_config hydra
15
16
name=hydra
17
rcvar=`set_rcvar`
18
19
command=%%PREFIX%%/bin/${name}
20
21
load_rc_config ${name}
22
run_rc_command "$1"
(-)hydra/files/patch-hydra.conf (-4 / +89 lines)
Lines 1-6 Link Here
1
--- examples/hydra.conf.orig	Wed Apr  2 22:05:45 2003
1
--- examples/hydra.conf.orig	Thu Mar  9 18:31:13 2006
2
+++ examples/hydra.conf	Wed Apr  2 22:08:18 2003
2
+++ examples/hydra.conf	Tue Apr 25 03:06:31 2006
3
@@ -163,7 +163,7 @@
3
@@ -12,7 +12,7 @@
4
 # $Id: hydra.conf,v 1.23 2006-03-09 18:31:13 nmav Exp $
5
 
6
 # ServerRoot: The directory the .html (and related) files are placed.
7
-ServerRoot /var/www
8
+ServerRoot %%PREFIX%%/www
9
 
10
 # number of threads to spawn
11
 # One thread might be ok for a single CPU system, but in some systems, 
12
@@ -53,8 +53,8 @@
13
 #  User: The name or UID the server should run as.
14
 # Group: The group name or GID the server should run as.
15
 
16
-User nobody
17
-Group nogroup
18
+User %%WWWOWN%%
19
+Group %%WWWGRP%%
20
 
21
 # ServerAdmin: The email address where server problems should be sent.
22
 # Note: this is not currently used, except as an environment variable
23
@@ -74,26 +74,26 @@
24
 # Set to /dev/null if you don't want errors logged.
25
 # If unset, defaults to /dev/stderr
26
 
27
-ErrorLog /var/log/hydra/error_log
28
+ErrorLog %%LOGDIR%%/error_log
29
 # Please NOTE: Sending the logs to a pipe ('|'), as shown below,
30
 #  is somewhat experimental and might fail under heavy load.
31
 # "Usual libc implementations of printf will stall the whole
32
 #  process if the receiving end of a pipe stops reading."
33
-#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/hydra/error_log /var/log/hydra/error-%Y%m%d.log"
34
+#ErrorLog "|/usr/sbin/cronolog --symlink=%%LOGDIR%%/error_log %%LOGDIR%%/error-%Y%m%d.log"
35
 
36
 # AccessLog: The location of the access log file. If this does not
37
 # start with /, it is considered relative to the server root.
38
 # Comment out or set to /dev/null (less effective) to disable 
39
 # Access logging.
40
 
41
-AccessLog /var/log/hydra/access_log
42
+AccessLog %%LOGDIR%%/access_log
43
 # Please NOTE: Sending the logs to a pipe ('|'), as shown below,
44
 #  is somewhat experimental and might fail under heavy load.
45
 # "Usual libc implementations of printf will stall the whole
46
 #  process if the receiving end of a pipe stops reading."
47
-#AccessLog  "|/usr/sbin/cronolog --symlink=/var/log/hydra/access_log /var/log/hydra/access-%Y%m%d.log"
48
+#AccessLog  "|/usr/sbin/cronolog --symlink=%%LOGDIR%%/access_log %%LOGDIR%%/access-%Y%m%d.log"
49
 
50
-# CGILog /var/log/hydra/cgi_log
51
+# CGILog %%LOGDIR%%/cgi_log
52
 # CGILog: The location of the CGI stderr log file. If this does not
53
 # start with /, it is considered relative to the server root.
54
 # The log file would contain any contents send to /dev/stderr
55
@@ -103,7 +103,7 @@
56
 #  is somewhat experimental and might fail under heavy load.
57
 # "Usual libc implementations of printf will stall the whole
58
 #  process if the receiving end of a pipe stops reading."
59
-#CGILog  "|/usr/sbin/cronolog --symlink=/var/log/hydra/cgi_log /var/log/hydra/cgi-%Y%m%d.log"
60
+#CGILog  "|/usr/sbin/cronolog --symlink=%%LOGDIR%%/cgi_log %%LOGDIR%%/cgi-%Y%m%d.log"
61
 
62
 # CGIumask 027 (no mask for user, read-only for group, and nothing for user)
63
 # CGIumask 027
64
@@ -132,11 +132,11 @@
65
 # directory if a ~user request is received.
66
 #
67
 # Example: 
68
-# VirtualHost www.dot.com * /var/www public_html
69
-# VirtualHost www.dot.com 127.0.0.1 /var/www ""
70
+# VirtualHost www.dot.com * %%PREFIX%%/www public_html
71
+# VirtualHost www.dot.com 127.0.0.1 %%PREFIX%%/www ""
72
 #
73
 
74
-#VirtualHost www.dot.com * /var/www ""
75
+#VirtualHost www.dot.com * %%PREFIX%%/www ""
76
 
77
 # DocumentRoot: The root directory of the HTML documents.
78
 # Comment out to disable server non user files.
79
@@ -144,7 +144,7 @@
80
 # Note that if VirtualHost is enabled, this will be the fallback
81
 # for the clients that did not supply any host.
82
 
83
-DocumentRoot /var/www
84
+DocumentRoot %%PREFIX%%/www
85
 
86
 # DirectoryIndex: Name of the file to use as a pre-written HTML
87
 # directory index.  Please MAKE AND USE THESE FILES.  On the
88
@@ -160,7 +160,7 @@
4
 # DirectoryIndex are commented out, accessing a directory will give
89
 # DirectoryIndex are commented out, accessing a directory will give
5
 # an error (though accessing files in the directory are still ok).
90
 # an error (though accessing files in the directory are still ok).
6
 
91
 
Lines 9-15 Link Here
9
 
94
 
10
 # DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker
95
 # DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker
11
 # has been commented out, the the on-the-fly indexing of Hydra can be used
96
 # has been commented out, the the on-the-fly indexing of Hydra can be used
12
@@ -199,7 +199,7 @@
97
@@ -196,7 +196,7 @@
13
 # Set to /dev/null if you do not want to load a mime types file.
98
 # Set to /dev/null if you do not want to load a mime types file.
14
 # Do *not* comment out (better use AddType!)
99
 # Do *not* comment out (better use AddType!)
15
 
100
 
(-)hydra/files/pkg-deinstall.in (+19 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
case $2 in
7
	DEINSTALL)
8
		;;
9
	POST-DEINSTALL)
10
		if [ ! -d %%LOGDIR%% ] ; then
11
			rmdir %%LOGDIR%%
12
		else
13
			echo "--------------------------------------------"
14
			echo " Don't forget to delete %%LOGDIR%% when"
15
			echo " you've finished with hydra's log files."
16
			echo "--------------------------------------------"
17
		fi
18
		;;
19
esac

Return to bug 96298