Renamed package name from bmx6-qmp to bmx6 and bmx6-luci to luci-app-bmx6
[feed/routing.git] / packages / qmp-quagga / Makefile
1 #
2 # Copyright (C) 2006-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 # Contributors:
8 # Simó Albert i Beltran
9 #
10
11 include $(TOPDIR)/rules.mk
12
13 PKG_NAME:=qmp-quagga
14 PKG_VERSION:=0.99.21
15 PKG_RELEASE:=2
16 PKG_MD5SUM:=99840adbe57047c90dfba6b6ed9aec7f
17
18 PKG_SOURCE:=quagga-$(PKG_VERSION).tar.gz
19 PKG_SOURCE_URL:=http://www.quagga.net/download/ \
20 http://www.de.quagga.net/download/ \
21 http://www.uk.quagga.net/download/
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/quagga-$(PKG_VERSION)
24
25 PKG_CONFIG_DEPENDS:= \
26 CONFIG_IPV6 \
27 CONFIG_PACKAGE_qmp-quagga-watchquagga \
28 CONFIG_PACKAGE_qmp-quagga-zebra \
29 CONFIG_PACKAGE_qmp-quagga-libzebra \
30 CONFIG_PACKAGE_qmp-quagga-libospf \
31 CONFIG_PACKAGE_qmp-quagga-bgpd \
32 CONFIG_PACKAGE_qmp-quagga-isisd \
33 CONFIG_PACKAGE_qmp-quagga-ospf6d \
34 CONFIG_PACKAGE_qmp-quagga-ripd \
35 CONFIG_PACKAGE_qmp-quagga-ripngd \
36 CONFIG_PACKAGE_qmp-quagga-babeld \
37 CONFIG_PACKAGE_qmp-quagga-vtysh
38 PKG_BUILD_PARALLEL:=1
39 PKG_FIXUP:=autoreconf
40 PKG_INSTALL:=1
41
42 include $(INCLUDE_DIR)/package.mk
43
44 define Package/qmp-quagga/Default
45 SECTION:=qMp
46 CATEGORY:=qMp
47 SUBMENU:=Routing and Redirection
48 DEPENDS:=qmp-quagga
49 TITLE:=The Quagga Software Routing Suite
50 URL:=http://www.quagga.net
51 MAINTAINER:=Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
52 endef
53
54 define Package/qmp-quagga
55 $(call Package/qmp-quagga/Default)
56 DEPENDS:=+qmp-quagga-vtysh +qmp-quagga-bgpd
57 MENU:=1
58 endef
59
60 define Package/qmp-quagga/description
61 A routing software package that provides TCP/IP based routing services
62 with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2,
63 OSPFv3, BGP-4, and BGP-4+
64 endef
65
66 define Package/qmp-quagga-watchquagga
67 $(call Package/qmp-quagga/Default)
68 TITLE:=Quagga watchdog
69 DEPENDS+=+qmp-quagga-libzebra
70 DEFAULT:=y if PACKAGE_qmp-quagga
71 endef
72
73 define Package/qmp-quagga-zebra
74 $(call Package/qmp-quagga/Default)
75 TITLE:=Zebra daemon
76 DEPENDS+=+qmp-quagga-libzebra
77 DEFAULT:=y if PACKAGE_qmp-quagga
78 endef
79
80 define Package/qmp-quagga-libzebra
81 $(call Package/qmp-quagga/Default)
82 DEPENDS+=+librt
83 TITLE:=zebra library
84 endef
85
86 define Package/qmp-quagga-libospf
87 $(call Package/qmp-quagga/Default)
88 TITLE:=OSPF library
89 endef
90
91 define Package/qmp-quagga-bgpd
92 $(call Package/qmp-quagga/Default)
93 DEPENDS+=+qmp-quagga-libzebra
94 TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
95 endef
96
97 define Package/qmp-quagga-isisd
98 $(call Package/qmp-quagga/Default)
99 DEPENDS+=+qmp-quagga-libzebra
100 TITLE:=IS-IS routing engine
101 endef
102
103 define Package/qmp-quagga-ospfd
104 $(call Package/qmp-quagga/Default)
105 DEPENDS+=+qmp-quagga-libospf +qmp-quagga-libzebra
106 TITLE:=OSPFv2 routing engine
107 endef
108
109 define Package/qmp-quagga-ospf6d
110 $(call Package/qmp-quagga/Default)
111 DEPENDS+=+qmp-quagga-libospf +qmp-quagga-libzebra @IPV6
112 TITLE:=OSPFv3 routing engine
113 endef
114
115 define Package/qmp-quagga-ripd
116 $(call Package/qmp-quagga/Default)
117 DEPENDS+=+qmp-quagga-libzebra
118 TITLE:=RIP routing engine
119 endef
120
121 define Package/qmp-quagga-ripngd
122 $(call Package/qmp-quagga/Default)
123 DEPENDS+=+qmp-quagga-libzebra @IPV6
124 TITLE:=RIPNG routing engine
125 endef
126
127 define Package/qmp-quagga-babeld
128 $(call Package/qmp-quagga/Default)
129 DEPENDS+=+qmp-quagga-libzebra
130 TITLE:=Babel routing engine
131 endef
132
133 define Package/qmp-quagga-vtysh
134 $(call Package/qmp-quagga/Default)
135 DEPENDS+=+qmp-quagga-libzebra +libreadline +libncurses
136 TITLE:=integrated shell for Quagga routing software
137 endef
138
139 define Package/qmp-quagga-zebra/conffiles
140 /etc/quagga/zebra.conf
141 endef
142
143 define Package/qmp-quagga-bgpd/conffiles
144 /etc/quagga/bgpd.conf
145 endef
146
147 define Package/qmp-quagga-isisd/conffiles
148 /etc/quagga/isisd.conf
149 endef
150
151 define Package/qmp-quagga-ospfd/conffiles
152 /etc/quagga/ospfd.conf
153 endef
154
155 define Package/qmp-quagga-ospf6d/conffiles
156 /etc/quagga/ospf6d.conf
157 endef
158
159 define Package/qmp-quagga-ripd/conffiles
160 /etc/quagga/ripd.conf
161 endef
162
163 define Package/qmp-quagga-ripngd/conffiles
164 /etc/quagga/ripngd.conf
165 endef
166
167 define Package/qmp-quagga-babeld/conffiles
168 /etc/quagga/babeld.conf
169 endef
170
171 ifneq ($(SDK),)
172 CONFIG_PACKAGE_qmp-quagga-libzebra:=m
173 CONFIG_PACKAGE_qmp-quagga-libospf:=m
174 CONFIG_PACKAGE_qmp-quagga-watchquagga:=m
175 CONFIG_PACKAGE_qmp-quagga-zebra:=m
176 CONFIG_PACKAGE_qmp-quagga-bgpd:=m
177 CONFIG_PACKAGE_qmp-quagga-isisd:=m
178 CONFIG_PACKAGE_qmp-quagga-ospf6d:=m
179 CONFIG_PACKAGE_qmp-quagga-ripd:=m
180 CONFIG_PACKAGE_qmp-quagga-ripngd:=m
181 CONFIG_PACKAGE_qmp-quagga-babeld:=m
182 CONFIG_PACKAGE_qmp-quagga-vtysh:=m
183 endif
184
185 CONFIGURE_ARGS+= \
186 --localstatedir=/var/run/quagga \
187 --sysconfdir=/etc/quagga/ \
188 --enable-shared \
189 --disable-static \
190 --enable-user=network \
191 --enable-group=network \
192 --enable-pie=no \
193 --enable-multipath=8 \
194 --disable-ospfclient \
195 --disable-capabilities \
196 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-libzebra,zebra) \
197 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-libospf,ospfd) \
198 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-bgpd,bgpd) \
199 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-isisd,isisd) \
200 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-ospf6d,ospf6d) \
201 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-ripd,ripd) \
202 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-ripngd,ripngd) \
203 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-babeld,babeld) \
204 $(call autoconf_bool,CONFIG_PACKAGE_qmp-quagga-vtysh,vtysh) \
205
206 MAKE_FLAGS += \
207 CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
208
209 define Package/qmp-quagga/install
210 $(INSTALL_DIR) $(1)/usr/sbin
211 $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
212 $(INSTALL_DIR) $(1)/etc/init.d
213 $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
214 endef
215
216 define Package/qmp-quagga-watchquagga/install
217 $(INSTALL_DIR) $(1)/usr/sbin
218 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
219 endef
220
221 define Package/qmp-quagga-zebra/install
222 $(INSTALL_DIR) $(1)/usr/sbin
223 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
224 $(INSTALL_DIR) $(1)/etc/quagga
225 chmod 0750 $(1)/etc/quagga
226 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
227 endef
228
229 define Package/qmp-quagga-bgpd/install
230 $(INSTALL_DIR) $(1)/usr/sbin
231 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
232 $(INSTALL_DIR) $(1)/etc/quagga
233 chmod 0750 $(1)/etc/quagga
234 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf
235 endef
236
237 define Package/qmp-quagga-isisd/install
238 $(INSTALL_DIR) $(1)/usr/sbin
239 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/
240 $(INSTALL_DIR) $(1)/etc/quagga
241 chmod 0750 $(1)/etc/quagga
242 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/isisd.conf
243 endef
244
245 define Package/qmp-quagga-ospfd/install
246 $(INSTALL_DIR) $(1)/usr/sbin
247 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
248 $(INSTALL_DIR) $(1)/etc/quagga
249 chmod 0750 $(1)/etc/quagga
250 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf
251 endef
252
253 define Package/qmp-quagga-ospf6d/install
254 $(INSTALL_DIR) $(1)/usr/sbin
255 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
256 $(INSTALL_DIR) $(1)/etc/quagga
257 chmod 0750 $(1)/etc/quagga
258 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf
259 endef
260
261 define Package/qmp-quagga-ripd/install
262 $(INSTALL_DIR) $(1)/usr/sbin
263 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
264 $(INSTALL_DIR) $(1)/etc/quagga
265 chmod 0750 $(1)/etc/quagga
266 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripd.conf
267 endef
268
269 define Package/qmp-quagga-ripngd/install
270 $(INSTALL_DIR) $(1)/usr/sbin
271 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
272 $(INSTALL_DIR) $(1)/etc/quagga
273 chmod 0750 $(1)/etc/quagga
274 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf
275 endef
276
277 define Package/qmp-quagga-babeld/install
278 $(INSTALL_DIR) $(1)/usr/sbin
279 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/babeld $(1)/usr/sbin/
280 $(INSTALL_DIR) $(1)/etc/quagga
281 chmod 0750 $(1)/etc/quagga
282 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/babeld.conf
283 endef
284
285 define Package/qmp-quagga-vtysh/install
286 $(INSTALL_DIR) $(1)/usr/bin
287 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
288 endef
289
290 define Package/qmp-quagga-libospf/install
291 $(INSTALL_DIR) $(1)/usr/lib
292 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/
293 endef
294
295 define Package/qmp-quagga-libzebra/install
296 $(INSTALL_DIR) $(1)/usr/lib
297 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
298 endef
299
300 $(eval $(call BuildPackage,qmp-quagga))
301 $(eval $(call BuildPackage,qmp-quagga-libzebra))
302 $(eval $(call BuildPackage,qmp-quagga-libospf))
303 $(eval $(call BuildPackage,qmp-quagga-watchquagga))
304 $(eval $(call BuildPackage,qmp-quagga-zebra))
305 $(eval $(call BuildPackage,qmp-quagga-bgpd))
306 $(eval $(call BuildPackage,qmp-quagga-isisd))
307 $(eval $(call BuildPackage,qmp-quagga-ospfd))
308 $(eval $(call BuildPackage,qmp-quagga-ospf6d))
309 $(eval $(call BuildPackage,qmp-quagga-ripd))
310 $(eval $(call BuildPackage,qmp-quagga-ripngd))
311 $(eval $(call BuildPackage,qmp-quagga-babeld))
312 $(eval $(call BuildPackage,qmp-quagga-vtysh))