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