summaryrefslogtreecommitdiffstats
path: root/rules/php-apc.make
blob: 9de3d0d5f661d6e31b521edf62d84396f07b6d0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# -*-makefile-*-
#
# Copyright (C) 2005 by Jiri Nesladek
#           (C) 2010 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_PHP_APC) += php-apc

#
# Paths and names
#
PHP_APC_VERSION	:= 2.0.4
PHP_APC_MD5	:=
PHP_APC		:= APC-$(PHP_APC_VERSION)
PHP_APC_SUFFIX	:= tgz
PHP_APC_URL	:= http://pecl.php.net/get/$(PHP_APC).$(PHP_APC_SUFFIX)
PHP_APC_SOURCE	:= $(SRCDIR)/$(PHP_APC).$(PHP_APC_SUFFIX)
PHP_APC_DIR	:= $(PHP_DIR)/ext/$(PHP_APC)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

$(STATEDIR)/php-apc.extract:
	@$(call targetinfo)
	@$(call clean, $(PHP_APC_DIR))
	@$(call extract, PHP_APC, $(PHP_DIR)/ext)
	@$(call patchin, PHP_APC)
	@$(call touch)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

PHP_APC_PATH = PATH=$(CROSS_PATH)
PHP_APC_ENV  = $(CROSS_ENV)

#
# autoconf
#
PHP_APC_AUTOCONF = \
	$(CROSS_AUTOCONF_USR) \
	--enable-apc

$(STATEDIR)/php-apc.prepare:
	@$(call targetinfo)
	@$(call clean, $(PHP_APC_DIR)/config.cache)
# FIXME: mol: phpize is a shell script so it works but a host tool may be nicer
	cd $(PHP_APC_DIR) && \
		$(PHP_APC_PATH) $(PHP_APC_ENV) \
		$(PTXCONF_SYSROOT_TARGET)/bin/phpize && \
		$(PHP_APC_PATH) $(PHP_APC_ENV) \
		./configure $(PHP_APC_AUTOCONF)
	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/php-apc.targetinstall:
	@$(call targetinfo)

	@$(call install_init, php-apc)
	@$(call install_fixup, php-apc,PRIORITY,optional)
	@$(call install_fixup, php-apc,SECTION,base)
	@$(call install_fixup, php-apc,AUTHOR,"Jiri Nesladek <nesladek@2n.cz>")
	@$(call install_fixup, php-apc,DESCRIPTION,missing)

	@$(call install_copy, php-apc, 0, 0, 0644, -, /usr/lib/php/apc.so)

	@$(call install_finish, php-apc)

	@$(call touch)

# vim: syntax=make