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