pkgsrc/www/apache24/Makefile
adam f43bca2b67 Changes with Apache 2.4.17
*) mod_http2: added donated HTTP/2 implementation via core module. Similar
     configuration options to mod_ssl.

  *) mod_proxy: don't recyle backend announced "Connection: close" connections
     to avoid reusing it should the close be effective after some new request
     is ready to be sent.

  *) mod_substitute: Allow to configure the patterns merge order with the new
     SubstituteInheritBefore on|off directive.

  *) mod_proxy: Fix ProxySourceAddress binding failure with AH00938.

  *) mod_ssl: Support compilation against libssl built with OPENSSL_NO_SSL3,
     and change the compiled-in default for SSL[Proxy]Protocol to "all -SSLv3",
     in accordance with RFC 7568.

  *) mod_ssl: append :!aNULL:!eNULL:!EXP to the cipher string settings,
     instead of prepending !aNULL:!eNULL:!EXP: (as was the case in 2.4.7
     and later). Enables support for configuring the SUITEB* cipher
     strings introduced in OpenSSL 1.0.2.

  *) mod_ssl: Add support for extracting the msUPN and dnsSRV forms
     of subjectAltName entries of type "otherName" into
     SSL_{CLIENT,SERVER}_SAN_OTHER_{msUPN,dnsSRV}_n environment
     variables.

  *) mod_logio: Fix logging of %^FB (time to first byte) on the first request on
     an SSL connection.

  *) mod_cache: r->err_headers_out is not merged into
     r->headers when mod_cache is enabled and the response
     is cached for the first time.

  *) mod_slotmem_shm: Fix slots/SHM files names on restart for systems that
     can't create new (clear) slots while previous children gracefully stopping
     still use the old ones (e.g. Windows, OS2). mod_proxy_balancer failed to
     restart whenever the number of configured balancers/members changed during
     restart.

  *) core/util_script: make REDIRECT_URL a full URL.

  *) MPMs: Support SO_REUSEPORT to create multiple duplicated listener
     records for scalability.

  *) mod_proxy: Fix a race condition that caused a failed worker to be retried
     before the retry period is over.

  *) mod_autoindex: Allow autoindexes when neither mod_dir nor mod_mime are
     loaded.

  *) mod_rewrite:  Allow cookies set by mod_rewrite to contain ':' by accepting
     ';' as an alternate separator.

  *) apxs: Add HTTPD_VERSION and HTTPD_MMN to the variables available with
     apxs -q.

  *) mod_rewrite: Avoid a crash when lacking correct DB access permissions
     when using RewriteMap with MapType dbd or fastdbd.

  *) mod_authz_dbd: Avoid a crash when lacking correct DB access permissions.

  *) mod_socache_memcache: Add the 'MemcacheConnTTL' directive to control how
     long to keep idle connections with the memcache server(s).
     Change default value from 600 usec (!) to 15 sec.

  *) mod_dir: Prevent the internal identifier "httpd/unix-directory" from
     appearing as a Content-Type response header when requests for a directory
     are rewritten by mod_rewrite.
2015-10-17 10:16:35 +00:00

201 lines
7 KiB
Makefile

