aboutsummaryrefslogtreecommitdiffstats
path: root/www/gatling/Makefile
blob: 5375882c74e411283f0119a4c830ef4f6d92a895 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Ports collection Makefile for: gatling
# Date created:         Feb 21, 2004
# Whom:             Thomas-Martin Seck <tmseck@netcologne.de>
#
# $FreeBSD$
#

PORTNAME=   gatling
PORTVERSION=    0.9
CATEGORIES= www benchmarks ftp ipv6
MASTER_SITES=   http://dl.fefe.de/

MAINTAINER= tmseck@netcologne.de
COMMENT=    A high performance webserver with scalability benchmark tools

BUILD_DEPENDS=  libowfat>=0.25:${PORTSDIR}/devel/libowfat

USE_BZIP2=  yes
USE_GMAKE=  yes
USE_OPENSSL=    yes

CFLAGS+=    -I${LOCALBASE}/include/libowfat -I${OPENSSLINC}
LDFLAGS+=   -L${LOCALBASE}/lib -L${OPENSSLLIB}

MAKEFILE=   GNUmakefile
MAKE_ENV+=  PTHREAD_LIBS="${PTHREAD_LIBS}"

bin=        dl
sbin=       gatling
MAN8=       gatling.8
PORTDOCS=   CHANGES README README.cgi README.ftp README.htaccess \
        README.http README.performance README.prefetch README.proxy \
        README.redirect
PORTEXAMPLES=   run-gatling cgi acc hcat referrer

OPTIONS=    GATLING_BENCHMARKS "Install some benchmark programs" on \
        GATLING_ICONV "Use charset conversion" off \
        GATLING_TLS "Install tlsgatling" off \
        GATLING_ZLIB "Compress outgoing data" off \
        GATLING_OPTIMIZED_CFLAGS "Use optimized CFLAGS" on

.include <bsd.port.pre.mk>

.if defined(WITH_GATLING_BENCHMARKS) || defined(WITH_BENCHMARKS)
PORTDOCS+=  README.bindbench README.forkbench README.httpbench \
        README.manymapbench README.mmapbench
bin+=       bindbench forkbench forksbench httpbench ioerr manymapbench \
        mktestdata mmapbench pthreadbench
examples+=  prep run-bench
MAKE_ENV+=  BENCHMARKS=1
.endif

.if defined(WITH_GATLING_OPTIMIZED_CFLAGS)
CFLAGS+=    -O2 -fomit-frame-pointer
.endif

.if defined(WITH_GATLING_ICONV)
USE_ICONV=  yes
CFLAGS+=    -I${LOCALBASE}/include
MAKE_ENV+=  ICONV=1
.endif

.if defined(WITH_GATLING_TLS)
.if defined(WITH_GATLING_ZLIB)
# For reasons unknown, gatling with both HTTPS and zlib support only compiles
# with gcc 3.1 and above. Depend on gcc 3.4+ since this is the default
# compiler on supported FreeBSD systems anyway.
USE_GCC=    3.4+
.endif
MAKE_ENV+=  TLSGATLING=1
sbin+=      tlsgatling
portdocs+=  README.tls
.endif

.if defined(WITH_GATLING_ZLIB)
MAKE_ENV+=  ZLIB=1
.endif

PLIST_FILES=    ${bin:S,^,bin/,} ${sbin:S,^,sbin/,}

pre-install:
    @cd ${WRKSRC} && ${CP} gatling.1 gatling.8

do-install:
    cd ${WRKSRC} && ${INSTALL_PROGRAM} ${bin} ${PREFIX}/bin
    cd ${WRKSRC} && ${INSTALL_PROGRAM} ${sbin} ${PREFIX}/sbin
.if !defined(NOPORTEXAMPLES)
    ${MKDIR} ${EXAMPLESDIR}
    cd ${WRKSRC} && ${INSTALL_SCRIPT} ${PORTEXAMPLES} ${EXAMPLESDIR}
.endif
    cd ${WRKSRC} && ${INSTALL_MAN} ${MAN8} ${MAN8PREFIX}/man/man8
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif

.include <bsd.port.post.mk>