2 # Copyright (C) 2008-2014 OpenWrt.org
3 # Copyright (C) 2016 LEDE project
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
11 UCI_VERSION=2016-07-04
15 PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
17 PKG_REV:=e1bf4356e1b513e158e1b5049147087ed6342cfd
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_SOURCE_URL=$(LEDE_GIT)/project/uci.git
21 PKG_SOURCE_SUBDIR:=uci-$(PKG_VERSION)
22 PKG_SOURCE_VERSION:=$(PKG_REV)
28 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
32 include $(INCLUDE_DIR)/package.mk
33 include $(INCLUDE_DIR)/cmake.mk
35 # set to 1 to enable debugging
41 TITLE:=C library for the Unified Configuration Interface (UCI)
49 TITLE:=Utility for the Unified Configuration Interface (UCI)
52 define Package/libuci-lua
55 DEPENDS:=+libuci +liblua
56 TITLE:=Lua plugin for UCI
59 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
60 TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
63 -DLUAPATH=/usr/lib/lua \
64 $(if $(DEBUG),-DUCI_DEBUG=ON)
66 define Package/libuci/install
67 $(INSTALL_DIR) $(1)/lib
68 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
71 define Package/libuci-lua/install
72 $(INSTALL_DIR) $(1)/usr/lib/lua
73 $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
76 define Package/uci/install
77 $(INSTALL_DIR) $(1)/etc/uci-defaults
78 $(INSTALL_DIR) $(1)/sbin
79 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
83 define Build/InstallDev
84 $(INSTALL_DIR) $(1)/usr/include
85 $(CP) $(PKG_BUILD_DIR)/uci{,_config,_blob,map}.h $(1)/usr/include
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
88 $(CP) $(PKG_BUILD_DIR)/libucimap.a $(1)/usr/lib
91 $(eval $(call BuildPackage,uci))
92 $(eval $(call BuildPackage,libuci))
93 $(eval $(call BuildPackage,libuci-lua))