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=2016-07-04
17 PKG_SOURCE_VERSION:=e1bf4356e1b513e158e1b5049147087ed6342cfd
18 PKG_MIRROR_HASH:=4994a10a9e15f71312502f8babf045da7cea18c64227b387fc2dcf64f2252f19
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))