1 # $NetBSD: Makefile,v 1.45 2000/04/05 21:05:30 cjs Exp $
3 # The fourth number in the PKGNAME version indicates a NetBSD pkg revision
4 # (to indicate changes in the shipped third party patches such as the mod_ssl
5 # EAPI when there has been no change to the Apache version number).
7 # This pkg does not compile in mod_ssl, only the `mod_ssl EAPI' (a set of
8 # code hooks that allow mod_ssl to be compiled separately later, if desired).
10 DISTNAME= apache_1.3.12
11 PKGNAME= apache-1.3.12
13 MASTER_SITES= http://www.apache.org/dist/ \
14 ftp://ftp.modssl.org/source/ \
15 http://www.netbsd.org/images/logos/
16 DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
17 ${SSL_DISTNAME}${EXTRACT_SUFX} \
20 MAINTAINER= tron@netbsd.org
21 HOMEPAGE= http://www.apache.org/
23 CONFLICTS= apache-*modssl-* apache6-*
25 SSL_DISTNAME= mod_ssl-2.6.3-1.3.12
27 EXTRACT_ONLY= ${DISTFILES:N*.gif}
29 CONFIGURE_ARGS+= --prefix=${PREFIX} --libexecdir=${PREFIX}/lib/httpd \
30 --runtimedir=/var/run --datadir=${PREFIX}/share/httpd \
31 --cgidir=${PREFIX}/libexec/cgi-bin \
32 --logfiledir=/var/log/httpd --sysconfdir=${PREFIX}/etc/httpd \
33 --proxycachedir=/var/spool/httpd/proxy \
34 --includedir=${PREFIX}/include/httpd \
35 --sbindir=${PREFIX}/sbin \
36 --enable-rule=EAPI --enable-module=most \
37 --disable-module=ssl --enable-module=auth_db \
38 --disable-module=auth_dbm \
39 --with-perl=${PREFIX}/bin/perl
40 CONFIGURE_ENV+= OPTIM="${OPTIM}"
42 .include "../../mk/bsd.prefs.mk"
44 .if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
45 CONFIGURE_ARGS+= --enable-suexec --suexec-caller=www \
46 --suexec-safepath='/bin:/usr/bin:${PREFIX}/bin:/usr/local/bin'
49 .if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
50 OPTIM+= -DBUFFERED_LOGS
51 CFLAGS+= -O6 -fomit-frame-pointer -fexpensive-optimizations
54 .if (${OPSYS} == "SunOS")
55 DEPENDS+= db-2.7.7:../../databases/db
56 LDFLAGS+= -Wl,-R/usr/ucblib -L/usr/ucblib -Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib
57 CONFIGURE_ENV+= INCLUDES="-I${LOCALBASE}/include/db2"
58 CONFIGURE_ENV+= LIBS="-ldbm -ldb2"
61 PLIST_SRC= ${WRKDIR}/PLIST
63 BUILD_DEFS+= APACHE_PERF_TUNING APACHE_SUEXEC
65 # Note that there is NO static compile module hook here. This is intentional.
66 # Under Apache 1.3, modules can be compiled to link dynamically to the server
67 # using the "apxs" program. See apxs(8).
70 @${CP} ${FILESDIR}/ap_include_extern.h ${WRKSRC}/src/include/
71 @${CP} ${WRKDIR}/${SSL_DISTNAME}/pkg.eapi/*.c ${WRKSRC}/src/ap/
72 @${CP} ${WRKDIR}/${SSL_DISTNAME}/pkg.eapi/*.h ${WRKSRC}/src/include/
75 @cd ${WRKSRC} && ${CAT} \
76 ../${SSL_DISTNAME}/pkg.eapi/eapi.patch \
77 ../${SSL_DISTNAME}/pkg.sslcfg/sslcfg.patch \
78 ../${SSL_DISTNAME}/pkg.sslmod/sslmod.patch \
79 ../${SSL_DISTNAME}/pkg.sslsup/sslsup.patch \
80 | ${PATCH} ${PATCH_ARGS}
81 @cd ${WRKSRC} && ${TAIL} +156 \
82 ../${SSL_DISTNAME}/pkg.ssldoc/ssldoc.patch \
83 | ${PATCH} ${PATCH_ARGS}
86 @${FIND} ${WRKSRC}/htdocs -name '*.orig' | xargs ${RM} -f
89 ${SED} s#@PREFIX@#${PREFIX}#g <${FILESDIR}/apache.sh \
93 ${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif \
94 ${PREFIX}/share/httpd/htdocs
95 ${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d/apache.sh
96 @${MV} ${PREFIX}/lib/httpd/libproxy.so \
97 ${PREFIX}/lib/httpd/mod_proxy.so 2>/dev/null || \
98 ${MKDIR} ${PREFIX}/lib/httpd
99 @${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
100 .for FILE in man/man8/suexec.8 sbin/suexec
101 @if ${TEST} -e ${PREFIX}/${FILE} ; then \
102 ${ECHO} ${FILE} >>${PLIST_SRC}; \
106 .include "../../mk/bsd.pkg.mk"
109 CONFIGURE_ARGS+= --enable-module=so --enable-shared=proxy
111 CONFIGURE_ARGS+= --disable-module=proxy