2001-10-09 15:20:17 +02:00
|
|
|
# $NetBSD: Makefile,v 1.36 2001/10/09 13:20:17 martti 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
|
|
|
#
|
|
|
|
|
2001-10-08 15:23:37 +02:00
|
|
|
DISTNAME= apache_1.3.20
|
2001-10-09 15:20:17 +02:00
|
|
|
PKGNAME= apache6-1.3.20nb1
|
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
|
|
|
|
2001-10-08 15:23:37 +02:00
|
|
|
MASTER_SITES+= ftp://ftp.piuha.net/pub/misc/
|
2001-04-29 23:21:13 +02:00
|
|
|
DISTFILES+= ${IPV6_PATCH}
|
2001-10-09 15:20:17 +02:00
|
|
|
IPV6_PATCH= apache-1.3.20-v6-20011009.diff.gz
|
2001-04-29 23:21:13 +02:00
|
|
|
PATCH_DIST_STRIP= -p1 # IPv6 patch needs -p1
|
1999-07-23 20:19:29 +02:00
|
|
|
|
2001-04-29 23:21:13 +02:00
|
|
|
MAINTAINER= itojun@netbsd.org
|
2001-02-06 11:58:18 +01:00
|
|
|
HOMEPAGE= http://httpd.apache.org/
|
2001-04-29 23:21:13 +02:00
|
|
|
COMMENT= HTTP (Web) server with IPv6 support
|
1999-07-23 19:53:29 +02:00
|
|
|
|
2001-09-28 01:17:41 +02:00
|
|
|
CONFLICTS= apache-[0-9]* apache-*modssl-[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}
|
2001-02-06 11:58:18 +01:00
|
|
|
HAS_CONFIGURE= # defined
|
2000-03-27 10:54:53 +02:00
|
|
|
CONFIGURE_SCRIPT= ${WRKSRC}/configure.v6
|
2001-04-29 23:21:13 +02:00
|
|
|
CONFIGURE_ARGS+= --with-layout="${WRKDIR}/config.layout:pkgsrc"
|
2001-02-06 11:58:18 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-module=most \
|
|
|
|
--enable-module=auth_db \
|
|
|
|
--disable-module=auth_dbm
|
|
|
|
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
|
|
|
|
|
2001-04-14 21:42:53 +02:00
|
|
|
APACHE_SYSCONFDIR?= ${LOCALBASE}/etc/httpd
|
|
|
|
BUILD_DEFS+= APACHE_SYSCONFDIR
|
|
|
|
|
1999-07-23 19:53:29 +02:00
|
|
|
.if defined(APACHE_SUEXEC) && ${APACHE_SUEXEC} == YES
|
2001-02-06 11:58:18 +01:00
|
|
|
APACHE_USER?= www
|
2001-05-08 19:28:08 +02:00
|
|
|
APACHE_SUEXEC_DOCROOT?= ${LOCALBASE}/share/httpd/htdocs
|
2001-02-06 11:58:18 +01:00
|
|
|
SUEXEC_PATH= /bin:/usr/bin:${PREFIX}/bin:/usr/local/bin
|
|
|
|
CONFIGURE_ARGS+= --enable-suexec \
|
|
|
|
--suexec-caller=${APACHE_USER} \
|
2001-05-08 19:28:08 +02:00
|
|
|
--suexec-safepath='${SUEXEC_PATH}' \
|
|
|
|
--suexec-docroot=${APACHE_SUEXEC_DOCROOT}
|
2001-02-06 11:58:18 +01:00
|
|
|
PLIST_SRC= ${PKGDIR}/PLIST.suexec
|
2001-05-08 19:28:08 +02:00
|
|
|
BUILD_DEFS+= APACHE_USER APACHE_SUEXEC_DOCROOT
|
1999-07-23 19:53:29 +02:00
|
|
|
.endif
|
|
|
|
|
2001-02-06 11:58:18 +01:00
|
|
|
.if !defined(NOPIC)
|
|
|
|
CONFIGURE_ARGS+= --enable-module=so # requires dlopen()
|
|
|
|
CONFIGURE_ARGS+= --enable-shared=proxy
|
|
|
|
PLIST_SRC+= ${PKGDIR}/PLIST.shared
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-module=proxy
|
|
|
|
.endif
|
|
|
|
|
|
|
|
PLIST_SRC+= ${PKGDIR}/PLIST
|
|
|
|
|
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
|
|
|
|
|
2000-02-22 18:43:23 +01:00
|
|
|
.if (${OPSYS} == "SunOS")
|
|
|
|
DEPENDS+= db-2.7.7:../../databases/db
|
2001-02-06 11:58:18 +01:00
|
|
|
LDFLAGS+= -Wl,-R/usr/ucblib -L/usr/ucblib \
|
|
|
|
-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib
|
2000-02-22 18:43:23 +01:00
|
|
|
CONFIGURE_ENV+= INCLUDES="-I${LOCALBASE}/include/db2"
|
|
|
|
CONFIGURE_ENV+= LIBS="-ldbm -ldb2"
|
|
|
|
.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
|
|
|
|
2001-02-06 11:58:18 +01:00
|
|
|
DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
|
|
|
|
INSTALL_FILE= ${WRKDIR}/INSTALL
|
1999-08-18 10:28:09 +02:00
|
|
|
|
2001-07-13 09:09:17 +02:00
|
|
|
# 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!@/}
|
|
|
|
|
1999-07-23 19:53:29 +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
|
|
|
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-04-29 23:21:13 +02:00
|
|
|
for file in ${IPV6_PATCH}; do \
|
|
|
|
${GZCAT} ${_DISTDIR}/$${file} | \
|
|
|
|
${PATCH} ${PATCH_DIST_ARGS} \
|
|
|
|
|| ( ${ECHO} "Patch $${file} failed" ; exit 1 ) ; \
|
2001-02-06 13:50:19 +01:00
|
|
|
done
|
2001-02-06 11:58:18 +01:00
|
|
|
${CHMOD} +x ${CONFIGURE_SCRIPT}
|
2001-07-16 17:41:51 +02:00
|
|
|
cp ${WRKSRC}/conf/httpd.conf-dist ${WRKSRC}/conf/httpd.conf-dist-
|
|
|
|
${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-07-13 09:09:17 +02: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
|
|
|
|
${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}
|
1999-07-23 19:53:29 +02:00
|
|
|
|
|
|
|
post-install:
|
2001-02-06 11:58:18 +01:00
|
|
|
.if !defined(NOPIC)
|
|
|
|
cd ${PREFIX}/lib/httpd; ${MV} libproxy.so mod_proxy.so
|
|
|
|
.endif
|
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 \
|
|
|
|
${INSTALL_DATA} ${APACHE_SYSCONFDIR}/$${file}.default \
|
2001-04-14 21:42:53 +02:00
|
|
|
${PREFIX}/share/examples/httpd; \
|
2001-07-13 09:09:17 +02:00
|
|
|
${RM} -f ${APACHE_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
|
2000-09-20 07:14:10 +02:00
|
|
|
${INSTALL_SCRIPT} ${WRKDIR}/apache.sh ${PREFIX}/etc/rc.d/apache
|
2001-02-06 11:58:18 +01:00
|
|
|
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
|
1999-07-23 19:53:29 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|