Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ubus
  3. PKG_RELEASE:=1
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(LEDE_GIT)/project/ubus.git
  6. PKG_SOURCE_DATE:=2017-02-18
  7. PKG_SOURCE_VERSION:=34c6e818e431cc53478a0f7c7c1eca07d194d692
  8. PKG_MIRROR_HASH:=fc4f1121faa4f5b8fa52ee25460b98b2e60e7d245aefa70e7f76c56ce5628fd5
  9. CMAKE_INSTALL:=1
  10. PKG_LICENSE:=LGPL-2.1
  11. PKG_LICENSE_FILES:=
  12. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/cmake.mk
  15. define Package/ubus
  16. SECTION:=base
  17. CATEGORY:=Base system
  18. DEPENDS:=+libubus +libblobmsg-json +ubusd
  19. TITLE:=OpenWrt RPC client utility
  20. endef
  21. define Package/ubusd
  22. SECTION:=base
  23. CATEGORY:=Base system
  24. TITLE:=OpenWrt RPC daemon
  25. DEPENDS:=+libubox +libblobmsg-json
  26. endef
  27. define Package/libubus
  28. SECTION:=libs
  29. CATEGORY:=Libraries
  30. DEPENDS:=+libubox
  31. ABI_VERSION:=$(PKG_VERSION)
  32. TITLE:=OpenWrt RPC client library
  33. endef
  34. define Package/libubus-lua
  35. SECTION:=libs
  36. CATEGORY:=Libraries
  37. DEPENDS:=+libubus +liblua
  38. TITLE:=Lua binding for the OpenWrt RPC client
  39. endef
  40. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
  41. CMAKE_OPTIONS = \
  42. -DLUAPATH=/usr/lib/lua
  43. define Package/ubus/install
  44. $(INSTALL_DIR) $(1)/bin
  45. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ubus $(1)/bin/
  46. endef
  47. define Package/ubusd/install
  48. $(INSTALL_DIR) $(1)/sbin
  49. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ubusd $(1)/sbin/
  50. endef
  51. define Package/libubus/install
  52. $(INSTALL_DIR) $(1)/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/lib/
  54. endef
  55. define Package/libubus-lua/install
  56. $(INSTALL_DIR) $(1)/usr/lib/lua
  57. $(CP) $(PKG_BUILD_DIR)/lua/ubus.so $(1)/usr/lib/lua/
  58. endef
  59. $(eval $(call BuildPackage,libubus))
  60. $(eval $(call BuildPackage,libubus-lua))
  61. $(eval $(call BuildPackage,ubus))
  62. $(eval $(call BuildPackage,ubusd))