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
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/quagga-
$(PKG_VERSION
)
22 PKG_CONFIG_DEPENDS
:= \
23 CONFIG_PACKAGE_quagga-unstable-isisd \
24 CONFIG_PACKAGE_quagga-unstable-ripngd
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/quagga-unstable
/Default
33 DEPENDS
:=quagga-unstable
34 TITLE
:=The Quagga Software Routing Suite
35 URL
:=http
://www.quagga.net
36 MAINTAINER
:=Vasilis Tsiligiannis
<b_tsiligiannis@silverton.gr
>
39 define Package
/quagga-unstable
40 $(call Package
/quagga-unstable
/Default
)
45 define Package
/quagga-unstable
/description
46 A routing software package that provides TCP
/IP based routing services
47 with routing protocols support such
as RIPv1
, RIPv2
, RIPng
, OSPFv2
,
48 OSPFv3
, BGP-4
, and BGP-4
+
51 define Package
/quagga-unstable-libzebra
52 $(call Package
/quagga-unstable
/Default
)
56 define Package
/quagga-unstable-libospf
57 $(call Package
/quagga-unstable
/Default
)
61 define Package
/quagga-unstable-bgpd
62 $(call Package
/quagga-unstable
/Default
)
63 DEPENDS
+= +quagga-unstable-libzebra
64 TITLE
:=BGPv4
, BGPv4
+, BGPv4- routing engine
67 define Package
/quagga-unstable-isisd
68 $(call Package
/quagga-unstable
/Default
)
69 TITLE
:=IS-IS routing engine
72 define Package
/quagga-unstable-ospfd
73 $(call Package
/quagga-unstable
/Default
)
74 DEPENDS
+= +quagga-unstable-libospf
+quagga-unstable-libzebra
75 TITLE
:=OSPFv2 routing engine
78 define Package
/quagga-unstable-ospf6d
79 $(call Package
/quagga-unstable
/Default
)
80 DEPENDS
+= +quagga-unstable-libospf
+quagga-unstable-libzebra @IPV6
81 TITLE
:=OSPFv3 routing engine
84 define Package
/quagga-unstable-ripd
85 $(call Package
/quagga-unstable
/Default
)
86 DEPENDS
+= +quagga-unstable-libzebra
87 TITLE
:=RIP routing engine
90 define Package
/quagga-unstable-ripngd
91 $(call Package
/quagga-unstable
/Default
)
92 DEPENDS
+= +quagga-unstable-libzebra @BROKEN
93 TITLE
:=RIPNG routing engine
96 define Package
/quagga-unstable-vtysh
97 $(call Package
/quagga-unstable
/Default
)
98 DEPENDS
+= quagga-unstable-libzebra
+libreadline
+libncurses
99 TITLE
:=integrated
shell for Quagga routing software
102 define Package
/quagga-unstable
/conffiles
103 /etc
/quagga
/zebra.conf
106 define Package
/quagga-unstable-bgpd
/conffiles
107 /etc
/quagga
/bgpd.conf
110 define Package
/quagga-unstable-isisd
/conffiles
111 /etc
/quagga
/isisd.conf
114 define Package
/quagga-unstable-ospfd
/conffiles
115 /etc
/quagga
/ospfd.conf
118 define Package
/quagga-unstable-ospf6d
/conffiles
119 /etc
/quagga
/ospf6d.conf
122 define Package
/quagga-unstable-ripd
/conffiles
123 /etc
/quagga
/ripd.conf
126 define Package
/quagga-unstable-ripngd
/conffiles
127 /etc
/quagga
/ripngd.conf
131 --localstatedir
=/var
/run
/quagga \
132 --sysconfdir
=/etc
/quagga
/ \
136 --enable-user
=quagga \
137 --enable-group
=quagga \
139 --enable-multipath
=8 \
141 ifneq ($(CONFIG_PACKAGE_quagga-unstable-isisd
),)
142 CONFIGURE_ARGS
+= --enable-isisd
145 ifneq ($(CONFIG_PACKAGE_quagga-unstable-ripngd
),)
146 CONFIGURE_ARGS
+= --enable-ripngd
149 define Package
/quagga-unstable
/install
150 $(INSTALL_DIR
) $(1)/usr
/sbin
151 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/zebra
$(1)/usr
/sbin
/
152 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/watchquagga
$(1)/usr
/sbin
/
153 # avoid /etc being set to 0750
154 $(INSTALL_DIR
) $(1)/etc
/quagga
155 chmod
0750 $(1)/etc
/quagga
156 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/zebra.conf
157 $(INSTALL_DIR
) $(1)/etc
/init.d
158 $(INSTALL_BIN
) .
/files
/quagga
$(1)/usr
/sbin
/quagga.init
159 $(INSTALL_BIN
) .
/files
/quagga.init
$(1)/etc
/init.d
/quagga
162 define Package
/quagga-unstable
/postinst
168 # do not change below
169 # check if we are on real system
170 if
[ -z
"$${IPKG_INSTROOT}" ]; then
171 # create copies of passwd and group, if we use squashfs
172 rootfs
=`mount |awk '/root/ { print $$5 }'`
173 if
[ "$$rootfs" = "squashfs" ]; then
174 if
[ -h
/etc
/group
]; then
176 cp
/rom
/etc
/group
/etc
/group
178 if
[ -h
/etc
/passwd
]; then
180 cp
/rom
/etc
/passwd
/etc
/passwd
186 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/group)" ]; then
187 echo
"adding group $$name to /etc/group"
188 echo
"$${name}:x:$${id}:" >> $${IPKG_INSTROOT}/etc
/group
191 if
[ -z
"$$(grep ^\\$${name}: $${IPKG_INSTROOT}/etc/passwd)" ]; then
192 echo
"adding user $$name to /etc/passwd"
193 echo
"$${name}:x:$${id}:$${id}:$${name}:/tmp/.$${name}:/bin/false" >> $${IPKG_INSTROOT}/etc
/passwd
196 grep
-q
'^zebra[[:space:]]*2601/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
197 if
[ $$?
-ne
0 ]; then
198 echo
"zebrasrv 2600/tcp" >>$${IPKG_INSTROOT}/etc
/services
199 echo
"zebra 2601/tcp" >>$${IPKG_INSTROOT}/etc
/services
200 echo
"ripd 2602/tcp" >>$${IPKG_INSTROOT}/etc
/services
201 echo
"ripngd 2603/tcp" >>$${IPKG_INSTROOT}/etc
/services
202 echo
"ospfd 2604/tcp" >>$${IPKG_INSTROOT}/etc
/services
203 echo
"bgpd 2605/tcp" >>$${IPKG_INSTROOT}/etc
/services
204 echo
"ospf6d 2606/tcp" >>$${IPKG_INSTROOT}/etc
/services
205 echo
"ospfapi 2607/tcp" >>$${IPKG_INSTROOT}/etc
/services
206 echo
"isisd 2608/tcp" >>$${IPKG_INSTROOT}/etc
/services
210 define Package
/quagga-unstable-bgpd
/install
211 $(INSTALL_DIR
) $(1)/usr
/sbin
212 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/bgpd
$(1)/usr
/sbin
/
213 $(INSTALL_DIR
) $(1)/etc
/quagga
214 chmod
0750 $(1)/etc
/quagga
215 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/bgpd.conf
218 define Package
/quagga-unstable-isisd
/install
219 $(INSTALL_DIR
) $(1)/usr
/sbin
220 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/isisd
$(1)/usr
/sbin
/
221 $(INSTALL_DIR
) $(1)/etc
/quagga
222 chmod
0750 $(1)/etc
/quagga
223 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/isisd.conf
226 define Package
/quagga-unstable-ospfd
/install
227 $(INSTALL_DIR
) $(1)/usr
/sbin
228 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ospfd
$(1)/usr
/sbin
/
229 $(INSTALL_DIR
) $(1)/etc
/quagga
230 chmod
0750 $(1)/etc
/quagga
231 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/ospfd.conf
234 define Package
/quagga-unstable-ospf6d
/install
235 $(INSTALL_DIR
) $(1)/usr
/sbin
236 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ospf6d
$(1)/usr
/sbin
/
237 $(INSTALL_DIR
) $(1)/etc
/quagga
238 chmod
0750 $(1)/etc
/quagga
239 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/ospf6d.conf
242 define Package
/quagga-unstable-ripd
/install
243 $(INSTALL_DIR
) $(1)/usr
/sbin
244 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ripd
$(1)/usr
/sbin
/
245 $(INSTALL_DIR
) $(1)/etc
/quagga
246 chmod
0750 $(1)/etc
/quagga
247 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/ripd.conf
250 define Package
/quagga-unstable-ripngd
/install
251 $(INSTALL_DIR
) $(1)/usr
/sbin
252 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ripngd
$(1)/usr
/sbin
/
253 $(INSTALL_DIR
) $(1)/etc
/quagga
254 chmod
0750 $(1)/etc
/quagga
255 $(INSTALL_CONF
) .
/files
/quagga.conf
$(1)/etc
/quagga
/ripngd.conf
258 define Package
/quagga-unstable-vtysh
/install
259 $(INSTALL_DIR
) $(1)/usr
/bin
260 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/vtysh
$(1)/usr
/bin
/
263 define Package
/quagga-unstable-libospf
/install
264 $(INSTALL_DIR
) $(1)/usr
/lib
265 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libospf.so.
* $(1)/usr
/lib
/
268 define Package
/quagga-unstable-libzebra
/install
269 $(INSTALL_DIR
) $(1)/usr
/lib
270 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libzebra.so.
* $(1)/usr
/lib
/
273 $(eval
$(call BuildPackage
,quagga-unstable
))
274 $(eval
$(call BuildPackage
,quagga-unstable-libzebra
))
275 $(eval
$(call BuildPackage
,quagga-unstable-libospf
))
276 $(eval
$(call BuildPackage
,quagga-unstable-bgpd
))
277 #$(eval $(call BuildPackage,quagga-unstable-isisd))
278 $(eval
$(call BuildPackage
,quagga-unstable-ospfd
))
279 #$(eval $(call BuildPackage,quagga-unstable-ospf6d))
280 $(eval
$(call BuildPackage
,quagga-unstable-ripd
))
281 #$(eval $(call BuildPackage,quagga-unstable-ripngd))
282 $(eval
$(call BuildPackage
,quagga-unstable-vtysh
))