Root/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
8include $(TOPDIR)/rules.mk
9
10UCI_VERSION=2012-11-09
11UCI_RELEASE=1
12
13PKG_NAME:=uci
14PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
15PKG_RELEASE:=1
16PKG_REV:=e81961bde820a84bf67ccd5e40b29f7952dd1f77
17
18PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19PKG_SOURCE_URL:=git://nbd.name/uci.git
20PKG_SOURCE_SUBDIR:=uci-$(PKG_VERSION)
21PKG_SOURCE_VERSION:=$(PKG_REV)
22PKG_SOURCE_PROTO:=git
23PKG_MIRROR_MD5SUM:=b6a82d18e6b4e40847a52336589e666b
24
25PKG_LICENSE:=LGPLv2.1 GPLv2
26PKG_LICENSE_FILES:=
27
28PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
29
30PKG_BUILD_PARALLEL:=1
31
32include $(INCLUDE_DIR)/package.mk
33include $(INCLUDE_DIR)/cmake.mk
34
35# set to 1 to enable debugging
36DEBUG=
37
38define Package/libuci
39  SECTION:=libs
40  CATEGORY:=Libraries
41  TITLE:=C library for the Unified Configuration Interface (UCI)
42endef
43
44define Package/uci
45  SECTION:=base
46  CATEGORY:=Base system
47  DEPENDS:=+libuci
48  TITLE:=Utility for the Unified Configuration Interface (UCI)
49endef
50
51define Package/libuci-lua
52  SECTION=libs
53  CATEGORY=Libraries
54  DEPENDS:=+libuci +liblua
55  TITLE:=Lua plugin for UCI
56endef
57
58TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
59TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
60
61CMAKE_OPTIONS = \
62    -DLUAPATH=/usr/lib/lua \
63    $(if $(DEBUG),-DUCI_DEBUG=ON)
64
65define Package/libuci/install
66    $(INSTALL_DIR) $(1)/lib
67    $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
68endef
69
70define Package/libuci-lua/install
71    $(INSTALL_DIR) $(1)/usr/lib/lua
72    $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
73endef
74
75define Package/uci/install
76    $(INSTALL_DIR) $(1)/etc/uci-defaults
77    $(INSTALL_DIR) $(1)/sbin
78    $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
79    $(CP) ./files/* $(1)/
80endef
81
82define Build/InstallDev
83    $(INSTALL_DIR) $(1)/usr/include
84    $(CP) $(PKG_BUILD_DIR)/uci{,_config,map}.h $(1)/usr/include
85    $(INSTALL_DIR) $(1)/usr/lib
86    $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
87    $(CP) $(PKG_BUILD_DIR)/libuci.a $(1)/usr/lib
88    $(CP) $(PKG_BUILD_DIR)/libucimap.a $(1)/usr/lib
89endef
90
91$(eval $(call BuildPackage,uci))
92$(eval $(call BuildPackage,libuci))
93$(eval $(call BuildPackage,libuci-lua))
94

Archive Download this file



interactive