Add tusb6010 package and let tahvo-usb select it
[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
8 include $(TOPDIR)/rules.mk
9
10 UCI_VERSION=2011-01-19
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:=a5eb996e0f04d911ff61479508bbc3e17b16ff0c
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
24 include $(INCLUDE_DIR)/package.mk
25
26 # set to 1 to enable debugging
27 DEBUG=
28
29 define Package/libuci
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=C library for the Unified Configuration Interface (UCI)
33 endef
34
35 define Package/uci
36 SECTION:=base
37 CATEGORY:=Base system
38 DEPENDS:=+libuci
39 TITLE:=Utility for the Unified Configuration Interface (UCI)
40 endef
41
42 define Package/ucitrigger
43 SECTION:=base
44 CATEGORY:=Base system
45 DEPENDS:=+libuci-lua +lua
46 TITLE:=Automatic triggers for applying system config changes
47 endef
48
49 define Package/libuci-lua
50 SECTION=libs
51 CATEGORY=Libraries
52 DEPENDS:=+libuci +liblua
53 TITLE:=Lua plugin for UCI
54 endef
55
56 define Build/Configure
57 endef
58
59 UCI_MAKEOPTS = \
60 $(TARGET_CONFIGURE_OPTS) \
61 COPTS="$(TARGET_CFLAGS)" \
62 DEBUG="$(DEBUG)" \
63 VERSION="$(UCI_VERSION)" \
64 CPPFLAGS="-I$(PKG_BUILD_DIR) $(TARGET_CPPFLAGS)" \
65 FPIC="$(FPIC)" \
66 OS="Linux"
67
68 define Build/Compile
69 $(MAKE) -C $(PKG_BUILD_DIR) $(UCI_MAKEOPTS)
70 $(MAKE) -C $(PKG_BUILD_DIR)/lua $(UCI_MAKEOPTS)
71 $(MAKE) -C $(PKG_BUILD_DIR)/trigger $(UCI_MAKEOPTS) \
72 LIBS="$(TARGET_LDFLAGS) -L$(PKG_BUILD_DIR) -luci -llua -lcrypt -lm"
73 endef
74
75 define Package/libuci/install
76 $(INSTALL_DIR) $(1)/lib
77 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
78 endef
79
80 define Package/libuci-lua/install
81 $(INSTALL_DIR) $(1)/usr/lib/lua
82 $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
83 endef
84
85 define Package/ucitrigger/install
86 $(INSTALL_DIR) $(1)/usr/lib/lua/uci $(1)/lib/config/trigger $(1)/usr/sbin
87 $(INSTALL_DATA) ./trigger/lib/trigger.lua $(1)/usr/lib/lua/uci/
88 $(INSTALL_DATA) ./trigger/modules/*.lua $(1)/lib/config/trigger/
89 $(INSTALL_DATA) $(PKG_BUILD_DIR)/trigger/uci_trigger.so $(1)/usr/lib/
90 $(INSTALL_BIN) ./trigger/apply_config $(1)/usr/sbin/
91 endef
92
93 define Package/uci/install
94 $(INSTALL_DIR) $(1)/etc/uci-defaults
95 $(INSTALL_DIR) $(1)/sbin
96 $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
97 $(CP) ./files/* $(1)/
98 endef
99
100 define Build/InstallDev
101 $(INSTALL_DIR) $(1)/usr/include
102 $(CP) $(PKG_BUILD_DIR)/uci{,_config,map}.h $(1)/usr/include
103 $(INSTALL_DIR) $(1)/usr/lib
104 $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
105 $(CP) $(PKG_BUILD_DIR)/libuci.a $(1)/usr/lib
106 endef
107
108 $(eval $(call BuildPackage,uci))
109 $(eval $(call BuildPackage,libuci))
110 $(eval $(call BuildPackage,libuci-lua))
111 $(eval $(call BuildPackage,ucitrigger))
This page took 0.041187 seconds and 5 git commands to generate.