2 # Copyright (C) 2008-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
10 UCI_VERSION=2013-06-11
14 PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
16 PKG_REV:=c9c9d5cb085acc58b6579ace83fb79c085a9db27
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_SOURCE_URL:=git://nbd.name/uci.git
20 PKG_SOURCE_SUBDIR:=uci-$(PKG_VERSION)
21 PKG_SOURCE_VERSION:=$(PKG_REV)
24 PKG_LICENSE:=LGPLv2.1 GPLv2
27 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
31 include $(INCLUDE_DIR)/package.mk
32 include $(INCLUDE_DIR)/cmake.mk
34 # set to 1 to enable debugging
40 TITLE:=C library for the Unified Configuration Interface (UCI)
48 TITLE:=Utility for the Unified Configuration Interface (UCI)
51 define Package/libuci-lua
54 DEPENDS:=+libuci +liblua
55 TITLE:=Lua plugin for UCI
58 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
59 TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
62 -DLUAPATH=/usr/lib/lua \
63 $(if $(DEBUG),-DUCI_DEBUG=ON)
65 define Package/libuci/install
66 $(INSTALL_DIR) $(1)/lib
67 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
70 define Package/libuci-lua/install
71 $(INSTALL_DIR) $(1)/usr/lib/lua
72 $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
75 define Package/uci/install
76 $(INSTALL_DIR) $(1)/etc/uci-defaults
77 $(INSTALL_DIR) $(1)/sbin
78 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
82 define Build/InstallDev
83 $(INSTALL_DIR) $(1)/usr/include
84 $(CP) $(PKG_BUILD_DIR)/uci{,_config,_blob,map}.h $(1)/usr/include
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
87 $(CP) $(PKG_BUILD_DIR)/libucimap.a $(1)/usr/lib
90 $(eval $(call BuildPackage,uci))
91 $(eval $(call BuildPackage,libuci))
92 $(eval $(call BuildPackage,libuci-lua))