Here comes the new UCI. Enjoy :)
[openwrt/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 PKG_NAME:=uci
12 PKG_VERSION:=0.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
17 PKG_MD5SUM:=f6340dce09f5f1552c4e03be98e64265
18
19 include $(INCLUDE_DIR)/package.mk
20
21 # set to 1 to enable debugging
22 DEBUG=
23
24 define Package/libuci
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+libuci
28 TITLE:=C library for the Unified Configuration Interface (UCI)
29 endef
30
31 define Package/uci
32 SECTION:=base
33 CATEGORY:=Base system
34 DEPENDS:=+libuci
35 TITLE:=Utility for the Unified Configuration Interface (UCI)
36 endef
37
38 define Package/uci-sh
39 SECTION:=base
40 CATEGORY:=Base system
41 DEPENDS:=@!PACKAGE_uci
42 TITLE:=Old shell/awk implementation of UCI
43 endef
44
45 define Build/Configure
46 endef
47
48 define Build/Compile
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 $(TARGET_CONFIGURE_OPTS) \
51 COPTS="$(TARGET_CFLAGS)" \
52 DEBUG="$(DEBUG)" \
53 VERSION="$(PKG_VERSION)" \
54 OS="Linux"
55 endef
56
57 define Package/libuci/install
58 $(INSTALL_DIR) $(1)/lib
59 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
60 endef
61
62 define Package/uci/install
63 $(INSTALL_DIR) $(1)/sbin
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
65 $(CP) ./files/uci/* $(1)/
66 endef
67
68 define Package/uci-sh/install
69 $(INSTALL_DIR) $(1)
70 $(CP) ./files/uci-sh/* $(1)/
71 endef
72
73 $(eval $(call BuildPackage,uci))
74 $(eval $(call BuildPackage,libuci))
75 $(eval $(call BuildPackage,uci-sh))