nodogsplash: Release 4.0.0 (#484)
[feed/routing.git] / olsrd / Makefile
1 #
2 # Copyright (C) 2009-2016 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 PKG_NAME:=olsrd
11 PKG_VERSION:=0.9.7
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://github.com/OLSR/olsrd.git
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_VERSION:=v0.9.7
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19
20 PKG_BUILD_PARALLEL:=0
21 PKG_LICENSE:=BSD-3-Clause
22
23 include $(INCLUDE_DIR)/package.mk
24
25 TARGET_CFLAGS += $(FPIC)
26
27 define Package/olsrd/template
28 SECTION:=net
29 CATEGORY:=Network
30 SUBMENU:=Routing and Redirection
31 MAINTAINER:=Saverio Proto <zioproto@gmail.com>
32 TITLE:=OLSR (Optimized Link State Routing) daemon
33 URL:=http://www.olsr.org/
34 endef
35
36 define Package/olsrd
37 $(call Package/olsrd/template)
38 MENU:=1
39 DEPENDS:=+libpthread
40 endef
41
42 define Package/olsrd/conffiles
43 /etc/config/olsrd
44 /etc/config/olsrd6
45 endef
46
47 define Package/olsrd-mod-arprefresh
48 $(call Package/olsrd/template)
49 DEPENDS:=olsrd
50 TITLE:=Kernel ARP cache refresh plugin
51 endef
52
53 define Package/olsrd-mod-dot-draw
54 $(call Package/olsrd/template)
55 DEPENDS:=olsrd
56 TITLE:=Dot topology information plugin
57 endef
58
59 define Package/olsrd-mod-bmf
60 $(call Package/olsrd/template)
61 DEPENDS:=olsrd +kmod-tun
62 TITLE:=Basic multicast forwarding plugin
63 endef
64
65 define Package/olsrd-mod-dyn-gw
66 $(call Package/olsrd/template)
67 DEPENDS:=olsrd
68 TITLE:=Dynamic internet gateway plugin
69 endef
70
71 define Package/olsrd-mod-dyn-gw-plain
72 $(call Package/olsrd/template)
73 DEPENDS:=olsrd
74 TITLE:=Dynamic internet gateway plain plugin
75 endef
76
77 define Package/olsrd-mod-httpinfo
78 $(call Package/olsrd/template)
79 DEPENDS:=olsrd
80 TITLE:=Small informative web server plugin
81 endef
82
83 define Package/olsrd-mod-jsoninfo
84 $(call Package/olsrd/template)
85 DEPENDS:=olsrd
86 TITLE:=Small informative plugin with JSON output
87 endef
88
89 define Package/olsrd-mod-netjson
90 $(call Package/olsrd/template)
91 DEPENDS:=olsrd
92 TITLE:=netjson plugin with JSON output
93 endef
94
95 define Package/olsrd-mod-mdns
96 $(call Package/olsrd/template)
97 DEPENDS:=olsrd
98 TITLE:=MDNS/Zeroconf/Bonjour packet distribution
99 endef
100
101 define Package/olsrd-mod-nameservice
102 $(call Package/olsrd/template)
103 DEPENDS:=olsrd
104 TITLE:=Lightweight hostname resolver plugin
105 endef
106
107 define Package/olsrd-mod-p2pd
108 $(call Package/olsrd/template)
109 DEPENDS:=olsrd
110 TITLE:=Peer to Peer Discovery plugin
111 endef
112
113 define Package/olsrd-mod-pgraph
114 $(call Package/olsrd/template)
115 DEPENDS:=olsrd
116 TITLE:=output network topology for pgraph
117 endef
118
119 define Package/olsrd-mod-pud
120 $(call Package/olsrd/template)
121 DEPENDS:=olsrd +libgps
122 TITLE:=Position Update Distribution plugin
123 endef
124
125 define Package/olsrd-mod-quagga
126 $(call Package/olsrd/template)
127 DEPENDS:=olsrd
128 TITLE:=Quagga plugin
129 endef
130
131 define Package/olsrd-mod-secure
132 $(call Package/olsrd/template)
133 DEPENDS:=olsrd
134 TITLE:=Message signing plugin to secure routing domain
135 endef
136
137 define Package/olsrd-mod-sgwdynspeed
138 $(call Package/olsrd/template)
139 DEPENDS:=olsrd
140 TITLE:=Smart Gateway dynamic speed plugin
141 endef
142
143 define Package/olsrd-mod-txtinfo
144 $(call Package/olsrd/template)
145 DEPENDS:=olsrd
146 TITLE:=Small informative web server plugin
147 endef
148
149 define Package/olsrd-mod-watchdog
150 $(call Package/olsrd/template)
151 DEPENDS:=olsrd
152 TITLE:=Watchdog plugin
153 endef
154
155 define Package/olsrd-mod-pud/conffiles
156 /etc/olsrd.d/olsrd.pud.position.conf
157 endef
158
159 define Package/olsrd-mod-secure/conffiles
160 /etc/olsrd.d/olsrd_secure_key
161 endef
162
163 define Package/olsrd-mod-sgwdynspeed/conffiles
164 /etc/olsrd.d/olsrd.sgw.speed.conf
165 endef
166
167 MAKE_FLAGS+= \
168 NO_DEBUG_MESSAGES=1 \
169 OS="linux" \
170 DESTDIR="$(PKG_INSTALL_DIR)" \
171 STRIP="true" \
172 INSTALL_LIB="true" \
173 SUBDIRS="arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo jsoninfo netjson mdns nameservice p2pd pgraph pud quagga secure sgwdynspeed txtinfo watchdog"
174
175 define Build/Compile
176 $(call Build/Compile/Default,all)
177 $(call Build/Compile/Default,libs)
178 endef
179
180 define Package/olsrd/install
181 $(INSTALL_DIR) $(1)/lib/functions
182 $(INSTALL_DATA) ./files/olsrd.init $(1)/lib/functions/olsrd.sh
183 $(INSTALL_DIR) $(1)/etc/config
184 $(INSTALL_DATA) ./files/olsrd.config $(1)/etc/config/olsrd
185 $(INSTALL_DATA) ./files/olsrd6.config $(1)/etc/config/olsrd6
186 $(INSTALL_DIR) $(1)/usr/sbin
187 $(INSTALL_BIN) $(PKG_BUILD_DIR)/olsrd $(1)/usr/sbin/
188 $(INSTALL_DIR) $(1)/etc/init.d
189 $(INSTALL_BIN) ./files/olsrd4.init $(1)/etc/init.d/olsrd
190 $(INSTALL_BIN) ./files/olsrd6.init $(1)/etc/init.d/olsrd6
191 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
192 $(INSTALL_BIN) ./files/olsrd.hotplug.sh $(1)/etc/hotplug.d/iface/50-olsrd
193 endef
194
195 define Package/olsrd-mod-arprefresh/install
196 $(INSTALL_DIR) $(1)/usr/lib
197 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/arprefresh/olsrd_arprefresh.so.* $(1)/usr/lib/
198 endef
199
200 define Package/olsrd-mod-dot-draw/install
201 $(INSTALL_DIR) $(1)/usr/lib
202 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dot_draw/olsrd_dot_draw.so.* $(1)/usr/lib/
203 endef
204
205 define Package/olsrd-mod-bmf/install
206 $(INSTALL_DIR) $(1)/usr/lib
207 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmf/olsrd_bmf.so.* $(1)/usr/lib/
208 endef
209
210 define Package/olsrd-mod-dyn-gw/install
211 $(INSTALL_DIR) $(1)/usr/lib
212 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw/olsrd_dyn_gw.so.* $(1)/usr/lib/
213 endef
214
215 define Package/olsrd-mod-dyn-gw-plain/install
216 $(INSTALL_DIR) $(1)/usr/lib
217 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw_plain/olsrd_dyn_gw_plain.so.* $(1)/usr/lib/
218 endef
219
220 define Package/olsrd-mod-httpinfo/install
221 $(INSTALL_DIR) $(1)/usr/lib
222 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.* $(1)/usr/lib/
223 endef
224
225 define Package/olsrd-mod-jsoninfo/install
226 $(INSTALL_DIR) $(1)/usr/lib
227 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/jsoninfo/olsrd_jsoninfo.so.* $(1)/usr/lib/
228 endef
229
230 define Package/olsrd-mod-netjson/install
231 $(INSTALL_DIR) $(1)/usr/lib
232 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/netjson/olsrd_netjson.so.* $(1)/usr/lib/
233 endef
234
235 define Package/olsrd-mod-mdns/install
236 $(INSTALL_DIR) $(1)/usr/lib
237 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/mdns/olsrd_mdns.so.* $(1)/usr/lib/
238 endef
239
240 define Package/olsrd-mod-nameservice/install
241 $(INSTALL_DIR) $(1)/usr/lib
242 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/nameservice/olsrd_nameservice.so.* $(1)/usr/lib/
243 endef
244
245 define Package/olsrd-mod-p2pd/install
246 $(INSTALL_DIR) $(1)/usr/lib
247 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/p2pd/olsrd_p2pd.so.* $(1)/usr/lib/
248 endef
249
250 define Package/olsrd-mod-pgraph/install
251 $(INSTALL_DIR) $(1)/usr/lib
252 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/pgraph/olsrd_pgraph.so.* $(1)/usr/lib/
253 endef
254
255 define Package/olsrd-mod-pud/install
256 $(INSTALL_DIR) $(1)/etc/olsrd.d
257 $(CP) ./files/olsrd.pud.position.conf $(1)/etc/olsrd.d/
258 $(INSTALL_DIR) $(1)/usr/lib
259 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/pud/nmealib/lib/libnmea.so $(1)/usr/lib/
260 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/pud/wireformat/lib/libOlsrdPudWireFormat.so $(1)/usr/lib/
261 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/pud/olsrd_pud.so.* $(1)/usr/lib/
262 endef
263
264 define Package/olsrd-mod-quagga/install
265 $(INSTALL_DIR) $(1)/usr/lib
266 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/quagga/olsrd_quagga.so.* $(1)/usr/lib/
267 endef
268
269 define Package/olsrd-mod-secure/install
270 $(INSTALL_DIR) $(1)/etc/olsrd.d
271 $(CP) ./files/olsrd_secure_key $(1)/etc/olsrd.d/
272 $(INSTALL_DIR) $(1)/usr/lib
273 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/secure/olsrd_secure.so.* $(1)/usr/lib/
274 endef
275
276 define Package/olsrd-mod-sgwdynspeed/install
277 $(INSTALL_DIR) $(1)/etc/olsrd.d
278 $(CP) ./files/olsrd.sgw.speed.conf $(1)/etc/olsrd.d/
279 $(INSTALL_DIR) $(1)/usr/lib
280 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/sgwdynspeed/olsrd_sgwdynspeed.so.* $(1)/usr/lib/
281 endef
282
283 define Package/olsrd-mod-txtinfo/install
284 $(INSTALL_DIR) $(1)/usr/lib
285 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/txtinfo/olsrd_txtinfo.so.* $(1)/usr/lib/
286 endef
287
288 define Package/olsrd-mod-watchdog/install
289 $(INSTALL_DIR) $(1)/usr/lib
290 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/watchdog/olsrd_watchdog.so.* $(1)/usr/lib/
291 endef
292
293 $(eval $(call BuildPackage,olsrd))
294 $(eval $(call BuildPackage,olsrd-mod-arprefresh))
295 $(eval $(call BuildPackage,olsrd-mod-dot-draw))
296 $(eval $(call BuildPackage,olsrd-mod-bmf))
297 $(eval $(call BuildPackage,olsrd-mod-dyn-gw))
298 $(eval $(call BuildPackage,olsrd-mod-dyn-gw-plain))
299 $(eval $(call BuildPackage,olsrd-mod-httpinfo))
300 $(eval $(call BuildPackage,olsrd-mod-jsoninfo))
301 $(eval $(call BuildPackage,olsrd-mod-netjson))
302 $(eval $(call BuildPackage,olsrd-mod-mdns))
303 $(eval $(call BuildPackage,olsrd-mod-nameservice))
304 $(eval $(call BuildPackage,olsrd-mod-p2pd))
305 $(eval $(call BuildPackage,olsrd-mod-pgraph))
306 $(eval $(call BuildPackage,olsrd-mod-pud))
307 $(eval $(call BuildPackage,olsrd-mod-quagga))
308 $(eval $(call BuildPackage,olsrd-mod-secure))
309 $(eval $(call BuildPackage,olsrd-mod-sgwdynspeed))
310 $(eval $(call BuildPackage,olsrd-mod-txtinfo))
311 $(eval $(call BuildPackage,olsrd-mod-watchdog))