616f46fa46244f3950444ebc14bf313530c4e871
[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 TITLE:=C library for the Unified Configuration Interface (UCI)
28 endef
29
30 define Package/uci
31 SECTION:=base
32 CATEGORY:=Base system
33 DEPENDS:=+libuci
34 TITLE:=Utility for the Unified Configuration Interface (UCI)
35 endef
36
37 define Package/uci-sh
38 SECTION:=base
39 CATEGORY:=Base system
40 DEPENDS:=@!PACKAGE_uci
41 TITLE:=Old shell/awk implementation of UCI
42 endef
43
44 define Build/Configure
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 $(TARGET_CONFIGURE_OPTS) \
50 COPTS="$(TARGET_CFLAGS)" \
51 DEBUG="$(DEBUG)" \
52 VERSION="$(PKG_VERSION)" \
53 OS="Linux"
54 endef
55
56 define Package/libuci/install
57 $(INSTALL_DIR) $(1)/lib
58 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
59 endef
60
61 define Package/uci/install
62 $(INSTALL_DIR) $(1)/sbin
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
64 $(CP) ./files/uci/* $(1)/
65 endef
66
67 define Package/uci-sh/install
68 $(INSTALL_DIR) $(1)
69 $(CP) ./files/uci-sh/* $(1)/
70 endef
71
72 $(eval $(call BuildPackage,uci))
73 $(eval $(call BuildPackage,libuci))
74 $(eval $(call BuildPackage,uci-sh))