Makefile revision 1022
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# CDDL HEADER START
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# The contents of this file are subject to the terms of the
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# Common Development and Distribution License (the "License").
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# You may not use this file except in compliance with the License.
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# See the License for the specific language governing permissions
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# and limitations under the License.
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# When distributing Covered Code, include this CDDL HEADER in each
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# If applicable, add the following below this CDDL HEADER, with the
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# fields enclosed by brackets "[]" replaced with your own identifying
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# information: Portions Copyright [yyyy] [name of copyright owner]
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# CDDL HEADER END
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
d1b57e78cf72f41c7c6a52bd7c2a6d6aa4da6ba4Craig McDonnell# Currently the version numbers in the package manifests, one
d1b57e78cf72f41c7c6a52bd7c2a6d6aa4da6ba4Craig McDonnell# level up, are manually set because the COMPONENT_VERSION, like
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# below, is not available at the top level where this is IPS
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# published from.
6909255a1970175507277a0f2f105979625f76b2Jaco JoosteCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sha256:c8075b6e83c5db0d26cc8426a7456856421089a76c963813b1fcac3ced041cb3
869a36e2649ae064c98063cf1e55198488d78d12Allan FosterCOMPONENT_ARCHIVE_URL= http://us.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# php documentation
869a36e2649ae064c98063cf1e55198488d78d12Allan FosterCOMPONENT_SRC_1= $(COMPONENT_NAME_1)_$(COMPONENT_VERSION_1)
6466ccf2fa7622ea05ba8cd089a224c8fc710f9aCraig McDonnell sha256:4c5d45e5f49bb164d40154fdef57b3193e7b77e306055559e60615c8ca9a3c30
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# This next download URL is completely hocus pocus.
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# php.net does not freeze their documentation to match the software versions.
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# So we need to take a snapshot of PHP's documentation by downloading what
6909255a1970175507277a0f2f105979625f76b2Jaco Jooste# they currently have from this URL:
6909255a1970175507277a0f2f105979625f76b2Jaco Jooste# COMPONENT_ARCHIVE_URL_1=http://us.php.net/get/php_manual_en.tar.gz/from/this/mirror
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# Then move that download to the name being constructed in the variables
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# above. Finally, forward a copy to the gatekeeping staff to place
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# the copy in userland's download cache so that the following download URL
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# will pick it up.
869a36e2649ae064c98063cf1e55198488d78d12Allan FosterCOMPONENT_ARCHIVE_URL_1=http://us.php.net/get/$(COMPONENT_ARCHIVE_1)/from/this/mirror
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster --with-config-file-scan-dir=$(MODULES_CONF_DIR) \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster --with-mysqli=shared,$(MYSQL_DIR)/bin/mysql_config \
d1b57e78cf72f41c7c6a52bd7c2a6d6aa4da6ba4Craig McDonnell sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^prefix=.*%prefix=$(SOURCE_DIR)%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^includedir=.*%includedir=$(SOURCE_DIR)%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^phpdir=.*%phpdir=$(SOURCE_DIR)%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%$PHP_AUTOCONF || exit 1%$PHP_AUTOCONF -f || exit 1%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%$PHP_AUTOHEADER || exit 1%$PHP_AUTOHEADER -f || exit 1%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e 's%(cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build)%(cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build)%' | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^builddir=.*%builddir=$(BUILD_DIR_32)%" \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^prefix=.*%prefix=$(SOURCE_DIR)%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^include_dir=.*%include_dir=$(SOURCE_DIR)%" \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s,^\#! /bin/sh,\#!$(CONFIG_SHELL)," | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^prefix=.*%prefix=$(COMPONENT_DIR)/../php-nsapi/$(COMPONENT_SRC)%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^include_dir=.*%include_dir=$(COMPONENT_DIR)/../php-nsapi/$(COMPONENT_SRC)%" | \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster sed -e "s%^extension_dir=.*%extension_dir=$(ZTS_MODULES_DIR)%" \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(INSTALL) -m 0644 $(COMPONENT_DIR)/../Solaris/php$(PHP_REL).conf \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(PROTO_DIR)/$(APACHE2_PHP)/php$(PHP_REL).conf; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(PROTO_DIR)/$(APACHE2_PHP)/php$(PHP_REL).conf; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(CP) $(PROTO_DIR)/$(APACHE2_EXTDIR)/libphp5.so \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(PROTO_DIR)/$(APACHE2_EXTDIR)/mod_php$(PHP_REL).so; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# Ship a default php.ini to simplify ease of use.
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(GPATCH) -p0 -o php.ini-patched -i ../patches-other/php_ini.patch; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(GSED) -e "s@<<VERSION>>@$(PHP_REL)@g" < php.ini-patched > php.ini; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(INSTALL) -m 644 php.ini $(PROTO_DIR)/$(CONF_DIR)/php.ini; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(UNPACK) -r $(PROTO_DIR)/$(DOCDIR) $(COMPONENT_ARCHIVE_1); \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(GSED) -e "s,\<\<INSTALL_DIR\>\>,$(PHP_ROOT)," \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster -e "s,\<\<NSAPI_CONF_DIR\>\>,$(NSAPI_CONFDIR)," \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster -e "s,\<\<MODULES_CONF_DIR\>\>,$(MODULES_CONFDIR)," \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster -e "s,\<\<ZTS_MODULES_CONF_DIR\>\>,$(ZTS_MODULES_CONFDIR)," \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster < $(COMPONENT_DIR)/../Solaris/configure-sun-webserver \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(PROTO_DIR)/$(SCRIPTS_DIR)/configure-sun-webserver; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(SYMLINK) ../samples/scripts/configure-sun-webserver \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# patch installation to support pear installation.
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_pecl.patch; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_php_config.patch; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(GPATCH) -N -i $(COMPONENT_DIR)/patches-other/pear_Makefile_global.patch; \
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster $(GPATCH) -N -p0 -i $(COMPONENT_DIR)/patches-other/pear_Builder_php.patch; \
6909255a1970175507277a0f2f105979625f76b2Jaco Jooste# Create symbolic links
869a36e2649ae064c98063cf1e55198488d78d12Allan Foster# Not strictly necessary but makes the proto area more correct.
# Joomla! http://www.joomla.org/
# WordPress http://wordpress.org/
test: $(TEST_32)