Fresh pull from upstream (stable) package feed
[librecmc/package-feed.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_VARS+= \
20         ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no)
21
22 CONFIGURE_ARGS+= \
23         --with-php-config=$(STAGING_DIR)/usr/bin/php7-config
24
25 define PECLPackage
26
27   define Package/php7-pecl-$(1)
28     $(call Package/php7-pecl/Default)
29     TITLE:=$(2)
30
31     ifneq ($(3),)
32       DEPENDS+=$(3)
33     endif
34   endef
35
36   define Package/php7-pecl-$(1)/install
37         $(INSTALL_DIR) $$(1)/usr/lib/php
38         $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
39         $(INSTALL_DIR) $$(1)/etc/php7
40     ifeq ($(5),zend)
41         echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
42     else
43         echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini
44     endif
45   endef
46
47 endef