1997-08-12 11:49:12 +00:00
|
|
|
# New ports collection makefile for: apache HTTPD
|
1995-08-28 13:28:45 +00:00
|
|
|
# Date created: Fri Aug 25 16:42:36 CDT 1995
|
1999-09-03 16:07:53 +00:00
|
|
|
# Whom: ache@freebsd.org
|
1995-08-28 13:28:45 +00:00
|
|
|
#
|
1999-08-31 02:43:35 +00:00
|
|
|
# $FreeBSD$
|
1995-08-28 13:28:45 +00:00
|
|
|
#
|
|
|
|
|
2000-04-10 00:07:29 +00:00
|
|
|
PORTNAME= apache
|
2004-05-19 02:11:05 +00:00
|
|
|
PORTVERSION= 1.3.31
|
2004-08-22 10:55:55 +00:00
|
|
|
PORTREVISION= 5
|
1996-11-18 11:44:27 +00:00
|
|
|
CATEGORIES= www
|
2003-04-27 15:53:51 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
|
2000-08-22 03:41:05 +00:00
|
|
|
DISTNAME= apache_${PORTVERSION}
|
1998-02-20 11:09:09 +00:00
|
|
|
|
2003-04-27 15:53:51 +00:00
|
|
|
#PATCH_SITES= ${MASTER_SITE_APACHE_HTTPD}
|
2004-05-19 02:11:05 +00:00
|
|
|
#PATCH_SITE_SUBDIR= patches/apply_to_1.3.31/
|
2002-06-19 02:02:03 +00:00
|
|
|
#PATCHFILES=
|
|
|
|
#PATCH_DIST_ARGS= -d ${WRKSRC}/src --forward --quiet -E ${PATCH_DIST_STRIP}
|
2001-02-12 16:19:19 +00:00
|
|
|
|
2000-08-22 03:41:05 +00:00
|
|
|
MAINTAINER= ache@freebsd.org
|
2003-03-07 06:14:21 +00:00
|
|
|
COMMENT= The extremely popular Apache http server. Very fast, very clean
|
1996-05-20 07:37:06 +00:00
|
|
|
|
2004-03-18 20:50:09 +00:00
|
|
|
CONFLICTS= apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* apache+mod_ssl+modsnmp-1.* \
|
|
|
|
apache+mod_ssl+mod_snmp+ipv6-1.* apache+mod_ssl+mod_accel-1.* \
|
|
|
|
apache+mod_ssl+mod_snmp+mod_accel-1.* \
|
|
|
|
apache+ipv6-1.* apache+ssl-1.* apache-2.* apache_fp-1.* \
|
2003-10-14 15:47:28 +00:00
|
|
|
caudium-devel-1.* caudium10-1.* caudium12-* \
|
|
|
|
ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.*
|
2003-02-16 23:51:17 +00:00
|
|
|
USE_PERL5= yes
|
2004-04-30 21:44:50 +00:00
|
|
|
USE_RC_SUBR= yes
|
2002-11-04 20:59:13 +00:00
|
|
|
|
2004-05-27 03:31:41 +00:00
|
|
|
.if defined(APACHE_DATADIR)
|
|
|
|
DATADIR=${APACHE_DATADIR}
|
|
|
|
.else
|
2002-05-09 02:12:15 +00:00
|
|
|
DATADIR=${PREFIX}/www
|
2004-05-27 03:31:41 +00:00
|
|
|
.endif
|
|
|
|
.if defined(APACHE_DOCUMENT_ROOT)
|
|
|
|
DOCUMENT_ROOT=${APACHE_DOCUMENT_ROOT}
|
|
|
|
.else
|
2002-05-09 02:12:15 +00:00
|
|
|
DOCUMENT_ROOT=${DATADIR}/data
|
2004-05-27 03:31:41 +00:00
|
|
|
.endif
|
|
|
|
.if defined(APACHE_CGIBIN_ROOT)
|
|
|
|
CGIBIN_ROOT=${APACHE_CGIBIN_ROOT}
|
|
|
|
.else
|
|
|
|
CGIBIN_ROOT=${DATADIR}/cgi-bin
|
|
|
|
.endif
|
2002-05-07 04:33:04 +00:00
|
|
|
DEFAULT_PATH=/bin:/usr/bin:${PREFIX}/bin
|
2004-04-30 21:44:50 +00:00
|
|
|
RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
2002-05-07 04:33:04 +00:00
|
|
|
|
2003-02-16 23:51:17 +00:00
|
|
|
.if defined(WITHOUT_APACHE_EXPAT) && ${WITHOUT_APACHE_EXPAT} == yes
|
|
|
|
EXPAT_CONF+= --disable-rule=EXPAT
|
|
|
|
.else
|
2003-09-01 23:45:32 +00:00
|
|
|
.if !defined(WITH_APACHE_INTERNAL_EXPAT) || ${WITH_APACHE_INTERNAL_EXPAT} != yes
|
2004-03-14 07:58:26 +00:00
|
|
|
LIB_DEPENDS+= expat.5:${PORTSDIR}/textproc/expat2
|
2003-09-01 23:45:32 +00:00
|
|
|
.endif
|
2003-02-16 23:51:17 +00:00
|
|
|
EXPAT_CONF+= --enable-rule=EXPAT
|
|
|
|
.endif
|
|
|
|
|
2002-05-08 09:09:53 +00:00
|
|
|
.if defined(WITH_APACHE_SUEXEC) && ${WITH_APACHE_SUEXEC} == yes
|
2002-05-07 04:33:04 +00:00
|
|
|
|
|
|
|
APACHE_SUEXEC_DOCROOT?=${DOCUMENT_ROOT}
|
2002-10-30 01:56:05 +00:00
|
|
|
APACHE_SUEXEC_LOG?=/var/log/httpd-suexec.log
|
2002-05-07 04:33:04 +00:00
|
|
|
APACHE_SUEXEC_USERDIR?=public_html
|
2003-08-17 18:28:39 +00:00
|
|
|
APACHE_SUEXEC_UIDMIN?=1000
|
|
|
|
APACHE_SUEXEC_GIDMIN?=1000
|
|
|
|
APACHE_SUEXEC_CALLER?=www
|
2002-05-07 04:33:04 +00:00
|
|
|
|
|
|
|
SUEXEC_CONF= \
|
|
|
|
--enable-suexec \
|
|
|
|
--suexec-docroot=${APACHE_SUEXEC_DOCROOT} \
|
2003-08-17 18:28:39 +00:00
|
|
|
--suexec-caller=${APACHE_SUEXEC_CALLER} \
|
|
|
|
--suexec-uidmin=${APACHE_SUEXEC_UIDMIN} \
|
|
|
|
--suexec-gidmin=${APACHE_SUEXEC_GIDMIN} \
|
2002-10-30 01:56:05 +00:00
|
|
|
--suexec-logfile=${APACHE_SUEXEC_LOG} \
|
2002-05-07 04:33:04 +00:00
|
|
|
--suexec-userdir=${APACHE_SUEXEC_USERDIR} \
|
|
|
|
--suexec-safepath=${DEFAULT_PATH}
|
|
|
|
|
|
|
|
.if defined(APACHE_SUEXEC_UMASK)
|
|
|
|
SUEXEC_CONF+= \
|
|
|
|
--suexec-umask=${APACHE_SUEXEC_UMASK}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
PLIST_SUB+= SUB_SUEXEC=""
|
|
|
|
SUEXEC_MAN= suexec.8
|
|
|
|
|
|
|
|
.else # !SUEXEC
|
|
|
|
|
|
|
|
SUEXEC_CONF=
|
|
|
|
PLIST_SUB+= SUB_SUEXEC="@comment "
|
|
|
|
SUEXEC_MAN=
|
|
|
|
|
|
|
|
.endif # !SUEXEC
|
|
|
|
|
2003-02-16 23:51:17 +00:00
|
|
|
HAS_CONFIGURE= yes
|
2001-10-28 20:38:44 +00:00
|
|
|
# += for child ports
|
|
|
|
CONFIGURE_ARGS+= \
|
2000-08-22 03:41:05 +00:00
|
|
|
--prefix=${PREFIX} \
|
2001-10-21 17:33:37 +00:00
|
|
|
--server-uid=www \
|
|
|
|
--server-gid=www \
|
2000-08-22 03:41:05 +00:00
|
|
|
--with-perl=${PERL} \
|
2002-01-25 05:40:18 +00:00
|
|
|
--with-layout=FreeBSD \
|
2004-05-27 03:31:41 +00:00
|
|
|
--datadir=${DATADIR} \
|
|
|
|
--htdocsdir=${DOCUMENT_ROOT} \
|
|
|
|
--cgidir=${CGIBIN_ROOT} \
|
2000-08-22 03:41:05 +00:00
|
|
|
--without-confadjust \
|
|
|
|
--enable-module=most \
|
|
|
|
--enable-module=auth_db \
|
2000-10-11 22:37:56 +00:00
|
|
|
--enable-module=mmap_static \
|
|
|
|
--disable-module=auth_dbm \
|
2002-05-07 04:33:04 +00:00
|
|
|
--enable-shared=max \
|
2003-02-16 23:51:17 +00:00
|
|
|
${SUEXEC_CONF} \
|
|
|
|
${EXPAT_CONF}
|
1998-04-21 21:58:18 +00:00
|
|
|
|
2003-02-19 01:02:48 +00:00
|
|
|
CFLAGS+=-DDOCUMENT_LOCATION=\\\\\"${DOCUMENT_ROOT}\\\\\" \
|
|
|
|
-DDEFAULT_PATH=\\\\\"${DEFAULT_PATH}\\\\\"
|
1998-06-24 19:54:05 +00:00
|
|
|
|
2002-02-19 07:00:34 +00:00
|
|
|
#
|
|
|
|
# Set APACHE_HARD_SERVER_LIMIT env. variable to desired value
|
|
|
|
#
|
|
|
|
.if defined(APACHE_HARD_SERVER_LIMIT)
|
2003-02-16 05:58:22 +00:00
|
|
|
CFLAGS+=-DHARD_SERVER_LIMIT=${APACHE_HARD_SERVER_LIMIT}
|
2002-02-19 07:00:34 +00:00
|
|
|
.else
|
2003-02-16 05:58:22 +00:00
|
|
|
CFLAGS+=-DHARD_SERVER_LIMIT=512
|
2002-02-19 07:00:34 +00:00
|
|
|
.endif
|
|
|
|
|
2001-10-21 17:33:37 +00:00
|
|
|
#
|
2003-02-16 23:51:17 +00:00
|
|
|
# Set WITH_APACHE_PERF_TUNING env. variable to yes to get maximum performance
|
2001-10-21 17:33:37 +00:00
|
|
|
#
|
2003-02-16 23:51:17 +00:00
|
|
|
.if defined(WITH_APACHE_PERF_TUNING) && ${WITH_APACHE_PERF_TUNING} == yes
|
2003-02-16 05:58:22 +00:00
|
|
|
CFLAGS+=-DBUFFERED_LOGS
|
2003-02-16 23:51:17 +00:00
|
|
|
# Don't use OPTIM below, it is inserted _before_ CFLAGS
|
2003-02-16 05:58:22 +00:00
|
|
|
CFLAGS+=-O6 -fomit-frame-pointer
|
1998-06-24 19:54:05 +00:00
|
|
|
.endif
|
|
|
|
|
2003-02-16 23:51:17 +00:00
|
|
|
CONFIGURE_ENV= OPTIM='${OPTIM}' LD_SHLIB='${CC}' LIBS='${LIBS}'
|
|
|
|
|
2003-09-01 23:45:32 +00:00
|
|
|
.if (!defined(WITHOUT_APACHE_EXPAT) || ${WITHOUT_APACHE_EXPAT} != yes) && \
|
|
|
|
(!defined(WITH_APACHE_INTERNAL_EXPAT) || ${WITH_APACHE_INTERNAL_EXPAT} != yes)
|
2003-02-16 23:51:17 +00:00
|
|
|
CONFIGURE_ENV+= \
|
2003-02-16 05:58:22 +00:00
|
|
|
INCLUDES=-I${LOCALBASE}/include \
|
|
|
|
LDFLAGS=-L${LOCALBASE}/lib
|
2003-02-16 23:51:17 +00:00
|
|
|
.endif
|
1998-04-21 21:58:18 +00:00
|
|
|
|
2000-08-22 03:41:05 +00:00
|
|
|
MAN1= dbmmanage.1 htdigest.1 htpasswd.1
|
2002-05-07 04:33:04 +00:00
|
|
|
MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 \
|
|
|
|
${SUEXEC_MAN}
|
1997-10-22 23:51:35 +00:00
|
|
|
|
2002-04-22 03:26:12 +00:00
|
|
|
post-extract:
|
2004-04-30 21:44:50 +00:00
|
|
|
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
|
|
|
${FILESDIR}/apache.sh > ${WRKSRC}/apache.sh
|
2002-04-22 03:26:12 +00:00
|
|
|
|
2001-10-21 17:33:37 +00:00
|
|
|
pre-install:
|
2004-08-22 10:55:55 +00:00
|
|
|
-@${CHMOD} u+w ${DOCUMENT_ROOT}-dist ${CGIBIN_ROOT}-dist
|
2002-10-06 07:29:24 +00:00
|
|
|
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
2001-10-21 17:33:37 +00:00
|
|
|
|
1996-06-15 16:58:09 +00:00
|
|
|
post-install:
|
2004-04-30 21:44:50 +00:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh
|
2004-05-27 03:31:41 +00:00
|
|
|
@${TOUCH} ${DOCUMENT_ROOT}-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
|
|
|
|
@${TOUCH} ${CGIBIN_ROOT}-dist/EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING
|
2004-08-22 10:55:55 +00:00
|
|
|
@${CHMOD} a-w ${DOCUMENT_ROOT}-dist ${CGIBIN_ROOT}-dist
|
2002-03-24 20:21:46 +00:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
1996-06-15 16:58:09 +00:00
|
|
|
|
1995-08-28 13:28:45 +00:00
|
|
|
.include <bsd.port.mk>
|