upgrade to uci 0.4.4 (fixes a stupid bug, thx Frédéric Moulins)
[openwrt.git] / package / uci / Makefile
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
9 include $(TOPDIR)/rules.mk
10
11 UCI_VERSION=0.4
12 UCI_RELEASE=4
13
14 PKG_NAME:=uci
15 PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
16 PKG_RELEASE:=1
17
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
20 PKG_MD5SUM:=1ce8e92e3aa023763e8f4da91a70563d
21
22 include $(INCLUDE_DIR)/package.mk
23
24 # set to 1 to enable debugging
25 DEBUG=
26
27 define Package/libuci
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=C library for the Unified Configuration Interface (UCI)
31 endef
32
33 define Package/uci
34 SECTION:=base
35 CATEGORY:=Base system
36 DEPENDS:=+libuci
37 TITLE:=Utility for the Unified Configuration Interface (UCI)
38 endef
39
40 define Package/uci-sh
41 SECTION:=base
42 CATEGORY:=Base system
43 DEPENDS:=@!PACKAGE_uci
44 TITLE:=Old shell/awk implementation of UCI
45 endef
46
47 define Package/libuci-lua
48 SECTION=libs
49 CATEGORY=Libraries
50 DEPENDS:=+libuci +lua
51 TITLE:=Lua plugin for UCI
52 endef
53
54 define Build/Configure
55 endef
56
57 UCI_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
65 define Build/Compile
66 $(MAKE) -C $(PKG_BUILD_DIR) $(UCI_MAKEOPTS)
67 $(MAKE) -C $(PKG_BUILD_DIR)/lua $(UCI_MAKEOPTS)
68 endef
69
70 define Package/libuci/install
71 $(INSTALL_DIR) $(1)/lib
72 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
73 endef
74
75 define Package/libuci-lua/install
76 $(INSTALL_DIR) $(1)/usr/lib/lua
77 $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
78 endef
79
80 define Package/uci/install
81 $(INSTALL_DIR) $(1)/etc/uci-defaults
82 $(INSTALL_DIR) $(1)/sbin
83 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
84 $(CP) ./files/uci/* $(1)/
85 endef
86
87 define Package/uci-sh/install
88 $(INSTALL_DIR) $(1)
89 $(CP) ./files/uci-sh/* $(1)/
90 endef
91
92 define Build/InstallDev
93 $(INSTALL_DIR) $(1)/usr/include
94 $(CP) $(PKG_BUILD_DIR)/uci{,_config}.h $(1)/usr/include
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
97 endef
98
99 $(eval $(call BuildPackage,uci))
100 $(eval $(call BuildPackage,libuci))
101 $(eval $(call BuildPackage,libuci-lua))
102 $(eval $(call BuildPackage,uci-sh))
This page took 0.06543 seconds and 5 git commands to generate.