[scripts] env: colorize git output
[openwrt.git] / package / uci / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 UCI_VERSION=2011-11-14
11 UCI_RELEASE=1
12
13 PKG_NAME:=uci
14 PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
15 PKG_RELEASE:=1
16 PKG_REV:=7289b2d69aaffa9299b47aaaa0da1e9969ace6c1
17
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_SOURCE_URL:=git://nbd.name/uci.git
20 PKG_SOURCE_SUBDIR:=uci-$(PKG_VERSION)
21 PKG_SOURCE_VERSION:=$(PKG_REV)
22 PKG_SOURCE_PROTO:=git
23 PKG_MIRROR_MD5SUM:=74b0ab930321c4f85f220ff3852e210a
24
25 PKG_BUILD_PARALLEL:=0
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/cmake.mk
29
30 # set to 1 to enable debugging
31 DEBUG=
32
33 define Package/libuci
34 SECTION:=libs
35 CATEGORY:=Libraries
36 TITLE:=C library for the Unified Configuration Interface (UCI)
37 endef
38
39 define Package/uci
40 SECTION:=base
41 CATEGORY:=Base system
42 DEPENDS:=+libuci
43 TITLE:=Utility for the Unified Configuration Interface (UCI)
44 endef
45
46 define Package/libuci-lua
47 SECTION=libs
48 CATEGORY=Libraries
49 DEPENDS:=+libuci +liblua
50 TITLE:=Lua plugin for UCI
51 endef
52
53 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
54 TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
55
56 CMAKE_OPTIONS = \
57 -DLUAPATH=/usr/lib/lua \
58 $(if $(DEBUG),-DUCI_DEBUG=ON)
59
60 define Package/libuci/install
61 $(INSTALL_DIR) $(1)/lib
62 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
63 endef
64
65 define Package/libuci-lua/install
66 $(INSTALL_DIR) $(1)/usr/lib/lua
67 $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
68 endef
69
70 define 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)/
75 endef
76
77 define 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
84 endef
85
86 $(eval $(call BuildPackage,uci))
87 $(eval $(call BuildPackage,libuci))
88 $(eval $(call BuildPackage,libuci-lua))
This page took 0.038265 seconds and 5 git commands to generate.