2
0

Makefile 2.3 KB

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