php7/php7-pecl-*: introduce load order
[feed/packages.git] / lang / php7 / pecl.mk
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 define Package/php7-pecl/Default
7 SUBMENU:=PHP
8 SECTION:=lang
9 CATEGORY:=Languages
10 URL:=http://pecl.php.net/
11 DEPENDS:=php7
12 endef
13
14 define Build/Prepare
15 $(Build/Prepare/Default)
16 ( cd $(PKG_BUILD_DIR); $(STAGING_DIR)/usr/bin/phpize7 )
17 endef
18
19 CONFIGURE_ARGS+= \
20 --with-php-config=$(STAGING_DIR)/usr/bin/php7-config
21
22 define PECLPackage
23
24 define Package/php7-pecl-$(1)
25 $(call Package/php7-pecl/Default)
26 TITLE:=$(2)
27
28 ifneq ($(3),)
29 DEPENDS+=$(3)
30 endif
31 endef
32
33 define Package/php7-pecl-$(1)/install
34 $(INSTALL_DIR) $$(1)/usr/lib/php
35 $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
36 $(INSTALL_DIR) $$(1)/etc/php7
37 ifeq ($(5),zend)
38 echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
39 else
40 echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
41 endif
42 endef
43
44 endef