pkgsrc/www/apache/Makefile
jlam fbb10cccfb Update www/apache to 1.3.24 with EAPI patch from mod_ssl-2.8.8-1.3.24.
Relevant changes from version 1.3.23 include:

     * Prevent invalid client hostnames from appearing in the log file.
     * Various mod_proxy improvements, such as the new ProxyIOBufferSize
       directive.
     * The new ''IgnoreCase' keyword to the IndexOptions directive.
     * mod_rewrite's 'rnd' was broken and has been fixed.
     * The '-S' option of 'apxs' was not able to handle quotes; also 'apxs'
       is now rebuilt when options are changed.
     * proxy now correctly handles Cookies and X-Cache headers.
     * Fixed a problem in TPF when we were using the wrong subpool when
       opening the error log.
     * pthread accept() mutexes on Solaris were broken (since we were
       not linking against pthread)
2002-04-02 14:13:01 +00:00

174 lines
5.9 KiB
Makefile

# $NetBSD: Makefile,v 1.92 2002/04/02 14:13:01 jlam Exp $
#
# This pkg does not compile in mod_ssl, only the `mod_ssl EAPI' (a set of
# code hooks that allow mod_ssl to be compiled separately later, if desired).
DISTNAME= apache_1.3.24
PKGNAME= apache-1.3.24
PKGREVISION= # empty
CATEGORIES= www
MASTER_SITES= http://httpd.apache.org/dist/httpd/ \
http://www.apache.de/dist/httpd/
APACHE_DIST= ${DISTNAME}${EXTRACT_SUFX}
DISTFILES= ${APACHE_DIST}
NETBSD_LOGO= sitedrivenby.gif
SITES_${NETBSD_LOGO}= http://www.netbsd.org/images/logos/
DISTFILES+= ${NETBSD_LOGO}
MODSSL_DISTNAME= mod_ssl-2.8.8-1.3.24
MODSSL_DIST= ${MODSSL_DISTNAME}${EXTRACT_SUFX}
MODSSL_SRC= ${WRKDIR}/${MODSSL_DISTNAME}
SITES_${MODSSL_DIST}= http://www.modssl.org/source/ \
ftp://ftp.uni-trier.de/pub/unix/security/mod_ssl/source/
DISTFILES+= ${MODSSL_DIST}
MAINTAINER= jlam@netbsd.org
HOMEPAGE= http://httpd.apache.org/
COMMENT= HTTP (Web) server
CONFLICTS= apache-*modssl-[0-9]* apache6-[0-9]*
EXTRACT_ONLY= ${DISTFILES:N*.gif}
USE_BUILDLINK_ONLY= YES
HAS_CONFIGURE= YES
CONFIGURE_ARGS+= --with-layout="${WRKDIR}/config.layout:pkgsrc"
CONFIGURE_ARGS+= --enable-module=most \
--enable-module=auth_db \
--disable-module=auth_dbm
CONFIGURE_ARGS+= --enable-rule=EAPI \
--disable-module=ssl
CONFIGURE_ARGS+= --with-perl=${PERL5}
CONFIGURE_ARGS+= --with-port=80
CONFIGURE_ENV+= OPTIM="${APACHE_CUSTOM_CFLAGS}"
CONFIGURE_ENV+= EAPI_MM="${BUILDLINK_DIR}"
.include "../../mk/bsd.prefs.mk"
PKG_SYSCONFSUBDIR?= httpd
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
APACHE_SUEXEC_USER?= www
APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs
APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
APACHE_SUEXEC_CONFIGURE_ARGS+= \
--suexec-caller=${APACHE_SUEXEC_USER} \
--suexec-safepath='${APACHE_SUEXEC_PATH}' \
--suexec-docroot=${APACHE_SUEXEC_DOCROOT}
CONFIGURE_ARGS+= --enable-suexec \
${APACHE_SUEXEC_CONFIGURE_ARGS:M--suexec-*}
PLIST_SRC= ${PKGDIR}/PLIST.suexec
PKG_USERS= ${APACHE_SUEXEC_USER}:nogroup::Apache\\ suEXEC\\ user
BUILD_DEFS+= APACHE_SUEXEC_CONFIGURE_ARGS
.endif
# Note that there is NO static compile module hook here. This is intentional.
# Under Apache 1.3, modules can be compiled to link dynamically to the server
# using the "apxs" program. See apxs(8).
.if !defined(NOPIC)
CONFIGURE_ARGS+= --enable-module=so # requires dlopen()
CONFIGURE_ARGS+= --enable-shared=proxy
CONFIGURE_ARGS+= --enable-shared=define # from mod_ssl pkg.addon
PLIST_SRC+= ${PKGDIR}/PLIST.shared
.else
CONFIGURE_ARGS+= --disable-module=proxy
CONFIGURE_ARGS+= --disable-shared=define
.endif
PLIST_SRC+= ${PKGDIR}/PLIST
APACHE_CUSTOM_CFLAGS?= # empty
.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
APACHE_CUSTOM_CFLAGS+= -DBUFFERED_LOGS
APACHE_CUSTOM_CFLAGS+= -O6 -fomit-frame-pointer -fexpensive-optimizations
.endif
# On NetBSD ELF platforms, we need to link libgcc.a whole-archive so that
# certain symbols from the C++ implementation (__get_eh_context, etc.)
# referenced by DSOs written in C++ will resolve correctly.
#
.if (${OPSYS} == "NetBSD") && (${OBJECT_FMT} == "ELF")
LINK_LIBGCC_LDFLAGS= -Wl,--whole-archive -lgcc -Wl,--no-whole-archive
MAKE_ENV+= LINK_LIBGCC_LDFLAGS="${LINK_LIBGCC_LDFLAGS}"
.endif
.if (${OPSYS} == "SunOS")
LDFLAGS+= -Wl,-R/usr/ucblib -L/usr/ucblib
CONFIGURE_ENV+= INCLUDES="-I${BUILDLINK_DIR}/include/db2"
CONFIGURE_ENV+= LIBS="-ldbm -ldb2"
BUILDLINK_DEPENDS.db= db>=2.7.7
.include "../../databases/db/buildlink.mk"
.endif
BUILD_DEFS+= APACHE_CUSTOM_CFLAGS
BUILD_DEFS+= APACHE_PERF_TUNING
BUILD_DEFS+= APACHE_SUEXEC
EGDIR= ${PREFIX}/share/examples/httpd
CONF_FILES= ${EGDIR}/httpd.conf.default ${PKG_SYSCONFDIR}/httpd.conf
SUPPORT_FILES= ${EGDIR}/magic.default ${PKG_SYSCONFDIR}/magic
SUPPORT_FILES+= ${EGDIR}/mime.types.default ${PKG_SYSCONFDIR}/mime.types
RCD_SCRIPTS= apache
MAKE_DIRS= ${PREFIX}/share/httpd
MAKE_DIRS+= ${PREFIX}/share/httpd/htdocs
OWN_DIRS= /var/log/httpd
OWN_DIRS+= /var/spool/httpd
OWN_DIRS_PERMS+= /var/spool/httpd/proxy nobody nobody 0755
post-extract:
${CP} ${FILESDIR}/ap_include_extern.h ${WRKSRC}/src/include
${CP} ${MODSSL_SRC}/pkg.addon/*.c ${WRKSRC}/src/modules/extra
${CP} ${MODSSL_SRC}/pkg.addon/*.html ${WRKSRC}/htdocs/manual/mod
${CP} ${MODSSL_SRC}/pkg.eapi/*.c ${WRKSRC}/src/ap
${CP} ${MODSSL_SRC}/pkg.eapi/*.h ${WRKSRC}/src/include
pre-patch:
cd ${WRKSRC} && ${CAT} \
${MODSSL_SRC}/pkg.addon/addon.patch \
${MODSSL_SRC}/pkg.eapi/eapi.patch \
${MODSSL_SRC}/pkg.sslcfg/sslcfg.patch \
${MODSSL_SRC}/pkg.sslmod/sslmod.patch \
${MODSSL_SRC}/pkg.sslsup/sslsup.patch \
| ${PATCH} ${PATCH_ARGS}
cd ${WRKSRC} && ${TAIL} +160 \
${MODSSL_SRC}/pkg.ssldoc/ssldoc.patch \
| ${PATCH} ${PATCH_ARGS}
${FIND} ${WRKSRC} -name '*.orig' -print | ${XARGS} ${RM} -f
post-patch:
cd ${WRKSRC}/src/support; \
${SED} -e "s|@INSTALL@|"`${TYPE} ${INSTALL} | ${AWK} '{ print $$NF }'`" -c -o ${LIBOWN} -g ${LIBGRP}|" \
apxs.pl > apxs.pl.sed; \
${MV} apxs.pl.sed apxs.pl
pre-configure:
@${SED} ${FILES_SUBST_SED} \
${FILESDIR}/config.layout > ${WRKDIR}/config.layout
pre-install:
${FIND} ${WRKSRC}/htdocs -name '*.orig' -print | ${XARGS} ${RM} -f
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/apache.sh > ${WRKDIR}/apache.sh
post-install:
.if !defined(NOPIC)
cd ${PREFIX}/lib/httpd; ${MV} libproxy.so mod_proxy.so
.endif
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/httpd
for file in httpd.conf magic mime.types; do \
${INSTALL_DATA} ${PKG_SYSCONFDIR}/$${file}.default \
${PREFIX}/share/examples/httpd; \
${RM} -f ${PKG_SYSCONFDIR}/$${file}.default; \
done
${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/httpd/htdocs
${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d/apache
${CHOWN} -R ${DOCOWN}:${DOCGRP} ${PREFIX}/share/httpd
.include "../../devel/libmm/buildlink.mk"
.include "../../textproc/expat/buildlink.mk"
.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"