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 \
190 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libzebra,zebra) \
191 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libospf,ospfd) \
192 $(call autoconf_bool,CONFIG_PACKAGE_quagga-bgpd,bgpd) \
193 $(call autoconf_bool,CONFIG_PACKAGE_quagga-isisd,isisd) \
194 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ospf6d,ospf6d) \
195 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripd,ripd) \
196 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripngd,ripngd) \
197 $(call autoconf_bool,CONFIG_PACKAGE_quagga-babeld,babeld) \
198 $(call autoconf_bool,CONFIG_PACKAGE_quagga-vtysh,vtysh) \
201 CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
203 define Package/quagga/install
204 $(INSTALL_DIR) $(1)/usr/sbin
205 $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
206 $(INSTALL_DIR) $(1)/etc/init.d
207 $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
210 define Package/quagga-watchquagga/install
211 $(INSTALL_DIR) $(1)/usr/sbin
212 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
215 define Package/quagga-zebra/install
216 $(INSTALL_DIR) $(1)/usr/sbin
217 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
218 $(INSTALL_DIR) $(1)/etc/quagga
219 chmod 0750 $(1)/etc/quagga
220 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
223 define Package/quagga-bgpd/install
224 $(INSTALL_DIR) $(1)/usr/sbin
225 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
226 $(INSTALL_DIR) $(1)/etc/quagga
227 chmod 0750 $(1)/etc/quagga
228 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf
231 define Package/quagga-isisd/install
232 $(INSTALL_DIR) $(1)/usr/sbin
233 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/
234 $(INSTALL_DIR) $(1)/etc/quagga
235 chmod 0750 $(1)/etc/quagga
236 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/isisd.conf
239 define Package/quagga-ospfd/install
240 $(INSTALL_DIR) $(1)/usr/sbin
241 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
242 $(INSTALL_DIR) $(1)/etc/quagga
243 chmod 0750 $(1)/etc/quagga
244 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf
247 define Package/quagga-ospf6d/install
248 $(INSTALL_DIR) $(1)/usr/sbin
249 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
250 $(INSTALL_DIR) $(1)/etc/quagga
251 chmod 0750 $(1)/etc/quagga
252 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf
255 define Package/quagga-ripd/install
256 $(INSTALL_DIR) $(1)/usr/sbin
257 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
258 $(INSTALL_DIR) $(1)/etc/quagga
259 chmod 0750 $(1)/etc/quagga
260 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripd.conf
263 define Package/quagga-ripngd/install
264 $(INSTALL_DIR) $(1)/usr/sbin
265 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
266 $(INSTALL_DIR) $(1)/etc/quagga
267 chmod 0750 $(1)/etc/quagga
268 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf
271 define Package/quagga-babeld/install
272 $(INSTALL_DIR) $(1)/usr/sbin
273 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/babeld $(1)/usr/sbin/
274 $(INSTALL_DIR) $(1)/etc/quagga
275 chmod 0750 $(1)/etc/quagga
276 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/babeld.conf
279 define Package/quagga-vtysh/install
280 $(INSTALL_DIR) $(1)/usr/bin
281 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
284 define Package/quagga-libospf/install
285 $(INSTALL_DIR) $(1)/usr/lib
286 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/
289 define Package/quagga-libzebra/install
290 $(INSTALL_DIR) $(1)/usr/lib
291 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
294 $(eval $(call BuildPackage,quagga))
295 $(eval $(call BuildPackage,quagga-libzebra))
296 $(eval $(call BuildPackage,quagga-libospf))
297 $(eval $(call BuildPackage,quagga-watchquagga))
298 $(eval $(call BuildPackage,quagga-zebra))
299 $(eval $(call BuildPackage,quagga-bgpd))
300 $(eval $(call BuildPackage,quagga-isisd))
301 $(eval $(call BuildPackage,quagga-ospfd))
302 $(eval $(call BuildPackage,quagga-ospf6d))
303 $(eval $(call BuildPackage,quagga-ripd))
304 $(eval $(call BuildPackage,quagga-ripngd))
305 $(eval $(call BuildPackage,quagga-babeld))
306 $(eval $(call BuildPackage,quagga-vtysh))