2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
13 PKG_MD5SUM:=99840adbe57047c90dfba6b6ed9aec7f
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.quagga.net/download/ \
17 http://www.de.quagga.net/download/ \
18 http://www.uk.quagga.net/download/
19 PKG_CONFIG_DEPENDS:= \
21 CONFIG_PACKAGE_quagga-watchquagga \
22 CONFIG_PACKAGE_quagga-zebra \
23 CONFIG_PACKAGE_quagga-libzebra \
24 CONFIG_PACKAGE_quagga-libospf \
25 CONFIG_PACKAGE_quagga-bgpd \
26 CONFIG_PACKAGE_quagga-isisd \
27 CONFIG_PACKAGE_quagga-ospf6d \
28 CONFIG_PACKAGE_quagga-ripd \
29 CONFIG_PACKAGE_quagga-ripngd \
30 CONFIG_PACKAGE_quagga-babeld \
31 CONFIG_PACKAGE_quagga-vtysh
36 include $(INCLUDE_DIR)/package.mk
38 define Package/quagga/Default
41 SUBMENU:=Routing and Redirection
43 TITLE:=The Quagga Software Routing Suite
44 URL:=http://www.quagga.net
45 MAINTAINER:=Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
49 $(call Package/quagga/Default)
54 define Package/quagga/description
55 A routing software package that provides TCP/IP based routing services
56 with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2,
57 OSPFv3, BGP-4, and BGP-4+
60 define Package/quagga-watchquagga
61 $(call Package/quagga/Default)
62 TITLE:=Quagga watchdog
63 DEPENDS+=+quagga-libzebra
64 DEFAULT:=y if PACKAGE_quagga
67 define Package/quagga-zebra
68 $(call Package/quagga/Default)
70 DEPENDS+=+quagga-libzebra
71 DEFAULT:=y if PACKAGE_quagga
74 define Package/quagga-libzebra
75 $(call Package/quagga/Default)
79 define Package/quagga-libospf
80 $(call Package/quagga/Default)
84 define Package/quagga-bgpd
85 $(call Package/quagga/Default)
86 DEPENDS+=+quagga-libzebra
87 TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
90 define Package/quagga-isisd
91 $(call Package/quagga/Default)
92 DEPENDS+=+quagga-libzebra
93 TITLE:=IS-IS routing engine
96 define Package/quagga-ospfd
97 $(call Package/quagga/Default)
98 DEPENDS+=+quagga-libospf +quagga-libzebra
99 TITLE:=OSPFv2 routing engine
102 define Package/quagga-ospf6d
103 $(call Package/quagga/Default)
104 DEPENDS+=+quagga-libospf +quagga-libzebra @IPV6
105 TITLE:=OSPFv3 routing engine
108 define Package/quagga-ripd
109 $(call Package/quagga/Default)
110 DEPENDS+=+quagga-libzebra
111 TITLE:=RIP routing engine
114 define Package/quagga-ripngd
115 $(call Package/quagga/Default)
116 DEPENDS+=+quagga-libzebra @IPV6
117 TITLE:=RIPNG routing engine
120 define Package/quagga-babeld
121 $(call Package/quagga/Default)
122 DEPENDS+=+quagga-libzebra
123 TITLE:=Babel routing engine
126 define Package/quagga-vtysh
127 $(call Package/quagga/Default)
128 DEPENDS+=+quagga-libzebra +libreadline +libncurses
129 TITLE:=integrated shell for Quagga routing software
132 define Package/quagga-zebra/conffiles
133 /etc/quagga/zebra.conf
136 define Package/quagga-bgpd/conffiles
137 /etc/quagga/bgpd.conf
140 define Package/quagga-isisd/conffiles
141 /etc/quagga/isisd.conf
144 define Package/quagga-ospfd/conffiles
145 /etc/quagga/ospfd.conf
148 define Package/quagga-ospf6d/conffiles
149 /etc/quagga/ospf6d.conf
152 define Package/quagga-ripd/conffiles
153 /etc/quagga/ripd.conf
156 define Package/quagga-ripngd/conffiles
157 /etc/quagga/ripngd.conf
160 define Package/quagga-babeld/conffiles
161 /etc/quagga/babeld.conf
165 CONFIG_PACKAGE_quagga-libzebra:=m
166 CONFIG_PACKAGE_quagga-libospf:=m
167 CONFIG_PACKAGE_quagga-watchquagga:=m
168 CONFIG_PACKAGE_quagga-zebra:=m
169 CONFIG_PACKAGE_quagga-bgpd:=m
170 CONFIG_PACKAGE_quagga-isisd:=m
171 CONFIG_PACKAGE_quagga-ospf6d:=m
172 CONFIG_PACKAGE_quagga-ripd:=m
173 CONFIG_PACKAGE_quagga-ripngd:=m
174 CONFIG_PACKAGE_quagga-babeld:=m
175 CONFIG_PACKAGE_quagga-vtysh:=m
179 --localstatedir=/var/run/quagga \
180 --sysconfdir=/etc/quagga/ \
183 --enable-user=network \
184 --enable-group=network \
186 --enable-multipath=8 \
187 --disable-ospfclient \
188 --disable-capabilities \
189 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libzebra,zebra) \
190 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libospf,ospfd) \
191 $(call autoconf_bool,CONFIG_PACKAGE_quagga-bgpd,bgpd) \
192 $(call autoconf_bool,CONFIG_PACKAGE_quagga-isisd,isisd) \
193 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ospf6d,ospf6d) \
194 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripd,ripd) \
195 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripngd,ripngd) \
196 $(call autoconf_bool,CONFIG_PACKAGE_quagga-babeld,babeld) \
197 $(call autoconf_bool,CONFIG_PACKAGE_quagga-vtysh,vtysh) \
200 CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
202 define Package/quagga/install
203 $(INSTALL_DIR) $(1)/usr/sbin
204 $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
205 $(INSTALL_DIR) $(1)/etc/init.d
206 $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
209 define Package/quagga-watchquagga/install
210 $(INSTALL_DIR) $(1)/usr/sbin
211 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
214 define Package/quagga-zebra/install
215 $(INSTALL_DIR) $(1)/usr/sbin
216 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
217 $(INSTALL_DIR) $(1)/etc/quagga
218 chmod 0750 $(1)/etc/quagga
219 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
222 define Package/quagga-bgpd/install
223 $(INSTALL_DIR) $(1)/usr/sbin
224 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
225 $(INSTALL_DIR) $(1)/etc/quagga
226 chmod 0750 $(1)/etc/quagga
227 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf
230 define Package/quagga-isisd/install
231 $(INSTALL_DIR) $(1)/usr/sbin
232 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/
233 $(INSTALL_DIR) $(1)/etc/quagga
234 chmod 0750 $(1)/etc/quagga
235 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/isisd.conf
238 define Package/quagga-ospfd/install
239 $(INSTALL_DIR) $(1)/usr/sbin
240 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
241 $(INSTALL_DIR) $(1)/etc/quagga
242 chmod 0750 $(1)/etc/quagga
243 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf
246 define Package/quagga-ospf6d/install
247 $(INSTALL_DIR) $(1)/usr/sbin
248 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
249 $(INSTALL_DIR) $(1)/etc/quagga
250 chmod 0750 $(1)/etc/quagga
251 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf
254 define Package/quagga-ripd/install
255 $(INSTALL_DIR) $(1)/usr/sbin
256 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
257 $(INSTALL_DIR) $(1)/etc/quagga
258 chmod 0750 $(1)/etc/quagga
259 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripd.conf
262 define Package/quagga-ripngd/install
263 $(INSTALL_DIR) $(1)/usr/sbin
264 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
265 $(INSTALL_DIR) $(1)/etc/quagga
266 chmod 0750 $(1)/etc/quagga
267 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf
270 define Package/quagga-babeld/install
271 $(INSTALL_DIR) $(1)/usr/sbin
272 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/babeld $(1)/usr/sbin/
273 $(INSTALL_DIR) $(1)/etc/quagga
274 chmod 0750 $(1)/etc/quagga
275 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/babeld.conf
278 define Package/quagga-vtysh/install
279 $(INSTALL_DIR) $(1)/usr/bin
280 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
283 define Package/quagga-libospf/install
284 $(INSTALL_DIR) $(1)/usr/lib
285 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/
288 define Package/quagga-libzebra/install
289 $(INSTALL_DIR) $(1)/usr/lib
290 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
293 $(eval $(call BuildPackage,quagga))
294 $(eval $(call BuildPackage,quagga-libzebra))
295 $(eval $(call BuildPackage,quagga-libospf))
296 $(eval $(call BuildPackage,quagga-watchquagga))
297 $(eval $(call BuildPackage,quagga-zebra))
298 $(eval $(call BuildPackage,quagga-bgpd))
299 $(eval $(call BuildPackage,quagga-isisd))
300 $(eval $(call BuildPackage,quagga-ospfd))
301 $(eval $(call BuildPackage,quagga-ospf6d))
302 $(eval $(call BuildPackage,quagga-ripd))
303 $(eval $(call BuildPackage,quagga-ripngd))
304 $(eval $(call BuildPackage,quagga-babeld))
305 $(eval $(call BuildPackage,quagga-vtysh))