source: trunk/package/uci/Makefile @ 30711

Last change on this file since 30711 was 30711, checked in by jow, 5 years ago

[package] uci: update to git head, reduces quotations in exported config files and fixes delta list handling in the Lua binding

File size: 2.1 KB
Line 
1#
2# Copyright (C) 2008-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10UCI_VERSION=2012-02-24
11UCI_RELEASE=1
12
13PKG_NAME:=uci
14PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
15PKG_RELEASE:=1
16PKG_REV:=d3722382bdd467d1c705911450120be75426406f
17
18PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19PKG_SOURCE_URL:=git://nbd.name/uci.git
20PKG_SOURCE_SUBDIR:=uci-$(PKG_VERSION)
21PKG_SOURCE_VERSION:=$(PKG_REV)
22PKG_SOURCE_PROTO:=git
23PKG_MIRROR_MD5SUM:=476039f871b69d756f3b04498130c27e
24
25PKG_BUILD_PARALLEL:=0
26
27include $(INCLUDE_DIR)/package.mk
28include $(INCLUDE_DIR)/cmake.mk
29
30# set to 1 to enable debugging
31DEBUG=
32
33define Package/libuci
34  SECTION:=libs
35  CATEGORY:=Libraries
36  TITLE:=C library for the Unified Configuration Interface (UCI)
37endef
38
39define Package/uci
40  SECTION:=base
41  CATEGORY:=Base system
42  DEPENDS:=+libuci
43  TITLE:=Utility for the Unified Configuration Interface (UCI)
44endef
45
46define Package/libuci-lua
47  SECTION=libs
48  CATEGORY=Libraries
49  DEPENDS:=+libuci +liblua
50  TITLE:=Lua plugin for UCI
51endef
52
53TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
54TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
55
56CMAKE_OPTIONS = \
57        -DLUAPATH=/usr/lib/lua \
58        $(if $(DEBUG),-DUCI_DEBUG=ON)
59
60define Package/libuci/install
61        $(INSTALL_DIR) $(1)/lib
62        $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
63endef
64
65define Package/libuci-lua/install
66        $(INSTALL_DIR) $(1)/usr/lib/lua
67        $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
68endef
69
70define Package/uci/install
71        $(INSTALL_DIR) $(1)/etc/uci-defaults
72        $(INSTALL_DIR) $(1)/sbin
73        $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
74        $(CP) ./files/* $(1)/
75endef
76
77define Build/InstallDev
78        $(INSTALL_DIR) $(1)/usr/include
79        $(CP) $(PKG_BUILD_DIR)/uci{,_config,map}.h $(1)/usr/include
80        $(INSTALL_DIR) $(1)/usr/lib
81        $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
82        $(CP) $(PKG_BUILD_DIR)/libuci.a $(1)/usr/lib
83        $(CP) $(PKG_BUILD_DIR)/libucimap.a $(1)/usr/lib
84endef
85
86$(eval $(call BuildPackage,uci))
87$(eval $(call BuildPackage,libuci))
88$(eval $(call BuildPackage,libuci-lua))
Note: See TracBrowser for help on using the repository browser.