2001-04-13 06:43:48 +02:00
|
|
|
# New ports collection makefile for: apache2
|
|
|
|
# Date created: 7 April 2001
|
2001-10-24 18:03:38 +02:00
|
|
|
# Whom: Hye-Shik Chang <perky@fallin.lv>
|
1995-08-28 15:28:45 +02:00
|
|
|
#
|
1999-08-31 04:43:35 +02:00
|
|
|
# $FreeBSD$
|
1995-08-28 15:28:45 +02:00
|
|
|
#
|
|
|
|
|
2000-04-10 02:07:29 +02:00
|
|
|
PORTNAME= apache
|
2003-07-09 17:31:40 +02:00
|
|
|
PORTVERSION= 2.0.47
|
2001-04-13 16:48:48 +02:00
|
|
|
CATEGORIES= www ipv6
|
2003-04-16 23:33:58 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
|
2002-04-07 08:21:53 +02:00
|
|
|
DISTNAME= httpd-${PORTVERSION}
|
2002-04-08 08:45:33 +02:00
|
|
|
DISTFILES= ${DISTNAME}.tar.gz powerlogo.gif:freebsd
|
2002-03-23 09:31:55 +01:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}.tar.gz
|
2001-11-23 06:03:13 +01:00
|
|
|
|
2003-07-03 10:09:31 +02:00
|
|
|
MAINTAINER?= dominic.marks@btinternet.com
|
2003-02-25 07:25:35 +01:00
|
|
|
COMMENT?= Version 2 of the extremely popular Apache http server
|
2001-02-12 17:19:19 +01:00
|
|
|
|
2002-09-17 09:41:05 +02:00
|
|
|
LIB_DEPENDS= expat.4:${PORTSDIR}/textproc/expat2
|
2002-06-27 02:22:40 +02:00
|
|
|
|
2001-11-06 22:37:06 +01:00
|
|
|
LATEST_LINK= apache2
|
|
|
|
|
2002-06-22 01:47:25 +02:00
|
|
|
WITH_MPM?= prefork # or worker, perchild
|
2001-11-19 23:47:47 +01:00
|
|
|
HTTP_PORT?= 80
|
1998-06-24 21:54:05 +02:00
|
|
|
|
2003-07-06 13:12:23 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2002-05-23 02:32:04 +02:00
|
|
|
USE_PERL5= yes
|
2002-06-19 10:18:10 +02:00
|
|
|
USE_REINPLACE= yes
|
2002-06-19 01:02:05 +02:00
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \
|
2001-04-13 06:43:48 +02:00
|
|
|
--enable-layout=FreeBSD \
|
2002-05-23 02:32:04 +02:00
|
|
|
--with-perl=${PERL5} \
|
2001-11-19 23:47:47 +01:00
|
|
|
--enable-so \
|
|
|
|
--with-mpm=${WITH_MPM} \
|
|
|
|
--with-port=${HTTP_PORT} \
|
2002-06-27 02:22:40 +02:00
|
|
|
--with-expat=${LOCALBASE} \
|
2002-06-19 01:02:05 +02:00
|
|
|
--libdir=${PREFIX_RELDEST}/lib/apache2 \
|
|
|
|
--includedir=${PREFIX_RELDEST}/include/apache2
|
2001-11-19 23:47:47 +01:00
|
|
|
CONFIGURE_ENV= CC="${CC}" CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" \
|
2002-06-20 13:03:08 +02:00
|
|
|
LDFLAGS="${LDFLAGS}" CONFIG_SHELL="${SH}"
|
2002-08-10 02:56:52 +02:00
|
|
|
SHARED_MODULES= all cgid deflate ext_filter proxy proxy-connect proxy-ftp \
|
|
|
|
proxy-http
|
2002-06-22 01:47:25 +02:00
|
|
|
PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,}
|
2002-06-19 01:02:05 +02:00
|
|
|
RC_SUB= -e 's,@@PREFIX@@,${PREFIX_RELDEST},g'
|
2002-05-09 05:55:18 +02:00
|
|
|
MAKE_ENV+= DESTDIR=${DESTDIR} EXPR_COMPAT=yes
|
2001-11-19 23:47:47 +01:00
|
|
|
|
|
|
|
.if defined(NOPORTDOCS)
|
2002-08-04 19:45:43 +02:00
|
|
|
MAKE_ENV+= NOPORTDOCS=yes
|
2001-11-19 23:47:47 +01:00
|
|
|
.endif
|
|
|
|
|
2003-01-21 18:54:18 +01:00
|
|
|
.if !defined(IPV6_V6ONLY)
|
|
|
|
CONFIGURE_ARGS+= --enable-v4-mapped
|
|
|
|
.endif
|
|
|
|
|
2002-08-10 02:56:52 +02:00
|
|
|
.if !defined(WITHOUT_SSL)
|
|
|
|
USE_OPENSSL= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2002-04-08 08:45:33 +02:00
|
|
|
.if defined(WITH_SUEXEC)
|
2002-06-19 01:02:05 +02:00
|
|
|
SUEXEC_DOCROOT?= ${PREFIX_RELDEST}/www/data
|
2002-04-08 08:45:33 +02:00
|
|
|
SUEXEC_USERDIR?= public_html
|
2003-04-16 23:33:58 +02:00
|
|
|
SUEXEC_SAFEPATH?=${PREFIX_RELDEST}/bin:${LOCALBASE}/bin:/usr/bin:/bin
|
2002-04-08 08:45:33 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-suexec \
|
|
|
|
--with-suexec-caller=www \
|
2002-04-08 15:30:01 +02:00
|
|
|
--with-suexec-uidmin=1000 --with-suexec-gidmin=1000 \
|
2002-05-26 15:25:04 +02:00
|
|
|
--with-suexec-userdir="${SUEXEC_USERDIR}" \
|
|
|
|
--with-suexec-docroot="${SUEXEC_DOCROOT}" \
|
2003-04-16 23:33:58 +02:00
|
|
|
--with-suexec-safepath="${SUEXEC_SAFEPATH}" \
|
2002-06-19 01:02:05 +02:00
|
|
|
--with-suexec-logfile="/var/log/httpd-suexec.log" \
|
|
|
|
--with-suexec-bin="${PREFIX_RELDEST}/sbin/suexec"
|
2002-04-08 08:45:33 +02:00
|
|
|
PLIST_SUB+= SUEXEC=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SUEXEC="@comment "
|
|
|
|
.endif
|
|
|
|
|
2003-06-12 11:35:21 +02:00
|
|
|
.if defined(WITH_LDAP)
|
|
|
|
LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap21
|
|
|
|
CONFIGURE_ARGS+= --with-ldap \
|
|
|
|
--enable-ldap --enable-auth-ldap \
|
|
|
|
--with-ldap-lib="${LOCALBASE}/lib" \
|
|
|
|
--with-ldap-include="${LOCALBASE}/include"
|
|
|
|
PLIST_SUB+= LDAP=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= LDAP="@comment "
|
|
|
|
.endif
|
|
|
|
|
2002-06-22 01:47:25 +02:00
|
|
|
.if ${WITH_MPM} != "prefork"
|
|
|
|
PKGNAMESUFFIX= -${WITH_MPM}
|
|
|
|
WITH_THREADS= yes
|
2002-07-21 04:23:33 +02:00
|
|
|
.if ${WITH_MPM} == "worker"
|
|
|
|
PLIST_SUB+= PREFORK="@comment " WORKER=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PREFORK="@comment " WORKER="@comment "
|
|
|
|
.endif
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PREFORK="" WORKER="@comment "
|
2002-06-22 01:47:25 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_THREADS)
|
|
|
|
CONFIGURE_ARGS+= --enable-threads
|
2002-07-21 04:23:33 +02:00
|
|
|
CFLAGS+= -DFREEBSD_THREAD_HACK
|
2002-08-10 02:56:52 +02:00
|
|
|
SHARED_MODULES+= cache file-cache disk-cache mem_cache
|
|
|
|
PLIST_SUB+= THREADS=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= THREADS="@comment "
|
2002-06-22 01:47:25 +02:00
|
|
|
.endif
|
|
|
|
|
2002-08-10 02:56:52 +02:00
|
|
|
.if !defined(WITHOUT_SSL)
|
2002-06-22 01:47:25 +02:00
|
|
|
SHARED_MODULES+= ssl
|
2002-08-10 02:56:52 +02:00
|
|
|
CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE}
|
2002-06-22 01:47:25 +02:00
|
|
|
PLIST_SUB+= MODSSL=""
|
|
|
|
RC_SUB+= -e 's,@@SSL@@,ssl,g'
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MODSSL="@comment "
|
|
|
|
RC_SUB+= -e 's,@@SSL@@,,g'
|
|
|
|
.endif
|
|
|
|
|
2002-05-26 15:25:04 +02:00
|
|
|
.if defined(WITH_EXPERIMENTAL)
|
2002-07-14 05:57:59 +02:00
|
|
|
SHARED_MODULES+= bucketeer case_filter case_filter_in ext_filter charset_lite \
|
|
|
|
optional_hook_export optional_hook_import \
|
|
|
|
optional_fn_import optional_fn_export
|
2002-05-26 15:25:04 +02:00
|
|
|
PLIST_SUB+= EXPERIMENTAL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= EXPERIMENTAL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2002-06-19 01:02:05 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-mods-shared="${SHARED_MODULES}" ${CONFIGURE_TARGET}
|
1998-04-21 23:58:18 +02:00
|
|
|
|
2000-08-22 05:41:05 +02:00
|
|
|
MAN1= dbmmanage.1 htdigest.1 htpasswd.1
|
2003-06-01 02:09:42 +02:00
|
|
|
MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 suexec.8
|
2001-04-13 06:43:48 +02:00
|
|
|
|
2002-03-23 09:31:55 +01:00
|
|
|
post-extract:
|
2002-06-28 02:10:18 +02:00
|
|
|
@${INSTALL_DATA} ${DISTDIR}/powerlogo.gif ${WRKSRC}/docs/icons/freebsd.gif
|
2002-03-23 09:31:55 +01:00
|
|
|
|
2001-04-13 06:43:48 +02:00
|
|
|
post-patch:
|
2002-03-23 09:31:55 +01:00
|
|
|
@cd ${WRKSRC}/docs/docroot && \
|
|
|
|
for f in index.html.*; do (\
|
2002-06-22 01:47:25 +02:00
|
|
|
${REINPLACE_CMD} -e 's,apache_pb,icons/freebsd.gif"\
|
2002-06-19 01:02:05 +02:00
|
|
|
ALT="[Powered by FreeBSD]"><IMG SRC="apache_pb2_ani,g' $$f \
|
2002-03-23 09:31:55 +01:00
|
|
|
); done
|
2002-08-10 02:56:52 +02:00
|
|
|
@${RM} -f ${WRKSRC}/docs/docroot/*.bak
|
2002-04-08 08:45:33 +02:00
|
|
|
@${SED} ${RC_SUB} ${FILESDIR}/apache.sh >${WRKDIR}/apache2.sh
|
2002-04-18 22:29:41 +02:00
|
|
|
@${SED} ${RC_SUB} ${FILESDIR}/config.layout >>${WRKSRC}/config.layout
|
2002-06-19 01:02:05 +02:00
|
|
|
@${RM} -f ${WRKSRC}/docs/manual/index.html.ko.euc-kr
|
1997-10-23 01:51:35 +02:00
|
|
|
|
2001-10-24 18:03:38 +02:00
|
|
|
pre-install:
|
2003-06-06 03:01:13 +02:00
|
|
|
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
2001-10-24 18:03:38 +02:00
|
|
|
|
1996-06-15 18:58:09 +02:00
|
|
|
post-install:
|
2002-04-08 08:45:33 +02:00
|
|
|
@if [ ! -f ${PREFIX}/etc/rc.d/apache2.sh ]; then \
|
|
|
|
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache2.sh startup file."; \
|
|
|
|
${INSTALL_SCRIPT} -m 751 ${WRKDIR}/apache2.sh ${PREFIX}/etc/rc.d/apache2.sh; \
|
1996-06-15 19:51:08 +02:00
|
|
|
fi
|
1996-06-15 18:58:09 +02:00
|
|
|
|
2002-08-10 02:56:52 +02:00
|
|
|
.include <bsd.port.post.mk>
|