1
0

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)/ubus.git
  6. PKG_SOURCE_DATE:=2019-12-27
  7. PKG_SOURCE_VERSION:=041c9d1c052bb4936fd03240f7d0dd64aedda972
  8. PKG_MIRROR_HASH:=7febbe78dd178d8d7ccacff54c00fb2d19a53624005920db8cd85236f54f8324
  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:=20191227
  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))