[packages] olsrd: use network.sh to find devices
[openwrt/svn-archive/archive.git] / net / 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.2
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6
16 PKG_MD5SUM:=1f55bbbaf0737364b53daaeecc2cd50c
17
18 PKG_BUILD_PARALLEL:=1
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 TARGET_CFLAGS += $(FPIC)
24
25 define Package/olsrd/template
26 SECTION:=net
27 CATEGORY:=Network
28 SUBMENU:=Routing and Redirection
29 MAINTAINER:=Saverio Proto <zioproto@gmail.com>
30 TITLE:=OLSR (Optimized Link State Routing) daemon
31 URL:=http://www.olsr.org/
32 endef
33
34 define Package/olsrd
35 $(call Package/olsrd/template)
36 MENU:=1
37 DEPENDS:=+libpthread
38 endef
39
40 define Package/olsrd/conffiles
41 /etc/config/olsrd
42 endef
43
44 define Package/olsrd-mod-arprefresh
45 $(call Package/olsrd/template)
46 DEPENDS:=olsrd
47 TITLE:=Kernel ARP cache refresh plugin
48 endef
49
50 define Package/olsrd-mod-dot-draw
51 $(call Package/olsrd/template)
52 DEPENDS:=olsrd
53 TITLE:=Dot topology information plugin
54 endef
55
56 define Package/olsrd-mod-bmf
57 $(call Package/olsrd/template)
58 DEPENDS:=olsrd +kmod-tun
59 TITLE:=Basic multicast forwarding plugin
60 endef
61
62 define Package/olsrd-mod-dyn-gw
63 $(call Package/olsrd/template)
64 DEPENDS:=olsrd
65 TITLE:=Dynamic internet gateway plugin
66 endef
67
68 define Package/olsrd-mod-dyn-gw-plain
69 $(call Package/olsrd/template)
70 DEPENDS:=olsrd
71 TITLE:=Dynamic internet gateway plain plugin
72 endef
73
74 define Package/olsrd-mod-httpinfo
75 $(call Package/olsrd/template)
76 DEPENDS:=olsrd
77 TITLE:=Small informative web server plugin
78 endef
79
80 define Package/olsrd-mod-mdns
81 $(call Package/olsrd/template)
82 DEPENDS:=olsrd
83 TITLE:=Multicast DNS plugin
84 endef
85
86 define Package/olsrd-mod-nameservice
87 $(call Package/olsrd/template)
88 DEPENDS:=olsrd
89 TITLE:=Lightweight hostname resolver plugin
90 endef
91
92 define Package/olsrd-mod-p2pd
93 $(call Package/olsrd/template)
94 DEPENDS:=olsrd
95 TITLE:=Peer to Peer Discovery plugin
96 endef
97
98 define Package/olsrd-mod-quagga
99 $(call Package/olsrd/template)
100 DEPENDS:=olsrd
101 TITLE:=Quagga plugin
102 endef
103
104 define Package/olsrd-mod-secure
105 $(call Package/olsrd/template)
106 DEPENDS:=olsrd
107 TITLE:=Message signing plugin to secure routing domain
108 endef
109
110 define Package/olsrd-mod-txtinfo
111 $(call Package/olsrd/template)
112 DEPENDS:=olsrd
113 TITLE:=Small informative web server plugin
114 endef
115
116 define Package/olsrd-mod-watchdog
117 $(call Package/olsrd/template)
118 DEPENDS:=olsrd
119 TITLE:=Watchdog plugin
120 endef
121
122 define Package/olsrd-mod-secure/conffiles
123 /etc/olsrd.d/olsrd_secure_key
124 endef
125
126 MAKE_FLAGS+= \
127 NO_DEBUG_MESSAGES=1 \
128 OS="linux" \
129 DESTDIR="$(PKG_INSTALL_DIR)" \
130 STRIP="true" \
131 INSTALL_LIB="true" \
132 SUBDIRS="arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo mdns nameservice p2pd quagga secure txtinfo watchdog"
133
134 define Build/Compile
135 $(call Build/Compile/Default,all)
136 $(call Build/Compile/Default,libs)
137 endef
138
139 define Build/Install
140 $(call Build/Install/Default,install)
141 $(call Build/Install/Default,install_libs)
142 endef
143
144 define Package/olsrd/install
145 $(INSTALL_DIR) $(1)/etc/config
146 $(INSTALL_DATA) ./files/olsrd.config $(1)/etc/config/olsrd
147 $(INSTALL_DIR) $(1)/usr/sbin
148 $(INSTALL_BIN) $(PKG_BUILD_DIR)/olsrd $(1)/usr/sbin/
149 $(INSTALL_DIR) $(1)/etc/init.d
150 $(INSTALL_BIN) ./files/olsrd.init $(1)/etc/init.d/olsrd
151 endef
152
153 define Package/olsrd-mod-arprefresh/install
154 $(INSTALL_DIR) $(1)/usr/lib
155 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/arprefresh/olsrd_arprefresh.so.* $(1)/usr/lib/
156 endef
157
158 define Package/olsrd-mod-dot-draw/install
159 $(INSTALL_DIR) $(1)/usr/lib
160 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dot_draw/olsrd_dot_draw.so.* $(1)/usr/lib/
161 endef
162
163 define Package/olsrd-mod-bmf/install
164 $(INSTALL_DIR) $(1)/usr/lib
165 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmf/olsrd_bmf.so.* $(1)/usr/lib/
166 endef
167
168 define Package/olsrd-mod-dyn-gw/install
169 $(INSTALL_DIR) $(1)/usr/lib
170 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw/olsrd_dyn_gw.so.* $(1)/usr/lib/
171 endef
172
173 define Package/olsrd-mod-dyn-gw-plain/install
174 $(INSTALL_DIR) $(1)/usr/lib
175 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw_plain/olsrd_dyn_gw_plain.so.* $(1)/usr/lib/
176 endef
177
178 define Package/olsrd-mod-httpinfo/install
179 $(INSTALL_DIR) $(1)/usr/lib
180 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.* $(1)/usr/lib/
181 endef
182
183 define Package/olsrd-mod-mdns/install
184 $(INSTALL_DIR) $(1)/usr/lib
185 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/mdns/olsrd_mdns.so.* $(1)/usr/lib/
186 endef
187
188 define Package/olsrd-mod-nameservice/install
189 $(INSTALL_DIR) $(1)/usr/lib
190 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/nameservice/olsrd_nameservice.so.* $(1)/usr/lib/
191 endef
192
193 define Package/olsrd-mod-p2pd/install
194 $(INSTALL_DIR) $(1)/usr/lib
195 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/p2pd/olsrd_p2pd.so.* $(1)/usr/lib/
196 endef
197
198 define Package/olsrd-mod-quagga/install
199 $(INSTALL_DIR) $(1)/usr/lib
200 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/quagga/olsrd_quagga.so.* $(1)/usr/lib/
201 endef
202
203 define Package/olsrd-mod-secure/install
204 $(INSTALL_DIR) $(1)/etc/olsrd.d
205 $(CP) ./files/olsrd_secure_key $(1)/etc/olsrd.d/
206 $(INSTALL_DIR) $(1)/usr/lib
207 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/secure/olsrd_secure.so.* $(1)/usr/lib/
208 endef
209
210 define Package/olsrd-mod-txtinfo/install
211 $(INSTALL_DIR) $(1)/usr/lib
212 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/txtinfo/olsrd_txtinfo.so.* $(1)/usr/lib/
213 endef
214
215 define Package/olsrd-mod-watchdog/install
216 $(INSTALL_DIR) $(1)/usr/lib
217 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/watchdog/olsrd_watchdog.so.* $(1)/usr/lib/
218 endef
219
220 $(eval $(call BuildPackage,olsrd))
221 $(eval $(call BuildPackage,olsrd-mod-arprefresh))
222 $(eval $(call BuildPackage,olsrd-mod-dot-draw))
223 $(eval $(call BuildPackage,olsrd-mod-bmf))
224 $(eval $(call BuildPackage,olsrd-mod-dyn-gw))
225 $(eval $(call BuildPackage,olsrd-mod-dyn-gw-plain))
226 $(eval $(call BuildPackage,olsrd-mod-httpinfo))
227 $(eval $(call BuildPackage,olsrd-mod-mdns))
228 $(eval $(call BuildPackage,olsrd-mod-nameservice))
229 $(eval $(call BuildPackage,olsrd-mod-p2pd))
230 $(eval $(call BuildPackage,olsrd-mod-quagga))
231 $(eval $(call BuildPackage,olsrd-mod-secure))
232 $(eval $(call BuildPackage,olsrd-mod-txtinfo))
233 $(eval $(call BuildPackage,olsrd-mod-watchdog))