pkgsrc/www/apache/Makefile
jlam 1008fafead Update apache to 1.3.22. Relevant changes from version 1.3.20 include
using the pkgsrc expat library instead of the builtin one (this is to
avoid conflicts between expat libraries when an expat XML parser is loaded
by either mod_perl or mod_php), and:

  Security vulnerabilities

     * A vulnerability was found in the split-logfile support program. A
       request with a specially crafted Host: header could allow any file
       with a .log extension on the system to be written to.
     * A vulnerability was found when Multiviews are used to negotiate
       the directory index. In some configurations, requesting a URI with
       a QUERY_STRING of M=D could return a directory listing rather than
       the expected index page.

  General bug fixes and improvements

     * Bug fixes
     * The supplied icons are now also distributed in PNG format
     * New directives have been added to the mod_usertrack module, The
       first, CookieDomain, can be used to customise the Domain
       attribute.
     * A new directive, AcceptMutex, allows run-time configuration of the
       mutex type used for accept serialization.
     * mod_auth has been enhanced to allow access to a document to be
       controlled based on the owner of the file being served.
     * A new directive, AcceptFilter, has been added to control BSD
       accept filters at run-time. The functionality can postpone the
       requirement for a child process to handle a new connection until
       an HTTP request has arrived, therefore increasing the number of
       connections that a given number of child processes can handle
2001-10-17 19:17:00 +00:00

164 lines
5.5 KiB
Makefile

# $NetBSD: Makefile,v 1.78 2001/10/17 19:17:00 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.22
PKGNAME= apache-1.3.22
CATEGORIES= www
MASTER_SITES= http://httpd.apache.org/dist/httpd/ \
http://www.apache.de/dist/httpd/ \
http://www.netbsd.org/images/logos/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
sitedrivenby.gif
MASTER_SITES+= http://www.modssl.org/source/ \
ftp://ftp.uni-trier.de/pub/unix/security/mod_ssl/source/
DISTFILES+= ${MODSSL_DISTNAME}${EXTRACT_SUFX}
MODSSL_DISTNAME= mod_ssl-2.8.5-1.3.22
MODSSL_SRC= ${WRKDIR}/${MODSSL_DISTNAME}
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}"
.include "../../mk/bsd.prefs.mk"
APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd
BUILD_DEFS+= APACHE_SYSCONFDIR
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
APACHE_USER?= www
APACHE_SUEXEC_DOCROOT?= ${LOCALBASE}/share/httpd/htdocs
SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
CONFIGURE_ARGS+= --enable-suexec \
--suexec-caller=${APACHE_USER} \
--suexec-safepath='${SUEXEC_PATH}' \
--suexec-docroot=${APACHE_SUEXEC_DOCROOT}
PLIST_SRC= ${PKGDIR}/PLIST.suexec
BUILD_DEFS+= APACHE_USER APACHE_SUEXEC_DOCROOT
.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, 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")
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
DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
INSTALL_FILE= ${WRKDIR}/INSTALL
# Given foo=${bar}, replace @foo@ with ${bar}.
#
FILES_SUBST= APACHE_SYSCONFDIR=${APACHE_SYSCONFDIR}
FILES_SUBST+= CAT=${CAT:Q}
FILES_SUBST+= CHMOD=${CHMOD:Q}
FILES_SUBST+= CHOWN=${CHOWN:Q}
FILES_SUBST+= CMP=${CMP:Q}
FILES_SUBST+= CP=${CP:Q}
FILES_SUBST+= MKDIR=${MKDIR:Q}
FILES_SUBST+= PREFIX=${PREFIX}
FILES_SUBST+= RM=${RM:Q}
FILES_SUBST+= RMDIR=${RMDIR:Q}
FILES_SUBST+= TRUE=${TRUE:Q}
FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/-e s!@/}
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
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
${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
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} ${APACHE_SYSCONFDIR}/$${file}.default \
${PREFIX}/share/examples/httpd; \
${RM} -f ${APACHE_SYSCONFDIR}/$${file}.default; \
done
${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/httpd/htdocs
${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d/apache
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../textproc/expat/buildlink.mk"
.include "../../mk/bsd.pkg.mk"