Merge branch 'oi/hipster' of https://github.com/OpenIndiana/oi-userland into transforms
[unleashed-userland.git] / components / php-5_4-ext-mysql / Makefile
blob0d5e2b6cf29e53f07c1da966b4295dbf815432b7
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL)". You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2013, EveryCity Ltd. All rights reserved.
14 include ../../make-rules/shared-macros.mk
16 COMPONENT_NAME= php
17 COMPONENT_VERSION= 5.4.18
18 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
19 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
20 COMPONENT_ARCHIVE_HASH= sha256:68bf7f51320d90cb3a649babe4eb9e2536ea395aa2e7e1ca7cc5ab67b6cca02a
21 COMPONENT_ARCHIVE_URL= http://uk3.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
23 include ../../make-rules/prep.mk
24 include ../../make-rules/configure.mk
25 include ../../make-rules/ips.mk
27 PHP_PREFIX=/usr/php/5.4
28 PHP_SYSCONFDIR=/etc/php/5.4
29 PHP_DATADIR=/var/php/5.4
31 CONFIGURE_OPTIONS = --prefix=$(PHP_PREFIX)
32 CONFIGURE_OPTIONS.32 = --bindir=$(PHP_PREFIX)/bin
33 CONFIGURE_OPTIONS.64 = --bindir=$(PHP_PREFIX)/bin/$(MACH64)
34 CONFIGURE_OPTIONS.32 += --sbindir=$(PHP_PREFIX)/bin
35 CONFIGURE_OPTIONS.64 += --sbindir=$(PHP_PREFIX)/bin/$(MACH64)
36 CONFIGURE_OPTIONS.32 += --libdir=$(PHP_PREFIX)/lib
37 CONFIGURE_OPTIONS.64 += --libdir=$(PHP_PREFIX)/lib/$(MACH64)
38 CONFIGURE_OPTIONS.32 += --libexecdir=$(PHP_PREFIX)/libexec
39 CONFIGURE_OPTIONS.64 += --libexecdir=$(PHP_PREFIX)/libexec/$(MACH64)
40 CONFIGURE_OPTIONS += --includedir=$(PHP_PREFIX)/include
41 CONFIGURE_OPTIONS += --sysconfdir=$(PHP_SYSCONFDIR)
42 CONFIGURE_OPTIONS += --datadir=$(PHP_DATADIR)
43 CONFIGURE_OPTIONS += --mandir=$(PHP_PREFIX)/share/man
45 CONFIGURE_OPTIONS.64 += --build=x86_64-pc-solaris2.10
46 CONFIGURE_OPTIONS.32 += --with-php-config=$(PHP_PREFIX)/bin/php-config
47 CONFIGURE_OPTIONS.64 += --with-php-config=$(PHP_PREFIX)/bin/$(MACH64)/php-config
48 CONFIGURE_OPTIONS += --with-mysql=/usr/mariadb/5.5
50 CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(BITS))
52 LDFLAGS.32 += -L/usr/mariadb/5.5/lib -R/usr/mariadb/5.5/lib
53 LDFLAGS.64 += -L/usr/mariadb/5.5/lib/$(MACH64) -R/usr/mariadb/5.5/lib/$(MACH64)
55 CFLAGS = $(CC_BITS) -D_POSIX_PTHREAD_SEMANTICS
56 CFLAGS += -I/usr/mariadb/5.5/include
57 CPPFLAGS += -I/usr/mariadb/5.5/include
58 LDFLAGS += $(LDFLAGS.$(BITS))
60 CONFIGURE_SCRIPT = $(@D)/configure
62 COMPONENT_PRE_CONFIGURE_ACTION = cp -R $(SOURCE_DIR)/ext/mysql/* $(@D) ; cd $(@D) ; $(PHP_PREFIX)/bin/phpize
63 COMPONENT_POST_CONFIGURE_ACTION = perl -p -i -e 's/MYSQL_SHARED_LIBADD = .*/MYSQL_SHARED_LIBADD = -lmysqlclient/g' $(@D)/Makefile
64 COMPONENT_INSTALL_ARGS += INSTALL_ROOT=$(PROTO_DIR)
66 build: $(BUILD_32_and_64)
68 install: $(INSTALL_32_and_64)