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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
# New ports collection makefile for: apache2
# Date created: 7 April 2001
# Whom: Hye-Shik Chang <perky@fallin.lv>
#
# $FreeBSD$
#
PORTNAME= apache
PORTVERSION= 2.0.48
CATEGORIES= www ipv6
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \
http://sheepkiller.nerim.net/ports/${PORTNAME}/:powerlogo
DISTNAME= httpd-${PORTVERSION}
DISTFILES= ${DISTNAME}.tar.gz powerlogo.gif:powerlogo
DIST_SUBDIR= apache2
EXTRACT_ONLY= ${DISTNAME}.tar.gz
MAINTAINER?= sheepkiller@cultdeadsheep.org
COMMENT?= Version 2 of the extremely popular Apache http server
FORBIDDEN= Please use www/apache2
LIB_DEPENDS= expat.4:${PORTSDIR}/textproc/expat2
LATEST_LINK= apache2
CONFLICTS= apache+ipv6-1.* apache+modssl-1.* apache+ssl-1.* apache-1.* apache_fp-1.* \
caudium-devel-1.* caudium10-1.* caudium12-* \
ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.*
## Available knobs:
## By default, modules are compiled as dynamically loadable (DSO) modules.
##
## Apache-related
## WITH_MPM: prefork (default)
## worker
## perchild
## HTTP_PORT: default: 80
## WITH_LDAP: Enable LDAP support (mod_auth_ldap)
## WITHOUT_PROXY: Disable proxy support
## WITH_CUSTOM_PROXY: Let you choose which proxy modules you wish
## WITHOUT_AUTH: Disable auth modules
## WITH_CUSTOM_AUTH: Let you choose which auth modules you wish
## WITHOUT_DAV: Disable DAV support
## IPV6_V6ONLY: Disable IPv4 support
## WITHOUT_SSL: Disable SSL support
## WITH_THREADS: Enable threads support !! USE IT WITH CARE !!
## WITH_CUSTOM_THREADS: Let you choose which threaded modules you want
## WITH_EXPERIMENTAL: Enable Experimental modules
## WITH_DBM: Choose your DBM: bdb (Berkeley DB), gdbm or ndbm (default)
## WITH_BERKELEYDB: Choose your BerkeleyDB version: db2, db3 or db4 (default)
## WITH_STATIC_SUPPORT: Build statically linked support binaries
## WITH_STATIC_APACHE: Build a static version of httpd (implies WITH_STATIC_MODULES)
## WITH_ALL_STATIC_APACHE: All modules statically linked.
## WITH_STATIC_MODULES: List of modules to build modules statics (usefull for slave ports)
## (They must be already enabled (i.e. WITH_MODULES or with default configuration
## use 'make show-modules', to check if they are enabled)
## WITH_EXPERIMENTAL: Build and install experimental modules
## WITH_EXTRA_MODULES: To add addtionnal modules
## WITH_MODULES: List of your own modules
## WITHOUT_MODULES: Disable listed modules
##
##
## Port-related:
## NOPORTDOCS: Do not install documentation
## NO_CGI: Do not instal www/cgi-bin*
## NO_ERROR: Do not instal www/error
## NO_WWWDATA: Do not instal www/data*
## NO_ICONS: Do not instal www/icons*
## NO_WWW: Implies NO_CGI, NO_WWWDATA, NO_ICONS and NO_ERROR
##
## Available make targets:
## show-options: prints this message
## show-modules: prints list of available modules
##
## Examples:
## make WITHOUT_SSL=yes WITH_EXTRA_MODULES="bucketeer case_filter case_filter_in" WITHOUT_PROXY=yes
## make WITH_STATIC_MODULES="ssl rewrite include" WITH_EXPERIMENTAL=yes WITH_CUSTOM_AUTH="auth auth_dbm"
## make WITH_EXPERIMENTAL=yes WITHOUT_MODULES="access speling status"
## make WITH_MODULES="include rewrite auth"
##
WITH_MPM?= prefork # or worker, perchild
HTTP_PORT?= 80
GNU_CONFIGURE= yes
USE_LIBTOOL_VER=13
USE_PERL5= yes
USE_REINPLACE= yes
CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \
--enable-layout=FreeBSD \
--with-perl=${PERL5} \
--with-port=${HTTP_PORT} \
--with-expat=${LOCALBASE} \
--libdir=${PREFIX_RELDEST}/lib/apache2 \
--includedir=${PREFIX_RELDEST}/include/apache2
CONFIGURE_ENV= CC="${CC}" CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}" CONFIG_SHELL="${SH}"
DOCSDIR= share/doc/apache2
PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,}
RC_SUB= -e 's,@@PREFIX@@,${PREFIX_RELDEST},g'
MAKE_ENV+= DESTDIR=${DESTDIR} EXPR_COMPAT=yes
.if defined(NOPORTDOCS)
MAKE_ENV+= NOPORTDOCS=yes
.endif
MAN1= dbmmanage.1 htdigest.1 htpasswd.1
MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 suexec.8
.if !defined(IPV6_V6ONLY)
CONFIGURE_ARGS+= --enable-v4-mapped
.endif
.if !defined(WITHOUT_SSL)
USE_OPENSSL= yes
.endif
.if defined(WITH_LDAP)
USE_LDAP= YES
CONFIGURE_ARGS+= --with-ldap \
--with-ldap-lib="${LOCALBASE}/lib" \
--with-ldap-include="${LOCALBASE}/include"
.endif
.if defined(NO_WWW)
NO_CGI= YES
NO_WWWDATA= YES
NO_ICONS= YES
NO_ERROR= YES
.endif
.if defined(NO_CGI)
MAKE_ENV+= NO_CGI=yes
PLIST_SUB+= CGI="@comment "
.else
PLIST_SUB+= CGI=""
.endif
.if defined(NO_ICONS)
MAKE_ENV+= NO_ICONS=yes
PLIST_SUB+= ICONS="@comment "
.else
PLIST_SUB+= ICONS=""
.endif
.if defined(NO_WWWDATA)
MAKE_ENV+= NO_WWWDATA=yes
PLIST_SUB+= WWWDATA="@comment "
.else
PLIST_SUB+= WWWDATA=""
.endif
.if defined(NO_ERROR)
MAKE_ENV+= NO_ERROR=yes
PLIST_SUB+= ERROR="@comment "
.else
PLIST_SUB+= ERROR=""
.endif
.if defined(WITH_STATIC_SUPPORT)
CONFIGURE_ARGS+= --enable-static-support
.endif
.include <bsd.port.pre.mk>
.include "${.CURDIR}/Makefile.modules"
CONFIGURE_ARGS+= --with-mpm=${WITH_MPM:L} ${CONFIGURE_TARGET}
show-options:
@${EGREP} '^##' ${.CURDIR}/Makefile | ${SED} 's/##//'
show-modules:
@for module in $(AVAILABLE_MODULES) ; do \
${ECHO_MSG} -n "$${module}: ";\
if ${ECHO_CMD} ${APACHE_MODULES} | ${GREP} -wq $${module} 2> /dev/null ; then \
${ECHO_CMD} -n "enabled "; \
if ${ECHO_CMD} ${WITH_STATIC_MODULES} | ${GREP} -wq $${module} 2> /dev/null ; then \
${ECHO_CMD} "(static)" ; \
else \
${ECHO_CMD} "(shared)" ;\
fi;\
else\
${ECHO_CMD} disabled ;\
fi;\
done
pre-everything::
@${ECHO_MSG} ""
@${ECHO_MSG} " To see all available knobs, type make show-options"
@${ECHO_MSG} ""
post-extract:
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/powerlogo.gif ${WRKSRC}/docs/icons/freebsd.gif
post-patch:
@cd ${WRKSRC}/docs/docroot && \
for f in index.html.*; do (\
${REINPLACE_CMD} -e 's,apache_pb,icons/freebsd.gif"\
ALT="[Powered by FreeBSD]"><IMG SRC="apache_pb2_ani,g' $$f \
); done
@${RM} -f ${WRKSRC}/docs/docroot/*.bak
@${SED} ${RC_SUB} ${FILESDIR}/apache.sh >${WRKDIR}/apache2.sh
@${SED} ${RC_SUB} ${FILESDIR}/config.layout >>${WRKSRC}/config.layout
@${RM} -f ${WRKSRC}/docs/manual/index.html.ko.euc-kr
pre-install:
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
@if [ ! -f ${PREFIX}/etc/rc.d/apache2.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache2.sh startup file."; \
${INSTALL_SCRIPT} -m 751 ${WRKDIR}/apache2.sh ${PREFIX}/etc/rc.d/apache2.sh; \
fi
.include <bsd.port.post.mk>
|