Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ubus
  3. PKG_RELEASE:=1
  4. PKG_SOURCE_PROTO:=git
  5. PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
  6. PKG_SOURCE_DATE:=2018-10-06
  7. PKG_SOURCE_VERSION:=221ce7e7ff1bd1a0c9995fa9d32f58e865f7207f
  8. PKG_MIRROR_HASH:=e6ab3f009688740eb6d7a1857df59a6ba10ae8ae0fac78ae0fd6672f71c02dce
  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:=libreCMC RPC client utility
  20. endef
  21. define Package/ubusd
  22. SECTION:=base
  23. CATEGORY:=Base system
  24. TITLE:=libreCMC 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:=libreCMC 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 libreCMC RPC client
  39. endef
  40. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -flto
  41. TARGET_LDFLAGS += -flto
  42. CMAKE_OPTIONS = \
  43. -DLUAPATH=/usr/lib/lua
  44. define Package/ubus/install
  45. $(INSTALL_DIR) $(1)/bin
  46. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ubus $(1)/bin/
  47. endef
  48. define Package/ubusd/install
  49. $(INSTALL_DIR) $(1)/sbin
  50. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ubusd $(1)/sbin/
  51. endef
  52. define Package/libubus/install
  53. $(INSTALL_DIR) $(1)/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/lib/
  55. endef
  56. define Package/libubus-lua/install
  57. $(INSTALL_DIR) $(1)/usr/lib/lua
  58. $(CP) $(PKG_BUILD_DIR)/lua/ubus.so $(1)/usr/lib/lua/
  59. endef
  60. $(eval $(call BuildPackage,libubus))
  61. $(eval $(call BuildPackage,libubus-lua))
  62. $(eval $(call BuildPackage,ubus))
  63. $(eval $(call BuildPackage,ubusd))