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
|
2002-01-28 23:08:19 +01:00
|
|
|
PORTVERSION= ${APACHE_VERSION}.${RA_VERSION}
|
2000-10-04 08:40:08 +02:00
|
|
|
CATEGORIES= russian www
|
2002-06-22 18:14:45 +02:00
|
|
|
MASTER_SITES= http://www.apache.org/dist/httpd/ \
|
2001-06-17 20:13:46 +02:00
|
|
|
ftp://ftp.ccs.neu.edu/net/mirrors/ftp.apache.org/apache/dist/httpd/ \
|
|
|
|
ftp://ftp.rge.com/pub/infosystems/apache/dist/httpd/ \
|
|
|
|
ftp://apache.compuex.com/pub/apache/dist/httpd/ \
|
|
|
|
ftp://apache.arctic.org/pub/apache/dist/httpd/ \
|
|
|
|
ftp://ftp.epix.net/pub/apache/dist/httpd/ \
|
|
|
|
ftp://ftp.ameth.org/pub/mirrors/ftp.apache.org/apache/dist/httpd/ \
|
|
|
|
ftp://ftp.connectnet.com/pub/www/apache/httpd/ \
|
|
|
|
ftp://apache.technomancer.com/mirrors/apache/dist/httpd/ \
|
|
|
|
ftp://ftp.raver.net/pub/ftp.apache.org/httpd/ \
|
|
|
|
ftp://www3.service.digital.com/apache/dist/httpd/ \
|
|
|
|
ftp://galileo.galilei.com/pub/apache/httpd/ \
|
|
|
|
ftp://ftp.mtnranch.net/pub/apache/dist/httpd/ \
|
|
|
|
ftp://ftp.iodynamics.com/pub/mirror/apache/dist/httpd/ \
|
|
|
|
ftp://apache.nextpath.com/pub/apache/dist/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
|
|
|
|
2002-01-26 18:22:39 +01:00
|
|
|
MAINTAINER= lev@serebryakov.spb.ru
|
1999-05-03 05:57:54 +02:00
|
|
|
|
2002-10-05 11:18:45 +02:00
|
|
|
RA_VERSION= 30.16
|
|
|
|
APACHE_VERSION= 1.3.27
|
1999-05-03 05:57:54 +02:00
|
|
|
Y2K= http://www.apache.org/docs/misc/FAQ.html#year2000
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
#
|
2002-07-08 11:27:37 +02:00
|
|
|
# some defaults
|
1999-05-03 05:57:54 +02:00
|
|
|
#
|
|
|
|
|
2002-07-08 11:27:37 +02:00
|
|
|
DATADIR=${PREFIX}/www
|
|
|
|
DOCUMENT_ROOT=${DATADIR}/data
|
|
|
|
DEFAULT_PATH?=/bin:/usr/bin:${PREFIX}/bin
|
|
|
|
|
|
|
|
#
|
|
|
|
# suexec support
|
|
|
|
#
|
|
|
|
.if defined(WITH_APACHE_SUEXEC)
|
|
|
|
|
|
|
|
APACHE_SUEXEC_DOCROOT?=${DOCUMENT_ROOT}
|
|
|
|
APACHE_SUEXEC_USERDIR?=public_html
|
|
|
|
|
|
|
|
SUEXEC_CONF= \
|
|
|
|
--enable-suexec \
|
|
|
|
--suexec-docroot=${APACHE_SUEXEC_DOCROOT} \
|
|
|
|
--suexec-caller=www \
|
|
|
|
--suexec-uidmin=1000 \
|
|
|
|
--suexec-gidmin=1000 \
|
|
|
|
--suexec-logfile=/var/log/httpd-suexec.log \
|
|
|
|
--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
|
|
|
|
#
|
|
|
|
|
|
|
|
USE_PERL5= yes
|
1999-05-03 05:57:54 +02:00
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS= \
|
|
|
|
--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)
|
|
|
|
CONFIGURE_ARGS+= \
|
|
|
|
--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
|
|
|
|
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-07-08 11:27:37 +02:00
|
|
|
.if defined(APACHE_HARD_SERVER_LIMIT)
|
|
|
|
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)
|
|
|
|
@${ECHO_MSG} "Build all modules (except mod_so and mod_charest) as DSO."
|
|
|
|
.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}"
|
|
|
|
@${ECHO_MSG} " These values could be defined as APACHE_SUEXEC_DOCROOT, APACHE_SUEXEC_USERDIR and DEFAULT_PATH."
|
|
|
|
.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
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|