Update sysutils/bacula9-docs to version 9.2.2
[dports.git] / www / gatling / Makefile
1 # Created by: Thomas-Martin Seck <tmseck@netcologne.de>
2 # $FreeBSD$
3
4 PORTNAME=       gatling
5 PORTVERSION=    0.15
6 CATEGORIES=     www benchmarks ftp ipv6
7 MASTER_SITES=   http://www.fefe.de/gatling/
8
9 MAINTAINER=     coco@executive-computing.de
10 COMMENT=        High performance webserver with scalability benchmark tools
11
12 LICENSE=        GPLv2
13
14 BROKEN_mips=            fails to compile: dirfd.c: error: expected ';', ',' or ')' before 'key'
15 BROKEN_mips64=          fails to compile: dirfd.c: error: expected ';', ',' or ')' before 'key'
16 BROKEN_powerpc64=       fails to compile: dirfd.c: error: expected ';', ',' or ')' before 'key'
17
18 BUILD_DEPENDS=  libowfat>=0.31:devel/libowfat
19
20 USES=           gmake ssl tar:xz
21 USE_RC_SUBR=    gatling
22
23 CFLAGS+=        -I${LOCALBASE}/include/libowfat -I${OPENSSLINC} -I${LOCALBASE}/include
24 LDFLAGS+=       -L${LOCALBASE}/lib -L${OPENSSLLIB}
25
26 MAKEFILE=       GNUmakefile
27
28 bin=            dl
29 sbin=           gatling
30 GATLING8=       gatling.8
31 PLIST_FILES=    man/man8/gatling.8.gz
32 PORTDOCS=       CHANGES README README.antidos README.cgi README.ftp \
33                 README.htaccess \
34                 README.http README.performance README.prefetch README.proxy \
35                 README.redirect
36 PORTEXAMPLES=   run-gatling cgi acc getlinks hcat hitprofile matchiprange \
37                 referrer
38
39 OPTIONS_DEFINE= BENCHMARKS SMB TLS ZLIB OPTIMIZED_CFLAGS DOCS EXAMPLES DEBUG
40 OPTIONS_SUB=    yes
41 OPTIONS_DEFAULT=        BENCHMARKS SMB TLS ZLIB OPTIMIZED_CFLAGS
42 BENCHMARKS_DESC=        Install some benchmark programs
43 TLS_DESC=               Build and install tlsgatling
44 ZLIB_DESC=              Compress outgoing data
45
46 .include <bsd.port.pre.mk>
47
48 .if ${PORT_OPTIONS:MBENCHMARKS}
49 PORTDOCS+=      README.bindbench README.forkbench README.httpbench \
50                 README.manymapbench README.mmapbench
51 bin+=           bindbench forkbench forksbench httpbench ioerr manymapbench \
52                 mktestdata mmapbench pthreadbench
53 PORTEXAMPLES+=  prep run-bench
54 BENCH1=         bench.1
55 PLIST_FILES+=   man/man1/bench.1.gz
56 MAKE_ENV+=      BENCHMARKS=1
57 .endif
58
59 .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} && !defined(WITH_DEBUG)
60 CFLAGS+=        -O2 -fomit-frame-pointer
61 .endif
62
63 .if ${PORT_OPTIONS:MSMB}
64 USES+=          iconv
65 CFLAGS+=        -I${LOCALBASE}/include
66 MAKE_ENV+=      ICONV=1
67 .else
68 EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-disable_smb
69 .endif
70
71 .if ${PORT_OPTIONS:MTLS}
72 MAKE_ENV+=      TLSGATLING=1
73 sbin+=          tlsgatling
74 PORTDOCS+=      README.tls
75 .endif
76
77 .if ${PORT_OPTIONS:MZLIB}
78 MAKE_ENV+=      ZLIB=1
79 .endif
80
81 .if ${PORT_OPTIONS:MDEBUG}
82 MAKE_ENV+=      DEBUG=1
83 STRIP=
84 .endif
85
86 PLIST_FILES+=   ${bin:S,^,bin/,} ${sbin:S,^,sbin/,} sbin/gatling_wrapper
87
88 post-patch:
89         ${REINPLACE_CMD} -e 's/\(trymd5.c\) \(-lcrypto\)/\1 $$(LDFLAGS) \2/'    \
90                 ${WRKSRC}/GNUmakefile
91
92 pre-install:
93         cd ${WRKSRC} && ${CP} gatling.1 gatling.8
94
95 do-install:
96         cd ${WRKSRC} && ${INSTALL_PROGRAM} ${bin} ${STAGEDIR}${PREFIX}/bin
97         cd ${WRKSRC} && ${INSTALL_PROGRAM} ${sbin} ${STAGEDIR}${PREFIX}/sbin
98         ${INSTALL_SCRIPT} ${FILESDIR}/gatling_wrapper ${STAGEDIR}${PREFIX}/sbin
99         ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
100         cd ${WRKSRC} && ${INSTALL_SCRIPT} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
101 .if !empty(BENCH1)
102         cd ${WRKSRC} && ${INSTALL_MAN} ${BENCH1} ${STAGEDIR}${MAN1PREFIX}/man/man1
103 .endif
104         cd ${WRKSRC} && ${INSTALL_MAN} ${GATLING8} ${STAGEDIR}${MAN8PREFIX}/man/man8
105         ${MKDIR} ${STAGEDIR}${DOCSDIR}
106         cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
107
108 .include <bsd.port.post.mk>