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