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
14 PKG_SOURCE_URL=$(LEDE_GIT)/project/uci.git
16 PKG_SOURCE_DATE=2017-04-12
17 PKG_SOURCE_VERSION:=c4df32b386c7bb29568140d135d7315e76c934b7
18 PKG_MIRROR_HASH:=88abfe828f164666e3d3c90141449d9c8f622d32b29df135b1b72fcadbb2cb34
23 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/cmake.mk
30 # set to 1 to enable debugging
36 TITLE:=C library for the Unified Configuration Interface (UCI)
44 TITLE:=Utility for the Unified Configuration Interface (UCI)
47 define Package/libuci-lua
50 DEPENDS:=+libuci +liblua
51 TITLE:=Lua plugin for UCI
54 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
55 TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
58 -DLUAPATH=/usr/lib/lua \
59 $(if $(DEBUG),-DUCI_DEBUG=ON)
61 define Package/libuci/install
62 $(INSTALL_DIR) $(1)/lib
63 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
66 define Package/libuci-lua/install
67 $(INSTALL_DIR) $(1)/usr/lib/lua
68 $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
71 define Package/uci/install
72 $(INSTALL_DIR) $(1)/etc/uci-defaults
73 $(INSTALL_DIR) $(1)/sbin
74 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
78 define Build/InstallDev
79 $(INSTALL_DIR) $(1)/usr/include
80 $(CP) $(PKG_BUILD_DIR)/uci{,_config,_blob,map}.h $(1)/usr/include
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
83 $(CP) $(PKG_BUILD_DIR)/libucimap.a $(1)/usr/lib
86 $(eval $(call BuildPackage,uci))
87 $(eval $(call BuildPackage,libuci))
88 $(eval $(call BuildPackage,libuci-lua))