2 # Copyright (C) 2009-2010 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
10 PKG_NAME
:=quagga-unstable
14 PKG_SOURCE
:=quagga-
$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://www.quagga.net
/download
/ \
16 http
://www.de.quagga.net
/download
/ \
17 http
://www.uk.quagga.net
/download
/
18 PKG_MD5SUM
:=37b9022adca04b03863d2d79787e643f
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/quagga-
$(PKG_VERSION
)
24 PKG_CONFIG_DEPENDS
:= \
25 CONFIG_PACKAGE_quagga-unstable-isisd \
26 CONFIG_PACKAGE_quagga-unstable-ripngd
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/quagga-unstable
/Default
35 DEPENDS
:=quagga-unstable
36 TITLE
:=The Quagga Software Routing Suite
37 URL
:=http
://www.quagga.net
38 MAINTAINER
:=Vasilis Tsiligiannis
<b_tsiligiannis@silverton.gr
>
41 define Package
/quagga-unstable
42 $(call Package
/quagga-unstable
/Default
)
47 define Package
/quagga-unstable
/description
48 A routing software package that provides TCP
/IP based routing services
49 with routing protocols support such
as RIPv1
, RIPv2
, RIPng
, OSPFv2
,
50 OSPFv3
, BGP-4
, and BGP-4
+
53 define Package
/quagga-unstable-libzebra
54 $(call Package
/quagga-unstable
/Default
)
58 define Package
/quagga-unstable-libospf
59 $(call Package
/quagga-unstable
/Default
)
63 define Package
/quagga-unstable-bgpd
64 $(call Package
/quagga-unstable
/Default
)
65 DEPENDS
+= +quagga-unstable-libzebra
66 TITLE
:=BGPv4
, BGPv4
+, BGPv4- routing engine
69 define Package
/quagga-unstable-isisd
70 $(call Package
/quagga-unstable
/Default
)
71 TITLE
:=IS-IS routing engine
74 define Package
/quagga-unstable-ospfd
75 $(call Package
/quagga-unstable
/Default
)
76 DEPENDS
+= +quagga-unstable-libospf
+quagga-unstable-libzebra
77 TITLE
:=OSPFv2 routing engine
80 define Package
/quagga-unstable-ospf6d
81 $(call Package
/quagga-unstable
/Default
)
82 DEPENDS
+= +quagga-unstable-libospf
+quagga-unstable-libzebra @IPV6
83 TITLE
:=OSPFv3 routing engine
86 define Package
/quagga-unstable-ripd
87 $(call Package
/quagga-unstable
/Default
)
88 DEPENDS
+= +quagga-unstable-libzebra
89 TITLE
:=RIP routing engine
92 define Package
/quagga-unstable-ripngd
93 $(call Package
/quagga-unstable
/Default
)
94 DEPENDS
+= +quagga-unstable-libzebra @BROKEN
95 TITLE
:=RIPNG routing engine
98 define Package
/quagga-unstable-vtysh
99 $(call Package
/quagga-unstable
/Default
)
100 DEPENDS
+= quagga-unstable-libzebra
+libreadline
+libncurses
101 TITLE
:=integrated
shell for Quagga routing software
104 define Package
/quagga-unstable
/conffiles
105 /etc
/quagga
/zebra.conf
108 define Package
/quagga-unstable-bgpd
/conffiles
109 /etc
/quagga
/bgpd.conf
112 define Package
/quagga-unstable-isisd
/conffiles
113 /etc
/quagga
/isisd.conf
116 define Package
/quagga-unstable-ospfd
/conffiles
117 /etc
/quagga
/ospfd.conf
120 define Package
/quagga-unstable-ospf6d
/conffiles
121 /etc
/quagga
/ospf6d.conf
124 define Package
/quagga-unstable-ripd
/conffiles
125 /etc
/quagga
/ripd.conf
128 define Package
/quagga-unstable-ripngd
/conffiles
129 /etc
/quagga
/ripngd.conf
133 --localstatedir
=/var
/run
/quagga \
134 --sysconfdir
=/etc
/quagga
/ \
138 --enable-user
=quagga \
139 --enable-group
=quagga \
141 --enable-multipath
=8 \
143 ifneq ($(CONFIG_PACKAGE_quagga-unstable-isisd
),)
144 CONFIGURE_ARGS
+= --enable-isisd
147 ifneq ($(CONFIG_PACKAGE_quagga-unstable-ripngd
),)
148 CONFIGURE_ARGS
+= --enable-ripngd
151 define Package
/quagga-unstable
/install
152 $(INSTALL_DIR
) $(1)/usr
/sbin
153 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/zebra
$(1)/usr
/sbin
/
154 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/watchquagga
$(1)/usr
/sbin
/
155 # avoid /etc being set to 0750
156 $(INSTALL_DIR
) $(1)/etc
/quagga
157 chmod
0750 $(1)/etc
/quagga
158 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/zebra.conf
159 $(INSTALL_DIR
) $(1)/etc
/init.d
160 $(INSTALL_BIN
) .
/files
/quagga
$(1)/usr
/sbin
/quagga.init
161 $(INSTALL_BIN
) .
/files
/quagga.init
$(1)/etc
/init.d
/quagga
164 define Package
/quagga-unstable
/postinst
170 # do not change below
171 # check if we are on real system
172 if
[ -z
"$${IPKG_INSTROOT}" ]; then
173 # create copies of passwd and group, if we use squashfs
174 rootfs
=`mount |awk '/root/ { print $$5 }'`
175 if
[ "$$rootfs" = "squashfs" ]; then
176 if
[ -h
/etc
/group
]; then
178 cp
/rom
/etc
/group
/etc
/group
180 if
[ -h
/etc
/passwd
]; then
182 cp
/rom
/etc
/passwd
/etc
/passwd
188 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
189 echo
"adding group $$name to /etc/group"
190 echo
"$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc
/group
193 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
194 echo
"adding user $$name to /etc/passwd"
195 echo
"$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc
/passwd
198 grep
-q
'^zebra[[:space:]]*2601/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
199 if
[ $$?
-ne
0 ]; then
200 echo
"zebrasrv 2600/tcp" >>$${IPKG_INSTROOT}/etc
/services
201 echo
"zebra 2601/tcp" >>$${IPKG_INSTROOT}/etc
/services
202 echo
"ripd 2602/tcp" >>$${IPKG_INSTROOT}/etc
/services
203 echo
"ripngd 2603/tcp" >>$${IPKG_INSTROOT}/etc
/services
204 echo
"ospfd 2604/tcp" >>$${IPKG_INSTROOT}/etc
/services
205 echo
"bgpd 2605/tcp" >>$${IPKG_INSTROOT}/etc
/services
206 echo
"ospf6d 2606/tcp" >>$${IPKG_INSTROOT}/etc
/services
207 echo
"ospfapi 2607/tcp" >>$${IPKG_INSTROOT}/etc
/services
208 echo
"isisd 2608/tcp" >>$${IPKG_INSTROOT}/etc
/services
212 define Package
/quagga-unstable-bgpd
/install
213 $(INSTALL_DIR
) $(1)/usr
/sbin
214 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/bgpd
$(1)/usr
/sbin
/
215 $(INSTALL_DIR
) $(1)/etc
/quagga
216 chmod
0750 $(1)/etc
/quagga
217 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/bgpd.conf
220 define Package
/quagga-unstable-isisd
/install
221 $(INSTALL_DIR
) $(1)/usr
/sbin
222 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/isisd
$(1)/usr
/sbin
/
223 $(INSTALL_DIR
) $(1)/etc
/quagga
224 chmod
0750 $(1)/etc
/quagga
225 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/isisd.conf
228 define Package
/quagga-unstable-ospfd
/install
229 $(INSTALL_DIR
) $(1)/usr
/sbin
230 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ospfd
$(1)/usr
/sbin
/
231 $(INSTALL_DIR
) $(1)/etc
/quagga
232 chmod
0750 $(1)/etc
/quagga
233 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/ospfd.conf
236 define Package
/quagga-unstable-ospf6d
/install
237 $(INSTALL_DIR
) $(1)/usr
/sbin
238 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ospf6d
$(1)/usr
/sbin
/
239 $(INSTALL_DIR
) $(1)/etc
/quagga
240 chmod
0750 $(1)/etc
/quagga
241 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/ospf6d.conf
244 define Package
/quagga-unstable-ripd
/install
245 $(INSTALL_DIR
) $(1)/usr
/sbin
246 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ripd
$(1)/usr
/sbin
/
247 $(INSTALL_DIR
) $(1)/etc
/quagga
248 chmod
0750 $(1)/etc
/quagga
249 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/ripd.conf
252 define Package
/quagga-unstable-ripngd
/install
253 $(INSTALL_DIR
) $(1)/usr
/sbin
254 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ripngd
$(1)/usr
/sbin
/
255 $(INSTALL_DIR
) $(1)/etc
/quagga
256 chmod
0750 $(1)/etc
/quagga
257 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/ripngd.conf
260 define Package
/quagga-unstable-vtysh
/install
261 $(INSTALL_DIR
) $(1)/usr
/bin
262 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vtysh
$(1)/usr
/bin
/
265 define Package
/quagga-unstable-libospf
/install
266 $(INSTALL_DIR
) $(1)/usr
/lib
267 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libospf.so.
* $(1)/usr
/lib
/
270 define Package
/quagga-unstable-libzebra
/install
271 $(INSTALL_DIR
) $(1)/usr
/lib
272 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libzebra.so.
* $(1)/usr
/lib
/
275 $(eval
$(call BuildPackage
,quagga-unstable
))
276 $(eval
$(call BuildPackage
,quagga-unstable-libzebra
))
277 $(eval
$(call BuildPackage
,quagga-unstable-libospf
))
278 $(eval
$(call BuildPackage
,quagga-unstable-bgpd
))
279 $(eval
$(call BuildPackage
,quagga-unstable-isisd
))
280 $(eval
$(call BuildPackage
,quagga-unstable-ospfd
))
281 $(eval
$(call BuildPackage
,quagga-unstable-ospf6d
))
282 $(eval
$(call BuildPackage
,quagga-unstable-ripd
))
283 $(eval
$(call BuildPackage
,quagga-unstable-ripngd
))
284 $(eval
$(call BuildPackage
,quagga-unstable-vtysh
))