uci: update to latest version, adds uci<->blobmsg conversion code from netifd
[openwrt/svn-archive/archive.git] / package / uci / Makefile
1 #
2 # Copyright (C) 2008-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 UCI_VERSION=2013-06-10
11 UCI_RELEASE=1
12
13 PKG_NAME:=uci
14 PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
15 PKG_RELEASE:=1
16 PKG_REV:=9d8e1fe4857c1c3e8f1a2e2ae59ef9c4790adb39
17
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)
22 PKG_SOURCE_PROTO:=git
23
24 PKG_LICENSE:=LGPLv2.1 GPLv2
25 PKG_LICENSE_FILES:=
26
27 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
28
29 PKG_BUILD_PARALLEL:=0
30
31 include $(INCLUDE_DIR)/package.mk
32 include $(INCLUDE_DIR)/cmake.mk
33
34 # set to 1 to enable debugging
35 DEBUG=
36
37 define Package/libuci
38 SECTION:=libs
39 CATEGORY:=Libraries
40 TITLE:=C library for the Unified Configuration Interface (UCI)
41 DEPENDS:=+libubox
42 endef
43
44 define Package/uci
45 SECTION:=base
46 CATEGORY:=Base system
47 DEPENDS:=+libuci
48 TITLE:=Utility for the Unified Configuration Interface (UCI)
49 endef
50
51 define Package/libuci-lua
52 SECTION=libs
53 CATEGORY=Libraries
54 DEPENDS:=+libuci +liblua
55 TITLE:=Lua plugin for UCI
56 endef
57
58 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
59 TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
60
61 CMAKE_OPTIONS = \
62 -DLUAPATH=/usr/lib/lua \
63 $(if $(DEBUG),-DUCI_DEBUG=ON)
64
65 define Package/libuci/install
66 $(INSTALL_DIR) $(1)/lib
67 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
68 endef
69
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/
73 endef
74
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/
79 $(CP) ./files/* $(1)/
80 endef
81
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
88 endef
89
90 $(eval $(call BuildPackage,uci))
91 $(eval $(call BuildPackage,libuci))
92 $(eval $(call BuildPackage,libuci-lua))