Update editors/libreoffice-af to version 4.3.2
[dports.git] / Mk / bsd.apache.mk
1 # $FreeBSD$
2 #
3 # bsd.apache.mk - Apache related macros.
4 # Author: Clement Laforet <clement@FreeBSD.org>
5 # Author: Olli Hauer <ohauer@FreeBSD.org>
6 #
7 # Please view me with 4 column tabs!
8
9 # =========================================================================
10 # User controlled parameters for usage in /etc/make.conf:
11 #
12 #  DEFAULT_VERSIONS  - define the default apache version
13 #                      valid args: apache=2.2, apache=2.4
14 #
15 #  APACHE_PORT       - use www/apache22-(event|itk|peruser|worker)-mpm
16 #                      instead www/apache22.  Use this parameter only in
17 #                      combination with "DEFAULT_VERSIONS+= apache=2.2"
18 #
19 # Example entry in /etc/make.conf:
20 # - Set apache22 as default version
21 #    DEFAULT_VERSIONS+= apache=2.2
22 #
23 # - Additional use a special www/apache22-$MPM port
24 #    APACHE_PORT= www/apache22-event-mpm
25 #
26 # Note:
27 #  - This parameters should never be used in the Makefile of a port!
28 #  - To get a list of "possible" APACHE_PORT values execute the command:
29 #    $> awk '/apache22-/ {print "www/" $3}' ports/www/Makefile
30 #
31 # =========================================================================
32 #
33 # This script will be included if one of the following parameter
34 # is defined in the Makefile of the port
35 #
36 # USE_APACHE         - Set apache and apxs as build and run dependency
37 # USE_APACHE_BUILD   - Set apache and apxs as build dependency
38 # USE_APACHE_RUN     - Set apache and apxs as run dependency
39 #
40 # The following example is representative of all three possible
41 # parameters to use.
42 #
43 # Examples:
44 #  USE_APACHE= 22       # specify exact version
45 #  USE_APACHE= 22+      # specify [min] version, no [max] version
46 #  USE_APACHE= 22-24    # specify [min]-[max] range
47 #  USE_APACHE= -22      # specify [max] version, no [min] version
48 #
49 # Note:
50 #  - If "+" is specified and no apache is installed, then
51 #    ${DEFAULT_APACHE_VERSION} will be used.
52 #
53 #  - Valid version numbers are specified in the variable
54 #    APACHE_SUPPORTED_VERSION below
55 #
56 #  - The following values for USE_APACHE are reserverd and only valid
57 #    in apache-server ports!
58 #      USE_APACHE= common22
59 #
60 #
61 # The following variables can be used (ro) in ports Makefile
62 # =========================================================================
63 #  - APACHE_VERSION
64 #  - APACHEETCDIR
65 #  - APACHEINCLUDEDIR
66 #  - APACHEMODDIR
67 #  - DEFAULT_APACHE_VERSION
68 #
69 #
70 # Parameters for building third party apache modules:
71 # =========================================================================
72 #  - AP_FAST_BUILD      # automatic module build
73 #
74 #  - AP_GENPLIST        # automatic PLIST generation plus add
75 #                       # the module disabled into httpd.conf
76 #                       # (only if no pkg-plist exist)
77 #
78 #  - MODULENAME         # default: ${PORTNAME}
79 #  - SHORTMODNAME       # default: ${MODULENAME:S/mod_//}
80 #  - SRC_FILE           # default: ${MODULENAME}.c
81 #
82 #
83
84 .if !defined(Apache_Pre_Include)
85
86 Apache_Pre_Include=             bsd.apache.mk
87
88 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
89
90 .if defined(DEFAULT_APACHE_VER)
91 WARNING+=       "DEFAULT_APACHE_VER is defined, consider using DEFAULT_VERSIONS+=apache=${DEFAULT_APACHE_VER} instead"
92 .endif
93
94 DEFAULT_APACHE_VERSION?=        ${APACHE_DEFAULT:S/.//}
95 APACHE_SUPPORTED_VERSION=       24 22 # preferred version first
96
97 # Print warnings
98 _ERROR_MSG=     : Error from bsd.apache.mk.
99
100 # Important Note:
101 #  Keep apache version in ascending order!
102 #  The "+" sign is only valid as last sign, not between
103 #  two versions or in combination with range!
104 .if defined(USE_APACHE) && !empty(USE_APACHE)
105 .       if ${USE_APACHE:Mcommon*} != ""
106 AP_PORT_IS_SERVER=      yes
107 .       elif ${USE_APACHE:C/\-//:S/^22//:S/^24//:C/\+$//} == ""
108 AP_PORT_IS_MODULE=      yes
109 .               if ${USE_APACHE:C/\-//:S/^22//:S/^24//} == "+"
110 AP_PLUS=        yes
111 .               endif
112 .       else
113 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
114 .       endif
115 # Catch unknown apache versions and silly USE_APACHE constructs
116 .       if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE)
117 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
118 .       endif
119 # Catch USE_APACHE [min]-[max]+
120 .       if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-"
121 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} )
122 .       endif
123 .elif defined(USE_APACHE)
124 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( no version specified )
125 .endif # defined(USE_APACHE)
126
127 # ===============================================================
128 .if defined(AP_PORT_IS_SERVER)
129 # Module selection
130 .for category in ${DEFAULT_MODULES_CATEGORIES}
131 DEFAULT_MODULES+=       ${${category}_MODULES}
132 .endfor
133
134 .for category in ${ALL_MODULES_CATEGORIES}
135 AVAILABLE_MODULES+=     ${${category}_MODULES}
136 .endfor
137
138 # detect invalid lowercase params in make.conf
139 # keep this check until end of 2012
140 .if defined(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M[a-z]*}
141 IGNORE=         lowercase WITH_STATIC_MODULES="${WITH_STATIC_MODULES}"\
142                 detected (make.conf), they shoud be UPPERCASE
143 .endif
144
145 # Setting "@comment " as default.
146 .for module in ${AVAILABLE_MODULES:O}
147 ${module}PLIST_SUB=     "@comment "
148 _DISABLE_MODULES+=      --disable-${module:tl}
149 .endfor
150
151 # Configure
152 # dirty hacks to make sure all modules are disabled before we select them
153 .if ${USE_APACHE:Mcommon2*}
154 CONFIGURE_ARGS+=        ${_DISABLE_MODULES:O:u}
155 .endif
156
157 # OPTIONS handling
158 .for module in ${AVAILABLE_MODULES}
159 .       if ${PORT_OPTIONS:M${module}}
160 _APACHE_MODULES+=       ${module}
161 .       else
162 WITHOUT_MODULES+=       ${module}
163 .       endif
164 .endfor
165
166 .if !defined(WITH_STATIC_APACHE)
167 # FYI
168 #DYNAMIC_MODULES=       so
169 CONFIGURE_ARGS+=        --enable-so
170 .else
171 CONFIGURE_ARGS+=        --disable-so
172 WITH_ALL_STATIC_MODULES=        yes
173 .endif
174
175 .if ${PORT_OPTIONS:MSUEXEC}
176 _APACHE_MODULES+=       ${SUEXEC_MODULES}
177 SUEXEC_CONFARGS=        with-suexec
178
179 # SUEXEC_DOCROOT should exist
180 SUEXEC_DOCROOT?=        ${PREFIX}/www/data
181 #SUEXEC_DOCROOT?=       ${WWWDIR}
182 SUEXEC_USERDIR?=        public_html
183 # avoid duplicate search paths
184 .if ${LOCALBASE} == ${PREFIX}
185 SUEXEC_SAFEPATH?=       ${LOCALBASE}/bin:/usr/bin:/bin
186 .else
187 SUEXEC_SAFEPATH?=       ${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin
188 .endif
189 SUEXEC_LOGFILE?=        /var/log/httpd-suexec.log
190 SUEXEC_UIDMIN?=         1000
191 SUEXEC_GIDMIN?=         1000
192 SUEXEC_CALLER?=         ${WWWOWN}
193 CONFIGURE_ARGS+=        --${SUEXEC_CONFARGS}-caller=${SUEXEC_CALLER} \
194                         --${SUEXEC_CONFARGS}-uidmin=${SUEXEC_UIDMIN} \
195                         --${SUEXEC_CONFARGS}-gidmin=${SUEXEC_GIDMIN} \
196                         --${SUEXEC_CONFARGS}-userdir="${SUEXEC_USERDIR}" \
197                         --${SUEXEC_CONFARGS}-docroot="${SUEXEC_DOCROOT}" \
198                         --${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \
199                         --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" \
200                         --${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec"
201
202 .       if defined(WITH_SUEXEC_UMASK)
203 CONFIGURE_ARGS+=        --${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK}
204 .       endif
205 .endif
206
207 .if !defined(WITHOUT_MODULES)
208 APACHE_MODULES=         ${_APACHE_MODULES}
209 .else
210 .for module in ${_APACHE_MODULES:O:u}
211 .       if !${WITHOUT_MODULES:M${module}}
212 APACHE_MODULES+=        ${module}
213 .       endif
214 .endfor
215 .endif
216
217 .if defined(WITH_STATIC_MODULES)
218 .for module in ${APACHE_MODULES}
219 .       if ${WITH_STATIC_MODULES:M${module}}
220 _CONFIGURE_ARGS+=       --enable-${module:tl}
221 .       else
222 _CONFIGURE_ARGS+=       --enable-${module:tl}=shared
223 .       endif
224 .endfor
225 CONFIGURE_ARGS+=        ${_CONFIGURE_ARGS:O}
226 .elif defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES)
227 WITH_STATIC_MODULES=    ${APACHE_MODULES}
228 CONFIGURE_ARGS+=        --enable-modules="${APACHE_MODULES:O:tl}"
229 .else
230 CONFIGURE_ARGS+=        --enable-mods-shared="${APACHE_MODULES:O:tl}"
231 .endif
232
233 # ====================================
234 # start pkg-plist adjustments
235 .if defined(WITH_STATIC_MODULES)
236 .for module in ${APACHE_MODULES}
237 .       if !${WITH_STATIC_MODULES:M${module}}
238 _SHARED_MODULES+=       ${module}
239 .       endif
240 .endfor
241
242 SHARED_MODULES=         ${_SHARED_MODULES}
243 .elif !defined(WITH_ALL_STATIC_MODULES)
244 SHARED_MODULES=         ${APACHE_MODULES}
245 .endif
246
247 .for module in ${SHARED_MODULES}
248 ${module}PLIST_SUB=     ""
249 .endfor
250
251 .for module in ${AVAILABLE_MODULES:O:u}
252 PLIST_SUB+=     MOD_${module}=${${module}PLIST_SUB}
253 .endfor
254
255 # pkg-plist workaround STATIC support
256 .if ${PORT_OPTIONS:MSUEXEC}
257 PLIST_SUB+=     SUEXEC=""
258 .else
259 PLIST_SUB+=     SUEXEC="@comment "
260 .endif
261
262 .if ${PORT_OPTIONS:MLOG_FORENSIC}
263 PLIST_SUB+=     FORENSIC=""
264 .else
265 PLIST_SUB+=     FORENSIC="@comment "
266 .endif
267
268 # end pkg-plist adjustments
269
270 #### End of AP_PORT_IS_SERVER ####
271
272 # ===============================================================
273 .elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD)
274 APXS?=          ${LOCALBASE}/sbin/apxs
275 HTTPD?=         ${LOCALBASE}/sbin/httpd
276
277 MODULENAME?=    ${PORTNAME}
278 SHORTMODNAME?=  ${MODULENAME:S/mod_//}
279 SRC_FILE?=      ${MODULENAME}.c
280
281 .if exists(${HTTPD})
282 _APACHE_VERSION!=       ${HTTPD} -v | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p'
283 .elif defined(APACHE_PORT)
284 _APACHE_VERSION!=       ${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p'
285 .endif
286
287 .if defined(USE_APACHE)
288 _USE_APACHE:=   ${USE_APACHE}
289 .elif defined(USE_APACHE_BUILD)
290 _USE_APACHE:=   ${USE_APACHE_BUILD}
291 .elif defined(USE_APACHE_RUN)
292 _USE_APACHE:=   ${USE_APACHE_RUN}
293 .endif
294
295 _APACHE_VERSION_CHECK:=         ${_USE_APACHE:C/^([1-9][0-9])$/\1-\1/}
296 _APACHE_VERSION_MINIMUM_TMP:=   ${_APACHE_VERSION_CHECK:C/([1-9][0-9])[-+].*/\1/}
297 _APACHE_VERSION_MINIMUM:=       ${_APACHE_VERSION_MINIMUM_TMP:M[1-9][0-9]}
298 _APACHE_VERSION_MAXIMUM_TMP:=   ${_APACHE_VERSION_CHECK:C/.*-([1-9][0-9])/\1/}
299 _APACHE_VERSION_MAXIMUM:=       ${_APACHE_VERSION_MAXIMUM_TMP:M[1-9][0-9]}
300
301 # ==============================================================
302 # num+
303 .if ${_USE_APACHE:M*+}
304 _APACHE_WANTED_VERSIONS=        ${DEFAULT_APACHE_VERSION}
305
306 # -num
307 .elif ${_USE_APACHE:M\-[0-9][0-9]}
308 .for _v in ${APACHE_SUPPORTED_VERSION:O}
309 .       if ${_APACHE_VERSION_MAXIMUM} >= ${_v}
310 _APACHE_WANTED_VERSIONS+=       ${_v}
311 .       endif
312 .endfor
313
314 # num-num
315 .elif ${_USE_APACHE:M[0-9][0-9]-[0-9][0-9]}
316 .for _v in ${APACHE_SUPPORTED_VERSION}
317 .       if ${_APACHE_VERSION_MINIMUM} <= ${_v} && ${_APACHE_VERSION_MAXIMUM} >= ${_v}
318 _APACHE_WANTED_VERSIONS+=       ${_v}
319 .       endif
320 .endfor
321
322 # num
323 .elif ${_USE_APACHE:M[0-9][0-9]}
324 _APACHE_WANTED_VERSIONS=        ${_USE_APACHE:M[0-9][0-9]}
325 .endif
326 # ==============================================================
327
328 .if !defined(_APACHE_WANTED_VERSIONS)
329 _APACHE_WANTED_VERSIONS=        ${DEFAULT_APACHE_VERSION}
330 .endif
331
332 .for _v in ${_APACHE_WANTED_VERSIONS:O:u}
333 _APACHE_HIGHEST_VERSION:=       ${_v}
334 .       if defined (_APACHE_VERSION) && ${_APACHE_VERSION} == ${_v}
335 _APACHE_WANTED_VERSION:=        ${_v}
336 .       endif
337 .endfor
338
339 .if !defined(_APACHE_WANTED_VERSION)
340 # next line is broken on 8.x and 9.x but working on 10
341 #_APACHE_WANTED_VERSION:=       ${_APACHE_WANTED_VERSIONS:O:u:M${DEFAULT_APACHE_VERSION}}
342 # working line on 8.x, 9.x, 10
343 _APACHE_WANTED_VERSION:=        ${_APACHE_WANTED_VERSIONS:O:u:MDEFAULT_APACHE_VERSION}
344 .       if empty(_APACHE_WANTED_VERSION)
345 _APACHE_WANTED_VERSION:=        ${_APACHE_HIGHEST_VERSION}
346 .       endif
347 .endif
348
349 .if defined(_APACHE_VERSION) && ${_APACHE_VERSION} != ${_APACHE_WANTED_VERSION}
350 BROKEN= ${_ERROR_MSG} apache${_APACHE_VERSION} is installed (or APACHE_PORT is defined) and port requires apache${_APACHE_VERSION_NONSUPPORTED}
351 .endif
352
353 APACHE_VERSION:=        ${_APACHE_WANTED_VERSION}
354
355 .if exists(${APXS})
356 APXS_PREFIX!=   ${APXS} -q prefix 2> /dev/null || echo NULL
357 .       if ${APXS_PREFIX} == NULL
358 IGNORE= : Your apache does not support DSO modules
359 .       endif
360 .       if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX}
361 IGNORE?=        PREFIX must be equal to APXS_PREFIX.
362 .       endif
363 .endif
364
365 APACHEMODDIR=   libexec/apache${APACHE_VERSION}
366 APACHEINCLUDEDIR=include/apache${APACHE_VERSION}
367 APACHEETCDIR=   etc/apache${APACHE_VERSION}
368 APACHE_PORT?=   www/apache${APACHE_VERSION}
369
370 PLIST_SUB+=     APACHEMODDIR="${APACHEMODDIR}" \
371                 APACHEINCLUDEDIR="${APACHEINCLUDEDIR}" \
372                 APACHEETCDIR="${APACHEETCDIR}" \
373                 APACHE_VERSION="${APACHE_VERSION}"
374
375 SUB_LIST+=      APACHEMODDIR="${APACHEMODDIR}" \
376                 APACHEETCDIR="${APACHEETCDIR}" \
377                 APACHE_VERSION="${APACHE_VERSION}"
378
379 APACHE_PKGNAMEPREFIX=   ap${APACHE_VERSION}-
380
381 .if defined(AP_FAST_BUILD)
382 PKGNAMEPREFIX?= ${APACHE_PKGNAMEPREFIX}
383 .endif
384
385 .if defined(USE_APACHE) || defined(USE_APACHE_BUILD)
386 BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT}
387 .endif
388
389 .if defined(USE_APACHE) || defined(USE_APACHE_RUN)
390 RUN_DEPENDS+=   ${APXS}:${PORTSDIR}/${APACHE_PORT}
391 .endif
392
393 PLIST_SUB+=     AP_NAME="${SHORTMODNAME}"
394 PLIST_SUB+=     AP_MODULE="${MODULENAME}.so"
395
396 .if defined(AP_GENPLIST)
397 PLIST?=         ${WRKDIR}/ap-plist
398 .endif
399
400 .if defined(AP_INC)
401 AP_EXTRAS+=     -I ${AP_INC}
402 .endif
403 .if defined(AP_LIB)
404 AP_EXTRAS+=     -L ${AP_LIB}
405 .endif
406
407 .endif # End of AP_PORT_IS_SERVER   / AP_PORT_IS_MOULE
408 .endif # End of !Apache_Pre_Include
409
410 # ===============================================================
411 .if defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include)
412 Apache_Post_Include=    bsd.apache.mk
413
414 .if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN)
415 .       if ${USE_APACHE_RUN:C/\-//:S/^22//:S/^24//:C/\+$//} != ""
416 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( ${USE_APACHE_RUN} )
417 .       endif
418 .elif defined(USE_APACHE_RUN)
419 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( no valid version specified )
420 .endif
421
422 .if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD)
423 .       if ${USE_APACHE_BUILD:C/\-//:S/^22//:S/^24//:C/\+$//} != ""
424 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( ${USE_APACHE_BUILD} )
425 .       endif
426 .elif defined(USE_APACHE_BUILD)
427 IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( no valid version specified )
428 .endif
429
430 # Check if USE_APACHE(_BUILD|_RUN) are mixed together
431 .if defined(USE_APACHE) && ( defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) )
432 IGNORE= ${_ERROR_MSG} specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN
433 .elif defined(USE_APACHE_BUILD) && defined(USE_APACHE_RUN)
434 IGNORE= ${_ERROR_MSG} use USE_APACHE instead of USE_APACHE_BUILD and USE_APACHE_RUN together
435 .endif
436
437 .if defined(NO_BUILD) && defined(USE_APACHE)
438 BROKEN= If NO_BUILD is used, then USE_APACHE_RUN is sufficient. Please fix your Makefile
439 .endif
440
441 .if defined(AP_PORT_IS_SERVER)
442 .if !target(print-closest-mirrors)
443 print-closest-mirrors:
444         @${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2
445         @MIRRORS=`${FETCH_CMD} -T 30 -qo - http://www.apache.org/dyn/closer.cgi/httpd/ 2> /dev/null\
446         | ${GREP} /httpd/ | ${SED} 's/.*href="\(.*\)"><str.*/\1/g' | \
447         ${HEAD} -7 | ${TAIL} -6` ; \
448         ${ECHO_MSG} done >&2; if [ "x$$MIRRORS" != "x" ]; then \
449         ${ECHO_MSG} -n "MASTER_SITE_APACHE_HTTPD?= ";\
450         ${ECHO_MSG} $$MIRRORS; else \
451         ${ECHO_MSG} "No mirrors found!">&2 ; fi
452 .endif
453
454 .if !target(show-modules)
455 show-modules:
456 .if !empty(APACHE_MODULES)
457 .for module in ${AVAILABLE_MODULES}
458         @${PRINTF} "%-20s : " ${module}
459 .       if ${APACHE_MODULES:M${module}}
460                 @${ECHO} -n "enabled "
461 .               if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}}
462                         @${ECHO_CMD} " (static)"
463 .               else
464                         @${ECHO_CMD} "(shared)"
465 .               endif
466 .       else
467                 @${ECHO_CMD} disabled
468 .       endif
469 .endfor
470 .else
471 .for module in ${AVAILABLE_MODULES}
472         @${PRINTF} "%-20s : disabled\n" ${module}
473 .endfor
474 .endif
475 .endif
476
477 .elif defined(AP_PORT_IS_MODULE)
478
479 .if defined(AP_MODENABLE)
480 AP_MOD_EN=      -a
481 .else
482 AP_MOD_EN=      -A
483 .endif
484 PLIST_SUB+=     AP_MOD_EN="${AP_MOD_EN}"
485
486 .if defined(AP_FAST_BUILD)
487 .if !target(ap-gen-plist)
488 ap-gen-plist:
489 .if defined(AP_GENPLIST)
490 .       if !exists(${PLIST})
491         @${ECHO} "===>  Generating apache plist"
492         @${ECHO} "@unexec ${SED} -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST}
493         @${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST}
494         @${ECHO} "@exec %D/sbin/apxs -e ${AP_MOD_EN} -n %%AP_NAME%% %D/%F" >> ${PLIST}
495         @${ECHO} "@unexec echo \"Don't forget to remove all ${MODULENAME}-related directives in your httpd.conf\"">> ${PLIST}
496 .       endif
497 .else
498         @${DO_NADA}
499 .endif
500 .endif
501
502 .if !target(do-build)
503 do-build: ap-gen-plist
504         (cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.la ${SRC_FILE})
505 .endif
506
507 .if !target(do-install)
508 do-install:
509         @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}
510         ${APXS} -S LIBEXECDIR=${STAGEDIR}${PREFIX}/${APACHEMODDIR} -i -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.la
511 .       if !defined(DEBUG)
512                 @${ECHO_MSG} "===> strip ${APACHEMODDIR}/${MODULENAME}.so"
513                 @[ -e ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so ] && ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so
514 .       else
515                 @${ECHO_MSG} "===> DEBUG is set, will not strip ${APACHEMODDIR}/${MODULENAME}.so"
516 .       endif
517 .endif
518
519 .endif          # defined(AP_FAST_BUILD)
520 .endif          # defined(AP_PORT_IS_SERVER / AP_PORT_IS_MODULE)
521 .endif          # defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include)