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