source: trunk/package/uci/Makefile @ 11354

Last change on this file since 11354 was 11354, checked in by nbd, 9 years ago

upgrade uci to 0.4.1
improves uci.foreach and uci.get_all in the lua binding
no longer records changes for uci set with oldval == newval

File size: 2.2 KB
Line 
1#
2# Copyright (C) 2008 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# $Id$
8
9include $(TOPDIR)/rules.mk
10
11UCI_VERSION=0.4
12UCI_RELEASE=1
13
14PKG_NAME:=uci
15PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
16PKG_RELEASE:=1
17
18PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
20PKG_MD5SUM:=381b5da987b206b3ab5d666785fbb833
21
22include $(INCLUDE_DIR)/package.mk
23
24# set to 1 to enable debugging
25DEBUG=
26
27define Package/libuci
28  SECTION:=libs
29  CATEGORY:=Libraries
30  TITLE:=C library for the Unified Configuration Interface (UCI)
31endef
32
33define Package/uci
34  SECTION:=base
35  CATEGORY:=Base system
36  DEPENDS:=+libuci
37  TITLE:=Utility for the Unified Configuration Interface (UCI)
38endef
39
40define Package/uci-sh
41  SECTION:=base
42  CATEGORY:=Base system
43  DEPENDS:=@!PACKAGE_uci
44  TITLE:=Old shell/awk implementation of UCI
45endef
46
47define Package/libuci-lua
48  SECTION=libs
49  CATEGORY=Libraries
50  DEPENDS:=+libuci +lua
51  TITLE:=Lua plugin for UCI
52endef
53
54define Build/Configure
55endef
56
57UCI_MAKEOPTS = \
58                $(TARGET_CONFIGURE_OPTS) \
59                COPTS="$(TARGET_CFLAGS)" \
60                DEBUG="$(DEBUG)" \
61                VERSION="$(UCI_VERSION)" \
62                CPPFLAGS="-I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
63                OS="Linux"
64
65define Build/Compile
66        $(MAKE) -C $(PKG_BUILD_DIR) $(UCI_MAKEOPTS)
67        $(MAKE) -C $(PKG_BUILD_DIR)/lua $(UCI_MAKEOPTS)
68endef
69
70define Package/libuci/install
71        $(INSTALL_DIR) $(1)/lib
72        $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
73endef
74
75define Package/libuci-lua/install
76        $(INSTALL_DIR) $(1)/usr/lib/lua
77        $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
78endef
79
80define Package/uci/install
81        $(INSTALL_DIR) $(1)/sbin
82        $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
83        $(CP) ./files/uci/* $(1)/
84endef
85
86define Package/uci-sh/install
87        $(INSTALL_DIR) $(1)
88        $(CP) ./files/uci-sh/* $(1)/
89endef
90
91define Build/InstallDev
92        $(INSTALL_DIR) $(1)/usr/include
93        $(CP) $(PKG_BUILD_DIR)/uci{,_config}.h $(1)/usr/include
94        $(INSTALL_DIR) $(1)/usr/lib
95        $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
96endef
97
98$(eval $(call BuildPackage,uci))
99$(eval $(call BuildPackage,libuci))
100$(eval $(call BuildPackage,libuci-lua))
101$(eval $(call BuildPackage,uci-sh))
Note: See TracBrowser for help on using the repository browser.