Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libubox
  3. PKG_VERSION:=2015-11-08
  4. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL:=http://git.openwrt.org/project/libubox.git
  7. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  8. PKG_SOURCE_VERSION:=10429bccd0dc5d204635e110a7a8fae7b80d16cb
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  10. PKG_MIRROR_MD5SUM:=
  11. CMAKE_INSTALL:=1
  12. PKG_LICENSE:=ISC
  13. PKG_LICENSE_FILES:=
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
  15. PKG_BUILD_DEPENDS:=lua
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/cmake.mk
  18. define Package/libubox
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. TITLE:=Basic utility library
  22. ABI_VERSION:=$(PKG_VERSION)
  23. DEPENDS:=
  24. endef
  25. define Package/libblobmsg-json
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE:=blobmsg <-> json conversion library
  29. DEPENDS:=+libjson-c +libubox
  30. endef
  31. define Package/jshn
  32. SECTION:=utils
  33. CATEGORY:=Utilities
  34. DEPENDS:=+libjson-c +libubox +libblobmsg-json
  35. TITLE:=JSON SHell Notation
  36. endef
  37. define Package/jshn/description
  38. Library for parsing and generating JSON from shell scripts
  39. endef
  40. define Package/libjson-script
  41. SECTION:=utils
  42. CATEGORY:=Utilities
  43. DEPENDS:=+libubox
  44. TITLE:=Minimalistic JSON based scripting engine
  45. endef
  46. define Package/libubox-lua
  47. SECTION:=libs
  48. CATEGORY:=Libraries
  49. DEPENDS:=+libubox +liblua
  50. TITLE:=Lua binding for the OpenWrt Basic utility library
  51. endef
  52. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
  53. CMAKE_OPTIONS = \
  54. -DLUAPATH=/usr/lib/lua
  55. define Package/libubox/install
  56. $(INSTALL_DIR) $(1)/lib/
  57. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so $(1)/lib/
  58. endef
  59. define Package/libblobmsg-json/install
  60. $(INSTALL_DIR) $(1)/lib/
  61. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so $(1)/lib/
  62. endef
  63. define Package/jshn/install
  64. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/libubox
  65. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jshn $(1)/usr/bin
  66. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libubox/jshn.sh $(1)/usr/share/libubox
  67. endef
  68. define Package/libjson-script/install
  69. $(INSTALL_DIR) $(1)/lib/
  70. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so $(1)/lib/
  71. endef
  72. define Package/libubox-lua/install
  73. $(INSTALL_DIR) $(1)/usr/lib/lua
  74. $(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
  75. endef
  76. $(eval $(call BuildPackage,libubox))
  77. $(eval $(call BuildPackage,libblobmsg-json))
  78. $(eval $(call BuildPackage,jshn))
  79. $(eval $(call BuildPackage,libjson-script))
  80. $(eval $(call BuildPackage,libubox-lua))