2002-10-06 14:49:59 +02:00
|
|
|
# $NetBSD: Makefile,v 1.59 2002/10/06 12:49:59 tron Exp $
|
1999-07-23 19:53:29 +02:00
|
|
|
#
|
1999-07-23 20:19:29 +02:00
|
|
|
# This package does not compile in mod_ssl support hooks, as it conflicts
|
2001-04-29 23:21:13 +02:00
|
|
|
# with IPv6-enable patch.
|
|
|
|
#
|
|
|
|
# IPv6-enable patch conflicts with third-party modules anyway, due to
|
1999-07-23 20:19:29 +02:00
|
|
|
# sanity fixes in apache module API (for example, avoid u_long for IPv4 addrs)
|
1999-07-23 19:53:29 +02:00
|
|
|
|
2002-07-30 20:40:14 +02:00
|
|
|
DISTNAME= apache_${APACHE_VERSION}
|
|
|
|
PKGNAME= apache6-${APACHE_VERSION}
|
2002-10-06 14:49:59 +02:00
|
|
|
APACHE_VERSION= 1.3.27
|
1999-07-23 19:53:29 +02:00
|
|
|
CATEGORIES= www
|
2001-04-14 21:50:04 +02:00
|
|
|
MASTER_SITES= http://httpd.apache.org/dist/httpd/ \
|
2001-04-29 23:21:13 +02:00
|
|
|
http://www.apache.de/dist/httpd/ \
|
1999-07-23 19:53:29 +02:00
|
|
|
http://www.netbsd.org/images/logos/
|
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
|
|
|
sitedrivenby.gif
|
2001-04-29 23:21:13 +02:00
|
|
|
|
2002-10-06 14:49:59 +02:00
|
|
|
PATCH_SITES+= ${MASTER_SITE_LOCAL}
|
2002-06-20 09:24:17 +02:00
|
|
|
PATCHFILES+= ${IPV6_PATCH}
|
|
|
|
IPV6_PATCH= apache-1.3.26-ipv6.diff.gz
|
|
|
|
PATCH_DIST_STRIP= -p1
|
1999-07-23 20:19:29 +02:00
|
|
|
|
2002-10-06 14:49:59 +02:00
|
|
|
MAINTAINER= packages@netbsd.org
|
2001-02-06 11:58:18 +01:00
|
|
|
HOMEPAGE= http://httpd.apache.org/
|
2002-07-30 20:40:14 +02:00
|
|
|
COMMENT= Apache HTTP (Web) server with IPv6 support
|
1999-07-23 19:53:29 +02:00
|
|
|
|
2002-07-30 20:40:14 +02:00
|
|
|
CONFLICTS= apache-[0-9]* apache-*ssl-[0-9]* apache6-[0-9]*
|
1999-07-23 19:53:29 +02:00
|
|
|
|
2001-02-06 13:50:19 +01:00
|
|
|
EXTRACT_ONLY= ${DISTFILES:N*.gif:N*.diff.gz}
|
2002-08-25 23:50:52 +02:00
|
|
|
USE_BUILDLINK2= YES
|
2001-10-17 21:27:27 +02:00
|
|
|
HAS_CONFIGURE= YES
|
2001-04-29 23:21:13 +02:00
|
|
|
CONFIGURE_ARGS+= --with-layout="${WRKDIR}/config.layout:pkgsrc"
|
2002-06-20 09:24:17 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-module=most \
|
2002-06-20 11:45:27 +02:00
|
|
|
--enable-module=auth_db \
|
|
|
|
--enable-module=so \
|
2002-06-20 09:24:17 +02:00
|
|
|
--disable-module=auth_dbm \
|
|
|
|
--enable-rule=INET6
|
2002-06-20 11:45:27 +02:00
|
|
|
# proxy module is broken with the IPv6 patch
|
2002-06-20 09:24:17 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-module=proxy
|
2002-07-30 20:40:14 +02:00
|
|
|
CONFIGURE_ARGS+= --without-confadjust
|
2001-02-06 11:58:18 +01:00
|
|
|
CONFIGURE_ARGS+= --with-perl=${PERL5}
|
|
|
|
CONFIGURE_ARGS+= --with-port=80
|
2001-05-18 08:01:35 +02:00
|
|
|
CONFIGURE_ENV+= OPTIM="${APACHE_CUSTOM_CFLAGS}"
|
1999-07-23 19:53:29 +02:00
|
|
|
|
2000-02-21 08:14:44 +01:00
|
|
|
BUILD_DEFS+= USE_INET6
|
|
|
|
|
1999-07-23 19:53:29 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
1999-09-04 00:00:52 +02:00
|
|
|
.if !defined(USE_INET6) || ${USE_INET6} != YES
|
2000-01-26 17:04:18 +01:00
|
|
|
IGNORE= "IPv6 only build"
|
1999-07-23 20:19:29 +02:00
|
|
|
.endif
|
|
|
|
|
2002-07-30 20:40:14 +02:00
|
|
|
.if empty(STRIPFLAG)
|
|
|
|
CONFIGURE_ARGS+= --without-execstrip
|
|
|
|
.endif
|
|
|
|
|
2001-11-25 19:59:45 +01:00
|
|
|
PKG_SYSCONFSUBDIR?= httpd
|
2001-04-14 21:42:53 +02:00
|
|
|
|
2002-07-30 20:40:14 +02:00
|
|
|
APACHE_USER?= www
|
|
|
|
APACHE_GROUP?= www
|
|
|
|
BUILD_DEFS+= APACHE_USER
|
|
|
|
BUILD_DEFS+= APACHE_GROUP
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --server-uid=${APACHE_USER}
|
|
|
|
CONFIGURE_ARGS+= --server-gid=${APACHE_GROUP}
|
|
|
|
|
1999-07-23 19:53:29 +02:00
|
|
|
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
|
2001-12-26 22:20:26 +01:00
|
|
|
APACHE_SUEXEC_DOCROOT?= ${PREFIX}/share/httpd/htdocs
|
|
|
|
APACHE_SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
|
|
|
|
APACHE_SUEXEC_CONFIGURE_ARGS+= \
|
2002-07-30 20:40:14 +02:00
|
|
|
--suexec-caller=${APACHE_USER} \
|
2001-12-26 22:20:26 +01:00
|
|
|
--suexec-safepath='${APACHE_SUEXEC_PATH}' \
|
2001-05-08 19:28:08 +02:00
|
|
|
--suexec-docroot=${APACHE_SUEXEC_DOCROOT}
|
2001-12-26 22:20:26 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-suexec \
|
|
|
|
${APACHE_SUEXEC_CONFIGURE_ARGS:M--suexec-*}
|
2001-02-06 11:58:18 +01:00
|
|
|
PLIST_SRC= ${PKGDIR}/PLIST.suexec
|
2001-12-26 22:20:26 +01:00
|
|
|
BUILD_DEFS+= APACHE_SUEXEC_CONFIGURE_ARGS
|
1999-07-23 19:53:29 +02:00
|
|
|
.endif
|
|
|
|
|
2001-10-22 20:10:28 +02:00
|
|
|
# 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).
|
|
|
|
|
2001-02-06 11:58:18 +01:00
|
|
|
PLIST_SRC+= ${PKGDIR}/PLIST
|
|
|
|
|
2002-07-30 20:40:14 +02:00
|
|
|
.if defined(NOPIC)
|
|
|
|
PLIST_SUBST+= SHLIBS="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUBST+= SHLIBS=""
|
|
|
|
.endif
|
|
|
|
|
2001-05-18 08:01:35 +02:00
|
|
|
APACHE_CUSTOM_CFLAGS?= # empty
|
|
|
|
|
1999-07-23 19:53:29 +02:00
|
|
|
.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
|
2001-05-18 08:01:35 +02:00
|
|
|
APACHE_CUSTOM_CFLAGS+= -DBUFFERED_LOGS
|
|
|
|
APACHE_CUSTOM_CFLAGS+= -O6 -fomit-frame-pointer -fexpensive-optimizations
|
1999-07-23 19:53:29 +02:00
|
|
|
.endif
|
|
|
|
|
2002-09-26 03:48:29 +02:00
|
|
|
# Explicitly turn on large file support
|
|
|
|
APACHE_CUSTOM_CFLAGS+= -D_LARGEFILE_SOURCE
|
|
|
|
APACHE_CUSTOM_CFLAGS+= -D_FILE_OFFSET_BITS=64
|
|
|
|
|
2001-10-20 19:46:50 +02:00
|
|
|
# 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.
|
2001-10-16 06:11:06 +02:00
|
|
|
#
|
2001-10-20 19:46:50 +02:00
|
|
|
.if (${OPSYS} == "NetBSD") && (${OBJECT_FMT} == "ELF")
|
2001-10-16 06:47:06 +02:00
|
|
|
LINK_LIBGCC_LDFLAGS= -Wl,--whole-archive -lgcc -Wl,--no-whole-archive
|
2001-10-16 06:11:06 +02:00
|
|
|
MAKE_ENV+= LINK_LIBGCC_LDFLAGS="${LINK_LIBGCC_LDFLAGS}"
|
|
|
|
.endif
|
|
|
|
|
2000-02-22 18:43:23 +01:00
|
|
|
.if (${OPSYS} == "SunOS")
|
2001-10-17 21:27:27 +02:00
|
|
|
LDFLAGS+= -Wl,-R/usr/ucblib -L/usr/ucblib
|
2002-08-25 23:50:52 +02:00
|
|
|
CONFIGURE_ENV+= INCLUDES="-I${BUILDLINK_PREFIX.db}/include/db2"
|
2000-02-22 18:43:23 +01:00
|
|
|
CONFIGURE_ENV+= LIBS="-ldbm -ldb2"
|
2001-10-17 21:27:27 +02:00
|
|
|
BUILDLINK_DEPENDS.db= db>=2.7.7
|
2002-08-25 23:50:52 +02:00
|
|
|
.include "../../databases/db/buildlink2.mk"
|
2000-02-22 18:43:23 +01:00
|
|
|
.endif
|
|
|
|
|
2001-05-18 08:01:35 +02:00
|
|
|
BUILD_DEFS+= APACHE_CUSTOM_CFLAGS
|
|
|
|
BUILD_DEFS+= APACHE_PERF_TUNING
|
|
|
|
BUILD_DEFS+= APACHE_SUEXEC
|
1999-07-23 19:53:29 +02:00
|
|
|
|
2002-07-30 20:40:14 +02:00
|
|
|
PKG_GROUPS= ${APACHE_GROUP}
|
|
|
|
PKG_USERS= ${APACHE_USER}:${APACHE_GROUP}::Apache\\ user
|
|
|
|
|
2001-11-19 17:23:08 +01:00
|
|
|
EGDIR= ${PREFIX}/share/examples/httpd
|
1999-08-18 10:28:09 +02:00
|
|
|
|
2001-11-25 19:59:45 +01:00
|
|
|
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
|
2001-11-21 16:44:22 +01:00
|
|
|
RCD_SCRIPTS= apache
|
2001-11-19 17:23:08 +01:00
|
|
|
|
2002-07-30 20:40:14 +02:00
|
|
|
OWN_DIRS+= ${PREFIX}/lib/httpd
|
|
|
|
OWN_DIRS+= /var/httpd
|
|
|
|
OWN_DIRS+= /var/log/httpd
|
2001-07-13 09:09:17 +02:00
|
|
|
|
2001-02-06 11:58:18 +01:00
|
|
|
pre-patch:
|
2001-07-13 09:09:17 +02:00
|
|
|
${FIND} ${WRKSRC} -name '*.orig' -print | ${XARGS} ${RM} -f
|
1999-07-23 19:53:29 +02:00
|
|
|
|
|
|
|
post-patch:
|
2001-10-22 20:10:28 +02:00
|
|
|
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
|
2001-07-16 17:41:51 +02:00
|
|
|
cp ${WRKSRC}/conf/httpd.conf-dist ${WRKSRC}/conf/httpd.conf-dist-
|
2001-10-22 20:10:28 +02:00
|
|
|
${SED} -e "s|#Listen ::|Listen ::|" \
|
|
|
|
-e "s|#Listen 0.0.0.0|Listen 0.0.0.0|" \
|
|
|
|
${WRKSRC}/conf/httpd.conf-dist- \
|
|
|
|
> ${WRKSRC}/conf/httpd.conf-dist
|
1999-07-23 19:53:29 +02:00
|
|
|
|
2001-04-29 23:21:13 +02:00
|
|
|
pre-configure:
|
2001-12-26 22:20:26 +01:00
|
|
|
@${SED} ${FILES_SUBST_SED} \
|
2001-04-29 23:21:13 +02:00
|
|
|
${FILESDIR}/config.layout > ${WRKDIR}/config.layout
|
2001-02-06 11:58:18 +01:00
|
|
|
|
|
|
|
pre-install:
|
2001-07-13 09:09:17 +02:00
|
|
|
${FIND} ${WRKSRC}/htdocs -name '*.orig' -print | ${XARGS} ${RM} -f
|
1999-07-23 19:53:29 +02:00
|
|
|
|
|
|
|
post-install:
|
2001-04-14 21:42:53 +02:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/httpd
|
2001-07-13 09:09:17 +02:00
|
|
|
for file in httpd.conf magic mime.types; do \
|
2001-11-25 19:59:45 +01:00
|
|
|
${INSTALL_DATA} ${PKG_SYSCONFDIR}/$${file}.default \
|
2001-04-14 21:42:53 +02:00
|
|
|
${PREFIX}/share/examples/httpd; \
|
2001-11-25 19:59:45 +01:00
|
|
|
${RM} -f ${PKG_SYSCONFDIR}/$${file}.default; \
|
2001-04-14 21:42:53 +02:00
|
|
|
done
|
2001-02-06 11:58:18 +01:00
|
|
|
${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/httpd/htdocs
|
1999-07-23 19:53:29 +02:00
|
|
|
|
2002-08-25 23:50:52 +02:00
|
|
|
.include "../../textproc/expat/buildlink2.mk"
|
|
|
|
|
2001-11-19 17:23:08 +01:00
|
|
|
.include "../../mk/bsd.pkg.install.mk"
|
1999-07-23 19:53:29 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|