uci: update to latest git HEAD
[openwrt/staging/wigyori.git] / package / system / uci / Makefile
1 #
2 # Copyright (C) 2008-2014 OpenWrt.org
3 # Copyright (C) 2016 LEDE project
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=uci
12 PKG_RELEASE:=3
13
14 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_DATE=2020-04-24
17 PKG_SOURCE_VERSION:=ec8d3233948603485e1b97384113fac9f1bab5d6
18 PKG_MIRROR_HASH:=b3cdc66a8ec4f05a102ce5520a3f8ff69ca4a49930c5bb01065467ef68f0808b
19
20 PKG_LICENSE:=LGPL-2.1
21 PKG_LICENSE_FILES:=
22
23 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
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 DEPENDS:=+libubox
38 ABI_VERSION:=20130104
39 endef
40
41 define Package/uci
42 SECTION:=base
43 CATEGORY:=Base system
44 DEPENDS:=+libuci
45 TITLE:=Utility for the Unified Configuration Interface (UCI)
46 endef
47
48 define Package/libuci-lua
49 SECTION=libs
50 CATEGORY=Libraries
51 DEPENDS:=+libuci +liblua
52 TITLE:=Lua plugin for UCI
53 endef
54
55 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
56 TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
57
58 CMAKE_OPTIONS = \
59 -DLUAPATH=/usr/lib/lua \
60 $(if $(DEBUG),-DUCI_DEBUG=ON)
61
62 define Package/libuci/install
63 $(INSTALL_DIR) $(1)/lib
64 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
65 endef
66
67 define Package/libuci-lua/install
68 $(INSTALL_DIR) $(1)/usr/lib/lua
69 $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
70 endef
71
72 define Package/uci/install
73 $(INSTALL_DIR) $(1)/etc/uci-defaults
74 $(INSTALL_DIR) $(1)/sbin
75 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
76 $(CP) ./files/* $(1)/
77 endef
78
79 define Build/InstallDev
80 $(INSTALL_DIR) $(1)/usr/include
81 $(CP) $(PKG_BUILD_DIR)/uci{,_config,_blob,map}.h $(1)/usr/include
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
84 $(CP) $(PKG_BUILD_DIR)/libucimap.a $(1)/usr/lib
85 endef
86
87 $(eval $(call BuildPackage,uci))
88 $(eval $(call BuildPackage,libuci))
89 $(eval $(call BuildPackage,libuci-lua))