You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.0 KiB

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