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.

47 lines
1.1 KiB

  1. #
  2. # Copyright (C) 2011-2014 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. MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  13. DEPENDS:=php5
  14. endef
  15. define Build/Configure
  16. ( cd $(PKG_BUILD_DIR); $(STAGING_DIR_HOST)/usr/bin/phpize )
  17. $(Build/Configure/Default)
  18. endef
  19. CONFIGURE_ARGS+= \
  20. --with-php-config=$(STAGING_DIR_HOST)/usr/bin/php-config
  21. define PECLPackage
  22. define Package/php5-pecl-$(1)
  23. $(call Package/php5-pecl/Default)
  24. TITLE:=$(2)
  25. ifneq ($(3),)
  26. DEPENDS+=$(3)
  27. endif
  28. endef
  29. define Package/php5-pecl-$(1)/install
  30. $(INSTALL_DIR) $$(1)/usr/lib/php
  31. $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
  32. $(INSTALL_DIR) $$(1)/etc/php5
  33. ifeq ($(4),zend)
  34. echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini
  35. else
  36. echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini
  37. endif
  38. endef
  39. endef