Makefile 1.8 KB

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