aboutsummaryrefslogtreecommitdiffstats
path: root/www/hydra/Makefile
blob: 5a51aaf23e4e89a032916d564a976f8a368c812f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# ex:ts=8
# Ports collection makefile for:    hydra
# Date created:         Apr 2, 2003
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   hydra
PORTVERSION=    0.1.8
PORTREVISION=   3
CATEGORIES= www
MASTER_SITES=   http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/ \
        ftp://ftp.hellug.gr/pub/software/hydra/

MAINTAINER= shaun@FreeBSD.org
COMMENT=    A high performance multi-threaded web server

LIB_DEPENDS=    gnutls.13:${PORTSDIR}/security/gnutls

USE_RC_SUBR=    hydra.sh

NO_LATEST_LINK= yes
GNU_CONFIGURE=  yes
CONFIGURE_TARGET=   --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"

CPPFLAGS=   -I${LOCALBASE}/include
LDFLAGS=    -L${LOCALBASE}/lib

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 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 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>