1999-05-03 05:57:54 +02:00
|
|
|
# New ports collection makefile for: apache HTTPD
|
|
|
|
# Date created: Sat Apr 10 22:30:36 EEST 1999
|
|
|
|
# Whom: vns@delta.odessa.ua
|
|
|
|
#
|
1999-08-31 03:53:22 +02:00
|
|
|
# $FreeBSD$
|
1999-05-03 05:57:54 +02:00
|
|
|
#
|
|
|
|
|
2000-04-13 21:19:05 +02:00
|
|
|
PORTNAME= apache
|
2003-03-31 02:37:07 +02:00
|
|
|
PORTVERSION= ${APACHE_VERSION}+${RA_VERSION}
|
2007-07-18 10:55:11 +02:00
|
|
|
PORTREVISION?= 1
|
2000-10-04 08:40:08 +02:00
|
|
|
CATEGORIES= russian www
|
2003-02-24 00:10:10 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
|
2002-01-28 23:08:19 +01:00
|
|
|
DISTNAME= ${PORTNAME}_${APACHE_VERSION}
|
1999-05-03 05:57:54 +02:00
|
|
|
|
1999-11-14 04:10:30 +01:00
|
|
|
PATCH_SITES= ftp://ftp.lexa.ru/pub/apache-rus/ \
|
1999-12-23 19:35:06 +01:00
|
|
|
ftp://ftp.lexa.ru/pub/apache-rus/old-versions/
|
2002-01-28 23:08:19 +01:00
|
|
|
PATCHFILES= patches_${APACHE_VERSION}rusPL${RA_VERSION}.tar.gz
|
1999-05-03 05:57:54 +02:00
|
|
|
|
2003-06-17 15:53:45 +02:00
|
|
|
MAINTAINER= lev@FreeBSD.org
|
2003-02-21 14:28:59 +01:00
|
|
|
COMMENT= The extremely popular Apache http server. Very fast, very clean
|
1999-05-03 05:57:54 +02:00
|
|
|
|
2007-10-07 07:45:04 +02:00
|
|
|
USE_PERL5= yes
|
|
|
|
|
2003-06-25 16:13:16 +02:00
|
|
|
# New ports feature: conflicts
|
|
|
|
CONFLICTS= apache+ipv6-* \
|
2004-03-19 07:02:21 +01:00
|
|
|
apache+mod_ssl-* \
|
|
|
|
apache+mod_ssl+ipv6-* \
|
|
|
|
apache+mod_ssl+modsnmp-* \
|
|
|
|
apache+mod_ssl+mod_snmp+ipv6-* \
|
|
|
|
apache+mod_ssl+mod_accel-* \
|
|
|
|
apache+mod_ssl+mod_snmp+mod_accel-* \
|
2004-05-23 20:46:30 +02:00
|
|
|
apache-worker-* \
|
|
|
|
apache-perchild-* \
|
2004-05-23 19:16:16 +02:00
|
|
|
apache-[0-9]* \
|
2003-06-25 16:13:16 +02:00
|
|
|
apache_fp-* \
|
|
|
|
publicfile-* \
|
|
|
|
ru-apache+mod_ssl-*
|
|
|
|
|
2006-11-01 13:26:21 +01:00
|
|
|
RA_VERSION= 30.23
|
|
|
|
APACHE_VERSION= 1.3.37
|
1999-05-03 05:57:54 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Small hack for alternate processing patchfiles
|
|
|
|
#
|
1999-08-23 01:33:47 +02:00
|
|
|
GZCAT=sh -c 'tar -zxf $$0 -C ${WRKSRC};${CAT} ${WRKSRC}/RA-1.3rusPL${RA_VERSION}.patch'
|
1999-05-03 05:57:54 +02:00
|
|
|
|
2003-10-24 16:45:32 +02:00
|
|
|
#
|
|
|
|
# Set proper docsdir
|
|
|
|
#
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/apache
|
|
|
|
|
|
|
|
#
|
|
|
|
# Include pre-make
|
|
|
|
#
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
1999-05-03 05:57:54 +02:00
|
|
|
#
|
2002-07-08 11:27:37 +02:00
|
|
|
# some defaults
|
1999-05-03 05:57:54 +02:00
|
|
|
#
|
|
|
|
|
2003-10-24 16:45:32 +02:00
|
|
|
DATADIR?=${PREFIX}/www
|
|
|
|
DOCUMENT_ROOT?=${DATADIR}/data
|
2002-07-08 11:27:37 +02:00
|
|
|
DEFAULT_PATH?=/bin:/usr/bin:${PREFIX}/bin
|
|
|
|
|
|
|
|
#
|
|
|
|
# suexec support
|
|
|
|
#
|
|
|
|
.if defined(WITH_APACHE_SUEXEC)
|
|
|
|
|
|
|
|
APACHE_SUEXEC_DOCROOT?=${DOCUMENT_ROOT}
|
2002-11-11 01:45:10 +01:00
|
|
|
APACHE_SUEXEC_LOG?=/var/log/httpd-suexec.log
|
2002-07-08 11:27:37 +02:00
|
|
|
APACHE_SUEXEC_USERDIR?=public_html
|
|
|
|
|
2002-11-11 01:45:10 +01:00
|
|
|
SUEXEC_CONF=\
|
2002-07-08 11:27:37 +02:00
|
|
|
--enable-suexec \
|
|
|
|
--suexec-docroot=${APACHE_SUEXEC_DOCROOT} \
|
|
|
|
--suexec-caller=www \
|
|
|
|
--suexec-uidmin=1000 \
|
|
|
|
--suexec-gidmin=1000 \
|
2002-11-11 01:45:10 +01:00
|
|
|
--suexec-logfile=${APACHE_SUEXEC_LOG} \
|
2002-07-08 11:27:37 +02: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+= SUEXEC=""
|
|
|
|
SUEXEC_MAN= suexec.8
|
|
|
|
|
|
|
|
.else # WITH_APACHE_SUEXEC
|
|
|
|
|
|
|
|
SUEXEC_CONF=
|
|
|
|
PLIST_SUB+= SUEXEC="@comment "
|
|
|
|
SUEXEC_MAN=
|
|
|
|
|
|
|
|
.endif # WITH_APACHE_SUEXEC
|
|
|
|
|
|
|
|
#
|
|
|
|
# Configutre parameters
|
|
|
|
#
|
|
|
|
|
1999-05-03 05:57:54 +02:00
|
|
|
HAS_CONFIGURE= yes
|
2002-11-11 01:45:10 +01:00
|
|
|
CONFIGURE_ARGS=\
|
1999-05-03 05:57:54 +02:00
|
|
|
--prefix=${PREFIX} \
|
2002-07-08 11:27:37 +02:00
|
|
|
--server-uid=www \
|
|
|
|
--server-gid=www \
|
1999-11-14 04:10:30 +01:00
|
|
|
--with-perl=${PERL} \
|
|
|
|
--with-layout=${FILESDIR}/FreeBSD.layout:FreeBSD \
|
2002-07-08 11:27:37 +02:00
|
|
|
--without-confadjust
|
|
|
|
|
|
|
|
.if defined(WITH_DSO_MODULES)
|
2002-11-11 01:45:10 +01:00
|
|
|
CONFIGURE_ARGS+=\
|
2002-07-08 11:27:37 +02:00
|
|
|
--enable-shared=max \
|
|
|
|
--disable-shared=so \
|
|
|
|
--disable-shared=charset \
|
|
|
|
--enable-module=most \
|
|
|
|
--enable-module=auth_db \
|
|
|
|
--enable-module=mmap_static \
|
|
|
|
--disable-module=auth_dbm \
|
|
|
|
${SUEXEC_CONF}
|
|
|
|
|
|
|
|
PLIST_SUB+= DSO_MOD=""
|
|
|
|
.else
|
2002-11-11 01:45:10 +01:00
|
|
|
CONFIGURE_ARGS+=\
|
1999-05-03 05:57:54 +02:00
|
|
|
--enable-shared=remain \
|
|
|
|
--enable-module=most \
|
|
|
|
--enable-module=auth_db \
|
2002-07-08 11:27:37 +02:00
|
|
|
--enable-module=mmap_static \
|
|
|
|
--disable-module=auth_dbm \
|
|
|
|
${SUEXEC_CONF}
|
|
|
|
|
|
|
|
PLIST_SUB+= DSO_MOD="@comment "
|
|
|
|
.endif
|
1999-05-03 05:57:54 +02:00
|
|
|
|
2002-07-08 11:27:37 +02:00
|
|
|
OPTIM= -DDOCUMENT_LOCATION=\\"${DOCUMENT_ROOT}\\" \
|
|
|
|
-DDEFAULT_PATH=\\"${DEFAULT_PATH}\\" \
|
|
|
|
-DACCEPT_FILTER_NAME=\\"httpready\\"
|
1999-05-03 05:57:54 +02:00
|
|
|
|
2002-11-11 01:45:10 +01:00
|
|
|
.if defined(APACHE_HARD_SERVER_LIMIT)
|
2002-07-08 11:27:37 +02:00
|
|
|
OPTIM+= -DHARD_SERVER_LIMIT=${APACHE_HARD_SERVER_LIMIT}
|
|
|
|
.else
|
|
|
|
OPTIM+= -DHARD_SERVER_LIMIT=512
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(APACHE_PERF_TUNING)
|
2000-04-21 09:52:25 +02:00
|
|
|
OPTIM+= -DBUFFERED_LOGS
|
|
|
|
CFLAGS+= -O6 -fomit-frame-pointer
|
1999-05-03 05:57:54 +02:00
|
|
|
.endif
|
|
|
|
|
2002-07-08 11:27:37 +02:00
|
|
|
CONFIGURE_ENV= OPTIM='${OPTIM}' LD_SHLIB='${CC}'
|
1999-05-03 05:57:54 +02:00
|
|
|
|
2000-04-21 09:52:25 +02:00
|
|
|
MAN1= dbmmanage.1 htdigest.1 htpasswd.1
|
2002-07-08 11:27:37 +02:00
|
|
|
MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 \
|
|
|
|
${SUEXEC_MAN}
|
|
|
|
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.if defined(WITH_DSO_MODULES)
|
2003-10-07 18:15:51 +02:00
|
|
|
@${ECHO_MSG} "Build all modules (except mod_so and mod_charset) as DSO."
|
2002-07-08 11:27:37 +02:00
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "You could define WITH_DSO_MODULES to build all modules as DSO."
|
|
|
|
.endif
|
|
|
|
.if defined(APACHE_PERF_TUNING)
|
|
|
|
@${ECHO_MSG} "Build Apache for maximum performance."
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "You could define APACHE_PERF_TUNING to build Apache for maximum performace."
|
|
|
|
.endif
|
|
|
|
.if defined(APACHE_HARD_SERVER_LIMIT)
|
|
|
|
@${ECHO_MSG} "Build Apache with HARD_SERVER_LIMIT=${APACHE_HARD_SERVER_LIMIT}"
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "You could define APACHE_HARD_SERVER_LIMIT, default one is 512"
|
|
|
|
.endif
|
|
|
|
.if defined(WITH_APACHE_SUEXEC)
|
|
|
|
@${ECHO_MSG} "Build apache with suexec support"
|
|
|
|
@${ECHO_MSG} " suexec docroot: ${APACHE_SUEXEC_DOCROOT}"
|
|
|
|
@${ECHO_MSG} " suexec userdir: ${APACHE_SUEXEC_USERDIR}"
|
|
|
|
@${ECHO_MSG} " suexec safepath: ${DEFAULT_PATH}"
|
2002-11-11 01:45:10 +01:00
|
|
|
@${ECHO_MSG} " suexec log: ${APACHE_SUEXEC_LOG}"
|
|
|
|
@${ECHO_MSG} " These values could be defined as APACHE_SUEXEC_DOCROOT, APACHE_SUEXEC_USERDIR, DEFAULT_PATH and APACHE_SUEXEC_LOG."
|
2002-07-08 11:27:37 +02:00
|
|
|
.else
|
|
|
|
@${ECHO_MSG} "You could define WITH_APACHE_SUEXEC to build suexec support."
|
|
|
|
.endif
|
|
|
|
@${ECHO_MSG} ""
|
1999-05-03 05:57:54 +02:00
|
|
|
|
|
|
|
pre-install:
|
|
|
|
@if [ -f ${WRKSRC}/htdocs/index.html.orig ]; then \
|
|
|
|
${RM} ${WRKSRC}/htdocs/index.html.orig; \
|
|
|
|
fi
|
2002-07-08 11:27:37 +02:00
|
|
|
PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
|
1999-05-03 05:57:54 +02:00
|
|
|
|
|
|
|
post-install:
|
|
|
|
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
|
|
|
|
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
|
2000-07-05 14:37:06 +02:00
|
|
|
${INSTALL_SCRIPT} -m 751 ${FILESDIR}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \
|
1999-05-03 05:57:54 +02:00
|
|
|
fi
|
|
|
|
|
2003-10-24 16:45:32 +02:00
|
|
|
.include <bsd.port.post.mk>
|