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