# $NetBSD: Makefile,v 1.39 2015/10/17 10:16:35 adam Exp $
DISTNAME= httpd-2.4.17
PKGNAME= ${DISTNAME:S/httpd/apache/}
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE:=httpd/} \
http://archive.apache.org/dist/httpd/ \
http://archive.eu.apache.org/dist/httpd/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= ryoon@NetBSD.org
HOMEPAGE= http://httpd.apache.org/
COMMENT= Apache HTTP (Web) server, version 2.4
LICENSE= apache-2.0
BUILD_DEFS+= IPV6_READY
BUILD_DEFS+= VARBASE
BUILD_DEFS+= APACHE_CUSTOM_CFLAGS
USE_LIBTOOL= yes
USE_TOOLS+= pax perl pkg-config
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-layout=NetBSD
CONFIGURE_ARGS+= --enable-mods-shared=all
CONFIGURE_ARGS+= --enable-so
CONFIGURE_ARGS+= --with-apr=${BUILDLINK_PREFIX.apr}
CONFIGURE_ARGS+= --with-apr-util=${BUILDLINK_PREFIX.apr-util}
CONFIGURE_ARGS+= --with-port=80
CONFIGURE_ENV+= perlbin=${PERL5:Q}
CONFIGURE_ENV+= ac_cv_path_RSYNC=/nonexistent
CONFIGURE_ENV+= CFLAGS=${APACHE_CUSTOM_CFLAGS:M*:Q}
CFLAGS.SunOS+= -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__
.include "../../mk/bsd.prefs.mk"
BUILDLINK_API_DEPENDS.apr+= apr>=1.5.0
.include "../../devel/apr/buildlink3.mk"
BUILDLINK_API_DEPENDS.apr-util+= apr-util>=1.5.3
.include "../../devel/apr-util/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
CONFIGURE_ARGS+= --disable-xml2enc
CONFIGURE_ARGS+= --disable-proxy-html
DFLT_APACHE_MODULES+= all
APACHE_MODULES?= ${DFLT_APACHE_MODULES}
.include "options.mk"
FIND_PREFIX:= APRDIR=apr
.include "../../mk/find-prefix.mk"
# LDAP support
PLIST_VARS+= ldap
.if exists(${APRDIR}/lib/apr-util-1/apr_ldap.la)
DFLT_APACHE_MODULES+= ldap authnz_ldap
PLIST.ldap= yes
.endif
PLIST_VARS+= ssl
.if !empty(PKG_BUILD_OPTIONS.apr-util:Mssl)
PLIST.ssl= yes
.endif
APACHE_USER?= www
APACHE_GROUP?= www
PKG_GROUPS= ${APACHE_GROUP}
PKG_USERS= ${APACHE_USER}:${APACHE_GROUP}
PKG_GROUPS_VARS= APACHE_GROUP
PKG_USERS_VARS= APACHE_USER
PKG_SYSCONFVAR= apache
PKG_SYSCONFSUBDIR?= httpd
EGDIR= ${PREFIX}/share/examples/httpd
SBINDIR= ${PREFIX}/sbin
CONF_FILES+= ${EGDIR}/httpd.conf ${PKG_SYSCONFDIR}/httpd.conf
.for f in autoindex dav default info languages manual mpm \
multilang-errordoc ssl userdir vhosts
CONF_FILES+= ${EGDIR}/extra/httpd-${f}.conf \
${PKG_SYSCONFDIR}/httpd-${f}.conf
.endfor
CONF_FILES+= ${EGDIR}/magic ${PKG_SYSCONFDIR}/magic
CONF_FILES+= ${EGDIR}/mime.types ${PKG_SYSCONFDIR}/mime.types
RCD_SCRIPTS= apache
REQD_DIRS= ${PREFIX}/share/httpd
REQD_DIRS+= ${PREFIX}/share/httpd/htdocs
OWN_DIRS= ${VARBASE}/log/httpd
OWN_DIRS+= ${VARBASE}/db/httpd
OWN_DIRS_PERMS+= ${VARBASE}/db/httpd/proxy ${APACHE_USER} ${APACHE_GROUP} 0755
FIX_PERMS_SBIN= apachectl envvars-std
FIX_PERMS_BIN= apxs dbmmanage mkcert
FIX_MAN_PERMS= man1/htdbm.1 man1/htpasswd.1 man1/htdigest.1
FIX_MAN_PERMS+= man1/dbmmanage.1 man8/httpd.8 man8/suexec.8
FIX_MAN_PERMS+= man8/rotatelogs.8 man1/logresolve.1 man1/apxs.1
FIX_MAN_PERMS+= man8/apachectl.8 man1/ab.1 man1/httxt2dbm.1
# Fix paths in the apache manpages.
SUBST_CLASSES+= man
SUBST_STAGE.man= post-patch
SUBST_MESSAGE.man= Fixing paths in man pages.
SUBST_FILES.man= docs/man/*.1 docs/man/*.8
SUBST_SED.man= -e 's,/usr/local/etc/apache,${PKG_SYSCONFDIR},'
SUBST_SED.man+= -e 's,/path/to/apache/etc,${PKG_SYSCONFDIR},'
SUBST_SED.man+= -e 's,/usr/local/apache2,${PREFIX}/share/httpd/htdocs,'
SUBST_SED.man+= -e 's,/usr/web,${PREFIX}/share/httpd/htdocs,'
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
SUBST_MESSAGE.paths= Fixing paths.
SUBST_FILES.paths= config.layout Makefile.in support/apxs.in
SUBST_SED.paths= -e "s|@PREFIX@|${PREFIX}|g"
SUBST_SED.paths+= -e "s|@VARBASE@|${VARBASE}|g"
SUBST_SED.paths+= -e "s|@SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
SUBST_SED.paths+= -e "s|@PAX@|${PAX}|g"
SUBST_SED.paths+= -e "s|@LOCALBASE@|${PREFIX}|g"
SUBST_CLASSES+= apr-lt
SUBST_STAGE.apr-lt= post-configure
SUBST_MESSAGE.apr-lt= Fixing libtool references.
SUBST_FILES.apr-lt= build/config_vars.mk
SUBST_SED.apr-lt= -e 's|^\(LIBTOOL =\) [^ ]*|\1 $$(SHELL) $$(top_builddir)/build/libtool|g'
SUBST_CLASSES+= confs
SUBST_STAGE.confs= post-configure
SUBST_MESSAGE.confs= Fixing configuration files.
SUBST_FILES.confs= docs/conf/httpd.conf
SUBST_FILES.confs+= docs/conf/extra/httpd-ssl.conf
SUBST_SED.confs= -e "s|${EGDIR}|${PKG_SYSCONFDIR}|g"
SUBST_SED.confs+= -e "s|${PREFIX}/htdocs|${PREFIX}/share/httpd/htdocs|g"
SUBST_SED.confs+= -e "s|${PREFIX}/conf|${PKG_SYSCONFDIR}|g"
SUBST_SED.confs+= -e "s|logs/|${VARBASE}/log/httpd/|g"
SUBST_SED.confs+= -e 's|/var/log/httpd/foo\.log|logs/foo.log/|g'
SUBST_SED.confs+= -e 's|^\(User[ ]\).*|\1${APACHE_USER}|g'
SUBST_SED.confs+= -e 's|^\(Group[ ]\).*|\1${APACHE_GROUP}|g'
SUBST_SED.confs+= -e 's|^Listen \(.*\)|Listen 0.0.0.0:\1|g'
# abs_srcdir in config_vars.mk is used during install so needs to reference
# the work dir path, and by other packages such as ap2-fastcgi after install,
# so we fix after install to reference the installed path
SUBST_CLASSES+= abs_srcdir
SUBST_STAGE.abs_srcdir= post-install
SUBST_MESSAGE.abs_srcdir= Fixing abs_srcdir
SUBST_FILES.abs_srcdir= ${DESTDIR}${PREFIX}/share/httpd/build/config_vars.mk
SUBST_SED.abs_srcdir= -e 's|^\(abs_srcdir =\) .*|\1 ${PREFIX}/share/httpd|'
REPLACE_PERL= docs/cgi-examples/printenv
. include "../../devel/zlib/buildlink3.mk"
CONFIGURE_ARGS+= --with-ssl=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ARGS+= --with-z=${BUILDLINK_PREFIX.zlib}
post-extract:
${TOUCH} ${WRKSRC}/build/libtool
${ECHO} "" >> ${WRKSRC}/docs/conf/extra/httpd-languages.conf.in
post-build:
${SED} "s#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g" \
< ${FILESDIR}/mkcert.sh > ${WRKDIR}/mkcert
INSTALL_TARGET= install-conf install
INSTALL_MAKE_FLAGS+= sysconfdir="${EGDIR}"
post-install:
${LN} -sf ${APRDIR}/libexec/apr/libtool ${DESTDIR}${PREFIX}/share/httpd/build
${LN} -sf ${SBINDIR}/envvars-std ${DESTDIR}${SBINDIR}/envvars
${INSTALL_SCRIPT} ${WRKDIR}/mkcert ${DESTDIR}${PREFIX}/bin
.for file in ${FIX_PERMS_SBIN}
${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/sbin/${file}
${CHMOD} ${BINMODE} ${DESTDIR}${PREFIX}/sbin/${file}
.endfor
.for file in ${FIX_PERMS_BIN}
${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/bin/${file}
${CHMOD} ${BINMODE} ${DESTDIR}${PREFIX}/bin/${file}
.endfor
${CHOWN} -RP ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/share/httpd
${CHOWN} -RP ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/include/httpd
${CHOWN} -RP ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/lib/httpd
${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/test-cgi
${CHOWN} ${BINOWN}:${BINGRP} ${DESTDIR}${PREFIX}/libexec/cgi-bin/printenv
.for file in ${FIX_MAN_PERMS}
${CHOWN} ${MANOWN}:${MANGRP} ${DESTDIR}${PREFIX}/${PKGMANDIR}/${file}
.endfor
${CHMOD} -x ${DESTDIR}${PREFIX}/sbin/envvars-std
.if exists(${DESTDIR}${PREFIX}/sbin/suexec)
${CHMOD} -w ${DESTDIR}${PREFIX}/sbin/suexec
.endif
.include "../../mk/pthread.buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"