mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-08 23:06:56 +00:00
86 lines
2.6 KiB
Makefile
86 lines
2.6 KiB
Makefile
# 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>
|
|
#
|
|
# $Id: Makefile,v 1.41 1997/09/09 10:01:36 asami Exp $
|
|
#
|
|
|
|
DISTNAME= apache_1.2.1
|
|
PKGNAME= apache-php-1.2.1
|
|
CATEGORIES= www
|
|
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
|
|
|
|
MAINTAINER= andreas@FreeBSD.ORG
|
|
|
|
NO_PACKAGE= "Too many questions"
|
|
BROKEN= "php conf-dialogue needs knowledge of include and library paths"
|
|
IS_INTERACTIVE= yes
|
|
|
|
#
|
|
# 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
|
|
|
|
# Set it for local-supplied patch, f.e.
|
|
VERS_ID = php-2.0b12/andreas
|
|
|
|
.if defined(VERS_ID)
|
|
post-patch:
|
|
@ cd ${WRKSRC}/src && \
|
|
${MV} Configuration Configuration.old && \
|
|
${SED} 's;^#*OPTIM=.*;OPTIM= -DSERVER_SUBVERSION=\\"${VERS_ID}\\";' \
|
|
< Configuration.old > Configuration
|
|
.endif
|
|
|
|
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 \
|
|
.if ${PHP_DBTYPE} == msql
|
|
&& ${ECHO} "EXTRA_LIBS=-lmd libphp.a -L/usr/local/lib -lmsql -lgd -lm" \
|
|
.else
|
|
&& ${ECHO} "EXTRA_LIBS=-lmd libphp.a -L/usr/local/lib/mysql -lmysql -L/usr/local/lib -lgd -lm" \
|
|
.endif
|
|
>> Configuration )
|
|
|
|
post-install:
|
|
@ 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
|
|
${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"
|
|
|
|
.include <bsd.port.mk>
|