1998-11-10 01:56:01 +00:00
|
|
|
# New ports collection makefile for: apache HTTPD w/FrontPage Module
|
|
|
|
# Date created: Sat Oct 31 16:30:00 CDT 1997
|
1998-05-29 04:46:56 +00:00
|
|
|
# Whom: hetzels@westbend.net
|
|
|
|
#
|
1999-08-31 02:43:35 +00:00
|
|
|
# $FreeBSD$
|
1998-05-29 04:46:56 +00:00
|
|
|
#
|
|
|
|
|
2000-04-10 00:07:29 +00:00
|
|
|
PORTNAME= apache_fp
|
2001-03-08 12:35:10 +00:00
|
|
|
PORTVERSION= 1.3.19
|
1998-05-29 04:46:56 +00:00
|
|
|
CATEGORIES= www
|
1999-03-13 17:11:04 +00:00
|
|
|
MASTER_SITES= http://www.apache.org/dist/ \
|
1998-11-19 22:48:42 +00:00
|
|
|
ftp://ftp.microsoft.com/products/frontpage/ \
|
2001-03-08 12:35:10 +00:00
|
|
|
ftp://www.westbend.net/Mirrors/ftp.microsoft.com/Products/frontpage/ \
|
2000-01-03 03:36:38 +00:00
|
|
|
http://www.freebsd.org/gifs/ \
|
|
|
|
http://officeupdate.microsoft.com/frontpage/wpp/serk/ \
|
1999-03-13 17:11:04 +00:00
|
|
|
ftp://ftp.ccs.neu.edu/net/mirrors/ftp.apache.org/apache/dist/ \
|
|
|
|
ftp://ftp.rge.com/pub/infosystems/apache/dist/ \
|
|
|
|
ftp://apache.compuex.com/pub/apache/dist/ \
|
|
|
|
ftp://apache.arctic.org/pub/apache/dist/ \
|
|
|
|
ftp://ftp.epix.net/pub/apache/dist/ \
|
|
|
|
ftp://ftp.ameth.org/pub/mirrors/ftp.apache.org/apache/dist/ \
|
|
|
|
ftp://ftp.connectnet.com/pub/www/apache/ \
|
|
|
|
ftp://apache.technomancer.com/mirrors/apache/dist/ \
|
|
|
|
ftp://ftp.raver.net/pub/ftp.apache.org/ \
|
|
|
|
ftp://www3.service.digital.com/apache/dist/ \
|
|
|
|
ftp://galileo.galilei.com/pub/apache/ \
|
|
|
|
ftp://ftp.mtnranch.net/pub/apache/dist/ \
|
|
|
|
ftp://ftp.iodynamics.com/pub/mirror/apache/dist/ \
|
|
|
|
ftp://apache.nextpath.com/pub/apache/dist/
|
2000-11-28 01:40:13 +00:00
|
|
|
DISTNAME= apache_${PORTVERSION}
|
2000-01-03 03:36:38 +00:00
|
|
|
DISTFILES= ${APACHE} ${FRONTPAGE} powerlogo.gif fplogo.gif
|
1999-01-26 02:27:31 +00:00
|
|
|
|
|
|
|
MAINTAINER= hetzels@westbend.net
|
|
|
|
|
2000-04-10 00:07:29 +00:00
|
|
|
#PATCH_SITES= http://www.apache.org/dist/patches/apply_to_${PORTVERSION}/
|
1999-01-26 02:27:31 +00:00
|
|
|
#PATCHFILES=
|
1998-05-29 04:46:56 +00:00
|
|
|
|
1998-11-10 01:56:01 +00:00
|
|
|
APACHE= ${DISTNAME}${EXTRACT_SUFX}
|
2001-03-08 12:35:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
.if !defined(ARCH)
|
|
|
|
ARCH!= /usr/bin/uname -m
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${ARCH} == i386
|
|
|
|
.ifdef WANT_FREEBSD_EXT
|
|
|
|
FRONTPAGE= fp40.freebsd.tar.z
|
|
|
|
PKGMESSAGE= pkg-message.freebsd
|
|
|
|
.else
|
2000-09-02 07:29:32 +00:00
|
|
|
FRONTPAGE= fp40.bsdi.tar.z
|
2001-03-08 12:35:10 +00:00
|
|
|
EXTRA_PATCHES= ${FILESDIR}/change_server.bsdi ${FILESDIR}/fp_install.bsdi
|
|
|
|
PKGMESSAGE= pkg-message.bsdi
|
|
|
|
.endif
|
|
|
|
.elif ${ARCH} == alpha
|
|
|
|
FRONTPAGE= fp40.alpha.tar.z
|
|
|
|
EXTRA_PATCHES= ${FILESDIR}/change_server.alpha ${FILESDIR}/fp_install.alpha
|
|
|
|
.else
|
|
|
|
.BEGIN:
|
|
|
|
@${ECHO} "Unsupported system ${ARCH}"
|
|
|
|
@${FALSE}
|
|
|
|
.endif
|
1998-11-10 01:56:01 +00:00
|
|
|
|
1998-05-29 04:46:56 +00:00
|
|
|
EXTRACT_ONLY= ${APACHE}
|
|
|
|
|
2000-03-01 06:25:15 +00:00
|
|
|
BATCH?= NO
|
|
|
|
CHMOD?= /bin/chmod
|
|
|
|
FP_REV= version4.0
|
|
|
|
FPINSTALL= frontpage/${FP_REV}/fp_install.sh
|
|
|
|
CHANGESERVER= frontpage/${FP_REV}/change_server.sh
|
|
|
|
FPSETPERM= frontpage/${FP_REV}/set_default_perms.sh
|
|
|
|
README= frontpage/${FP_REV}/readme.htm
|
|
|
|
SERK= frontpage/${FP_REV}/serk
|
|
|
|
FPHTTPD= ${PREFIX}/frontpage/${FP_REV}/apache-fp
|
|
|
|
AP_SHARE= ${PREFIX}/share/doc/apache
|
|
|
|
MOD_FPDOCDIR= ${AP_SHARE}/manual/mod/mod_frontpage
|
1998-11-10 01:56:01 +00:00
|
|
|
MOD_FP= ${FILESDIR}/mod_frontpage.c
|
2000-03-01 06:25:15 +00:00
|
|
|
IMAGES_DIR= ${AP_SHARE}/manual/images
|
1998-05-29 04:46:56 +00:00
|
|
|
|
2000-03-01 06:25:15 +00:00
|
|
|
INSTALL_FILE= ${INSTALL} -c -m 555 -o bin -g bin
|
1998-05-29 04:46:56 +00:00
|
|
|
|
2000-01-03 03:36:38 +00:00
|
|
|
PLIST= ${WRKDIR}/PLIST
|
2000-03-01 06:25:15 +00:00
|
|
|
PLIST_SUB= FP_REV=${FP_REV}
|
1999-01-26 02:27:31 +00:00
|
|
|
|
1998-11-10 01:56:01 +00:00
|
|
|
#
|
|
|
|
# Set APACHE_PERF_TUNING env. variable to YES to get maximum performance
|
|
|
|
#
|
2001-02-11 16:43:53 +00:00
|
|
|
HTTPD_USER?= apache
|
|
|
|
HTTPD_GROUP?= apache
|
|
|
|
USER_WEB_DIR?= public_html
|
1998-11-10 01:56:01 +00:00
|
|
|
|
2000-01-03 03:36:38 +00:00
|
|
|
HAS_CONFIGURE= yes
|
2000-03-01 06:25:15 +00:00
|
|
|
CONFIGURE_ARGS= \
|
|
|
|
--prefix=${PREFIX} \
|
|
|
|
--server-gid=nogroup \
|
|
|
|
--with-perl=${PERL} \
|
|
|
|
--with-layout=${FILESDIR}/FreeBSD.layout:FreeBSD \
|
2001-02-11 16:43:53 +00:00
|
|
|
--server-uid=${HTTPD_USER} \
|
|
|
|
--server-gid=${HTTPD_GROUP} \
|
2000-03-01 06:25:15 +00:00
|
|
|
--without-confadjust \
|
|
|
|
--enable-shared=max \
|
|
|
|
--enable-module=most \
|
|
|
|
--enable-module=auth_db \
|
|
|
|
--disable-module=auth_dbm \
|
|
|
|
--add-module=${MOD_FP} \
|
|
|
|
--enable-shared=frontpage
|
1998-11-10 01:56:01 +00:00
|
|
|
|
|
|
|
# Currently perl version doesn't matter
|
2000-01-03 03:36:38 +00:00
|
|
|
USE_PERL5= YES
|
1998-11-10 01:56:01 +00:00
|
|
|
|
2000-01-03 03:36:38 +00:00
|
|
|
OPTIM= -DHARD_SERVER_LIMIT=512 \
|
|
|
|
-DDOCUMENT_LOCATION=\\"${PREFIX}/www/data/\\" \
|
|
|
|
-DDEFAULT_PATH=\\"/bin:/usr/bin:${PREFIX}/bin\\"
|
1998-11-10 01:56:01 +00:00
|
|
|
|
2000-03-01 06:25:15 +00:00
|
|
|
#By default create an Optimized package.
|
|
|
|
.if ${BATCH} == YES
|
2000-11-28 01:40:13 +00:00
|
|
|
APACHE_PERF_TUNING= YES
|
2000-03-01 06:25:15 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(APACHE_PERF_TUNING) && ${APACHE_PERF_TUNING} == YES
|
2000-11-28 01:40:13 +00:00
|
|
|
OPTIM+= -DBUFFERED_LOGS -DFD_SETSIZE=1024
|
2000-01-03 03:36:38 +00:00
|
|
|
CFLAGS+= -O6 -funroll-loops -fstrength-reduce -fomit-frame-pointer \
|
|
|
|
-fexpensive-optimizations -ffast-math
|
1998-11-10 01:56:01 +00:00
|
|
|
.endif
|
|
|
|
|
2000-01-03 03:36:38 +00:00
|
|
|
CONFIGURE_ENV= CFLAGS='${CFLAGS}' \
|
|
|
|
OPTIM='${OPTIM}' \
|
|
|
|
PATH="${PREFIX}/bin:${PATH}"
|
1998-11-10 01:56:01 +00:00
|
|
|
|
2000-01-03 03:36:38 +00:00
|
|
|
MAN1= dbmmanage.1 htdigest.1 htpasswd.1
|
|
|
|
MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8
|
1998-11-10 01:56:01 +00:00
|
|
|
|
2001-02-11 16:43:53 +00:00
|
|
|
.ifndef NO_SUEXEC
|
2000-11-28 01:40:13 +00:00
|
|
|
CONFIGURE_ARGS+= --enable-suexec \
|
|
|
|
--suexec-caller=${HTTPD_USER} \
|
|
|
|
--suexec-docroot=${PREFIX}/www/data \
|
|
|
|
--suexec-logfile=/var/log/httpd-suexec.log \
|
2001-02-11 16:43:53 +00:00
|
|
|
--suexec-userdir=${USER_WEB_DIR} \
|
2000-11-28 01:40:13 +00:00
|
|
|
--suexec-safepath='/bin:/usr/bin:${PREFIX}/bin'
|
1998-11-10 01:56:01 +00:00
|
|
|
MAN8+= suexec.8
|
|
|
|
.endif
|
1998-05-29 04:46:56 +00:00
|
|
|
|
1998-12-02 00:32:38 +00:00
|
|
|
pre-extract:
|
1998-11-10 01:56:01 +00:00
|
|
|
@if ! ${LDCONFIG} -r | ${GREP} -q -e "-ldescrypt"; then \
|
1998-05-29 04:46:56 +00:00
|
|
|
${ECHO} ; \
|
1998-11-10 01:56:01 +00:00
|
|
|
${ECHO} "WARNING: MS FrontPage Extentions require the DES Library"; \
|
2000-03-01 06:25:15 +00:00
|
|
|
${ECHO} " Install the DES Library, then build apache-fp"; \
|
|
|
|
${ECHO} ; \
|
|
|
|
${ECHO} " FreeBSD Handbook - Security (chapter 6)"; \
|
|
|
|
${ECHO} " http://www.freebsd.org/handbook/security.html#CRYPT"; \
|
|
|
|
${ECHO} " FAQ - I live outside the US. Can I use DES encryption?"; \
|
|
|
|
${ECHO} " http://www.freebsd.org/FAQ/install.html#AEN629"; \
|
1998-05-29 04:46:56 +00:00
|
|
|
${ECHO} ; \
|
|
|
|
${FALSE} ; \
|
|
|
|
fi
|
2001-03-08 12:35:10 +00:00
|
|
|
.if defined(WANT_FREEBSD_EXT) && ${ARCH} == i386
|
|
|
|
@if ! ${LDCONFIG} -r | ${GREP} -q -e "libc.so.3"; then \
|
|
|
|
${ECHO} ; \
|
|
|
|
${ECHO} "WARNING: MS FrontPage Extentions requires the COMPAT3X Libraries"; \
|
|
|
|
${ECHO} " Install the COMPAT3X Libraries, then build apache-fp"; \
|
|
|
|
${ECHO} ; \
|
|
|
|
${FALSE} ; \
|
|
|
|
fi
|
|
|
|
.endif
|
1998-05-29 04:46:56 +00:00
|
|
|
|
|
|
|
post-extract:
|
1998-11-10 01:56:01 +00:00
|
|
|
@${ECHO} "===> Extracting FrontPage install scripts"
|
2000-03-01 06:25:15 +00:00
|
|
|
cd ${WRKSRC} && \
|
1999-09-27 02:52:26 +00:00
|
|
|
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${FRONTPAGE} \
|
2000-01-03 03:36:38 +00:00
|
|
|
${EXTRACT_AFTER_ARGS} ${FPINSTALL} ${CHANGESERVER} \
|
2000-03-01 06:25:15 +00:00
|
|
|
${README} ${FPSETPERM}
|
1999-09-27 02:52:26 +00:00
|
|
|
|
|
|
|
.if !defined(PATCH_DEBUG)
|
|
|
|
post-patch:
|
|
|
|
@ cd ${WRKSRC} \
|
|
|
|
&& find . -type f -name "*.orig" -print | xargs ${RM} -f
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-configure:
|
2001-02-11 16:43:53 +00:00
|
|
|
.ifndef NO_SUEXEC
|
2000-10-08 10:23:48 +00:00
|
|
|
${CP} ${PKGDIR}/pkg-plist ${PLIST}
|
1999-09-27 02:52:26 +00:00
|
|
|
.else
|
2000-10-08 10:23:48 +00:00
|
|
|
${CAT} ${PKGDIR}/pkg-plist | ${GREP} -v sbin/suexec > ${PLIST}
|
1999-09-27 02:52:26 +00:00
|
|
|
.endif
|
1998-05-29 04:46:56 +00:00
|
|
|
|
2000-01-03 03:36:38 +00:00
|
|
|
IMAGES= apache_pb.gif fplogo.gif powerlogo.gif
|
|
|
|
|
2001-02-11 16:43:53 +00:00
|
|
|
# Create apache user and group
|
|
|
|
pre-install:
|
|
|
|
@PKG_PREFIX=${PREFIX} BATCH=${BATCH} PKG_USER=${HTTPD_USER} \
|
|
|
|
PKG_GROUP=${HTTPD_GROUP} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
|
|
|
|
1998-05-29 04:46:56 +00:00
|
|
|
post-install:
|
1999-09-27 02:52:26 +00:00
|
|
|
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
|
|
|
|
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh file."; \
|
2000-03-01 06:25:15 +00:00
|
|
|
${SED} -e 's;PREFIX;${PREFIX};' \
|
|
|
|
-e 's;PERL5;${PERL};' \
|
|
|
|
< ${FILESDIR}/apache.sh.tmpl > ${PREFIX}/etc/rc.d/apache.sh; \
|
1999-09-27 02:52:26 +00:00
|
|
|
${CHMOD} 751 ${PREFIX}/etc/rc.d/apache.sh; \
|
|
|
|
fi
|
2000-03-01 06:25:15 +00:00
|
|
|
@${INSTALL} -c -m 644 ${DISTDIR}/powerlogo.gif ${IMAGES_DIR}
|
|
|
|
@${INSTALL} -c -m 644 ${DISTDIR}/fplogo.gif ${IMAGES_DIR}
|
|
|
|
@${INSTALL} -c -m 644 ${AP_SHARE}/apache_pb.gif ${IMAGES_DIR}
|
2000-01-03 03:36:38 +00:00
|
|
|
@( cd ${PREFIX}/share/doc/apache ; if [ -h images ] ; then ${RM} -f images ; fi ; ln -fs manual/images images)
|
2000-03-01 06:25:15 +00:00
|
|
|
# Untar frontpage extentions
|
|
|
|
@(cd ${PREFIX} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${FRONTPAGE} ${EXTRACT_AFTER_ARGS})
|
|
|
|
@${RM} ${FPHTTPD}/httpd ${FPHTTPD}/httpd.Compat
|
|
|
|
@${MKDIR} ${MOD_FPDOCDIR}
|
|
|
|
@${CP} ${PREFIX}/${README} ${MOD_FPDOCDIR}/index.html
|
|
|
|
@${LN} -fs ${PREFIX}/${SERK} ${MOD_FPDOCDIR}/serk
|
|
|
|
@${INSTALL_FILE} ${WRKSRC}/${FPINSTALL} ${PREFIX}/${FPINSTALL}-dist
|
|
|
|
@${INSTALL_FILE} ${WRKSRC}/${CHANGESERVER} ${PREFIX}/${CHANGESERVER}-dist
|
|
|
|
@${INSTALL_FILE} ${WRKSRC}/${FPSETPERM} ${PREFIX}/${FPSETPERM}
|
2000-10-08 10:23:48 +00:00
|
|
|
@PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2001-03-08 12:35:10 +00:00
|
|
|
.if ${ARCH} == i386
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
.endif
|
1998-05-29 04:46:56 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|