1997-09-03 14:45:16 -04:00
|
|
|
# New ports collection makefile for: apache HTTPD / php 2.0b12
|
|
|
|
# Version required: 1.2.1 / 2.0b12
|
|
|
|
# Date created: Wed Sep 3 18:28:20 CEST 1997
|
|
|
|
# Whom: Andreas Klemm <andreas@klemm.gtn.com>
|
1995-08-28 09:28:45 -04:00
|
|
|
#
|
1997-09-09 06:01:36 -04:00
|
|
|
# $Id: Makefile,v 1.40 1997/09/03 18:49:53 andreas Exp $
|
1995-08-28 09:28:45 -04:00
|
|
|
#
|
|
|
|
|
1997-07-08 09:04:19 -04:00
|
|
|
DISTNAME= apache_1.2.1
|
1997-09-09 06:01:36 -04:00
|
|
|
PKGNAME= apache-php-1.2.1
|
1996-11-18 06:44:27 -05:00
|
|
|
CATEGORIES= www
|
1997-09-03 14:45:16 -04:00
|
|
|
MASTER_SITES= ftp://www.apache.org/apache/dist/ \
|
|
|
|
ftp://ftp.nerosworld.com/pub/php/dist/ \
|
|
|
|
ftp://ftp.u-aizu.ac.jp/pub/net/www/php \
|
|
|
|
ftp://ftpza.co.za/pub/mirrors/php/
|
|
|
|
DISTFILES= apache_1.2.1.tar.gz \
|
|
|
|
php-2.0b12.tar.gz
|
1995-08-28 09:28:45 -04:00
|
|
|
|
1997-09-03 14:45:16 -04:00
|
|
|
MAINTAINER= andreas@FreeBSD.ORG
|
|
|
|
|
|
|
|
NO_PACKAGE= "Too many questions"
|
|
|
|
IS_INTERACTIVE= yes
|
|
|
|
BROKEN= "Am working on it..."
|
|
|
|
|
|
|
|
#
|
|
|
|
# Currently we support two db's: msql and mysql
|
|
|
|
#
|
|
|
|
.if !defined(PHP_DBTYPE)
|
|
|
|
pre-fetch:
|
|
|
|
@echo
|
|
|
|
@echo "You must set variable PHP_DBTYPE to msql or mysql by typing"
|
|
|
|
@echo "make PHP_DBTYPE=[ msql | mysql ]"
|
|
|
|
@false
|
|
|
|
|
|
|
|
.elif defined(PHP_DBTYPE)
|
|
|
|
.if ${PHP_DBTYPE} == msql
|
|
|
|
BUILD_DEPENDS= msql:${PORTSDIR}/databases/msql
|
|
|
|
PATCHDIR= ${.CURDIR}/patches.msql
|
|
|
|
|
|
|
|
.elif ${PHP_DBTYPE} == mysql
|
|
|
|
BUILD_DEPENDS= mysql:${PORTSDIR}/databases/mysql
|
|
|
|
PATCHDIR= ${.CURDIR}/patches.mysql
|
|
|
|
.endif
|
|
|
|
.endif
|
1996-05-20 03:37:06 -04:00
|
|
|
|
1997-08-13 11:05:03 -04:00
|
|
|
# Set it for local-supplied patch, f.e.
|
1997-09-03 14:45:16 -04:00
|
|
|
VERS_ID = php-2.0b12/andreas
|
1996-11-06 20:49:57 -05:00
|
|
|
|
|
|
|
.if defined(VERS_ID)
|
|
|
|
post-patch:
|
1996-12-25 17:53:28 -05:00
|
|
|
@cd ${WRKSRC}/src && \
|
|
|
|
mv Configuration Configuration.old && \
|
1997-05-31 16:34:09 -04:00
|
|
|
sed 's;^#*OPTIM=.*;OPTIM= -DSERVER_SUBVERSION=\\"${VERS_ID}\\";' \
|
1996-12-25 17:53:28 -05:00
|
|
|
< Configuration.old > Configuration
|
1996-11-06 20:49:57 -05:00
|
|
|
.endif
|
|
|
|
|
1997-09-03 14:45:16 -04:00
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
echo "Don\'t forget to add ${PREFIX}/include/gd to additional path !!!"
|
|
|
|
( cd ${WRKDIR}/php-2.0b12; ./install )
|
|
|
|
( cd ${WRKDIR}/php-2.0b12/src; make )
|
|
|
|
( cd ${WRKDIR}/php-2.0b12/src \
|
|
|
|
&& cp mod_php.c mod_php.h libphp.a ../../apache_1.2.1/src )
|
|
|
|
( cd ${WRKDIR}/apache_1.2.1/src \
|
|
|
|
&& echo "Module php_module mod_php.o" \
|
|
|
|
>> Configuration \
|
1997-09-03 14:49:53 -04:00
|
|
|
.if ${PHP_DBTYPE} == msql
|
1997-09-03 14:45:16 -04:00
|
|
|
&& echo "EXTRA_LIBS=-lmd libphp.a -L/usr/local/lib -lmsql -lgd -lm" \
|
1997-09-03 14:49:53 -04:00
|
|
|
.else
|
|
|
|
&& echo "EXTRA_LIBS=-lmd libphp.a -L/usr/local/lib/mysql -lmysql -L/usr/local/lib -lgd -lm" \
|
|
|
|
.endif
|
1997-09-03 14:45:16 -04:00
|
|
|
>> Configuration )
|
|
|
|
|
1996-06-15 12:58:09 -04:00
|
|
|
post-install:
|
1996-06-15 13:51:08 -04:00
|
|
|
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
|
|
|
|
echo "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
|
|
|
|
echo "#!/bin/sh" > ${PREFIX}/etc/rc.d/apache.sh; \
|
|
|
|
echo "[ -x /usr/local/sbin/httpd ] && /usr/local/sbin/httpd && echo -n ' httpd'" >> ${PREFIX}/etc/rc.d/apache.sh; \
|
|
|
|
chmod 751 ${PREFIX}/etc/rc.d/apache.sh; \
|
|
|
|
fi
|
1997-09-03 14:45:16 -04:00
|
|
|
echo "AddType application/x-httpd-php .phtml" \
|
|
|
|
> ${PREFIX}/etc/apache/srm.conf.php
|
|
|
|
echo "Don't forget to enable php support in \
|
|
|
|
${PREFIX}/etc/apache/srm.conf"
|
|
|
|
echo "See ${PREFIX}/etc/apache/srm.conf.php"
|
1996-06-15 12:58:09 -04:00
|
|
|
|
1995-08-28 09:28:45 -04:00
|
|
|
.include <bsd.port.mk>
|