summaryrefslogtreecommitdiff
path: root/www/hydra/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'www/hydra/Makefile')
-rw-r--r--www/hydra/Makefile34
1 files changed, 24 insertions, 10 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>