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