Merge pull request #392 from cotequeiroz/pimbd-constant_cpu_to_be32
[feed/routing.git] / quagga / Makefile
1 #
2 # Copyright (C) 2006-2016 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:=1.1.0
12 PKG_RELEASE:=1
13 PKG_HASH:=f7a43a9c59bfd3722002210530b2553c8d5cc05bfea5acd56d4f102b9f55dc63
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SAVANNAH/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-vtysh
29 PKG_BUILD_PARALLEL:=1
30 PKG_FIXUP:=autoreconf
31 PKG_INSTALL:=1
32 PKG_LICENSE:=GPL-2.0
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 <acinonyx@openwrt.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 DEPENDS+=+quagga-libzebra
80 TITLE:=OSPF library
81 endef
82
83 define Package/quagga-bgpd
84 $(call Package/quagga/Default)
85 DEPENDS+=+quagga-libzebra
86 TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
87 endef
88
89 define Package/quagga-isisd
90 $(call Package/quagga/Default)
91 DEPENDS+=+quagga-libzebra
92 TITLE:=IS-IS routing engine
93 endef
94
95 define Package/quagga-ospfd
96 $(call Package/quagga/Default)
97 DEPENDS+=+quagga-libospf
98 TITLE:=OSPFv2 routing engine
99 endef
100
101 define Package/quagga-ospf6d
102 $(call Package/quagga/Default)
103 DEPENDS+=+quagga-libospf @IPV6
104 TITLE:=OSPFv3 routing engine
105 endef
106
107 define Package/quagga-ripd
108 $(call Package/quagga/Default)
109 DEPENDS+=+quagga-libzebra
110 TITLE:=RIP routing engine
111 endef
112
113 define Package/quagga-ripngd
114 $(call Package/quagga/Default)
115 DEPENDS+=+quagga-libzebra @IPV6
116 TITLE:=RIPNG routing engine
117 endef
118
119 define Package/quagga-vtysh
120 $(call Package/quagga/Default)
121 DEPENDS+=+quagga-libzebra +libreadline +libncurses
122 TITLE:=integrated shell for Quagga routing software
123 endef
124
125 define Package/quagga-zebra/conffiles
126 /etc/quagga/zebra.conf
127 endef
128
129 define Package/quagga-bgpd/conffiles
130 /etc/quagga/bgpd.conf
131 endef
132
133 define Package/quagga-isisd/conffiles
134 /etc/quagga/isisd.conf
135 endef
136
137 define Package/quagga-ospfd/conffiles
138 /etc/quagga/ospfd.conf
139 endef
140
141 define Package/quagga-ospf6d/conffiles
142 /etc/quagga/ospf6d.conf
143 endef
144
145 define Package/quagga-ripd/conffiles
146 /etc/quagga/ripd.conf
147 endef
148
149 define Package/quagga-ripngd/conffiles
150 /etc/quagga/ripngd.conf
151 endef
152
153 ifneq ($(SDK),)
154 CONFIG_PACKAGE_quagga-libzebra:=m
155 CONFIG_PACKAGE_quagga-libospf:=m
156 CONFIG_PACKAGE_quagga-watchquagga:=m
157 CONFIG_PACKAGE_quagga-zebra:=m
158 CONFIG_PACKAGE_quagga-bgpd:=m
159 CONFIG_PACKAGE_quagga-isisd:=m
160 CONFIG_PACKAGE_quagga-ospf6d:=m
161 CONFIG_PACKAGE_quagga-ripd:=m
162 CONFIG_PACKAGE_quagga-ripngd:=m
163 CONFIG_PACKAGE_quagga-vtysh:=m
164 endif
165
166 CONFIGURE_ARGS+= \
167 --localstatedir=/var/run/quagga \
168 --sysconfdir=/etc/quagga/ \
169 --enable-shared \
170 --disable-static \
171 --enable-user=network \
172 --enable-group=network \
173 --enable-multipath=8 \
174 --disable-ospfclient \
175 --disable-capabilities \
176 --disable-doc \
177 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libzebra,zebra) \
178 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libospf,ospfd) \
179 $(call autoconf_bool,CONFIG_PACKAGE_quagga-bgpd,bgpd) \
180 $(call autoconf_bool,CONFIG_PACKAGE_quagga-isisd,isisd) \
181 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ospf6d,ospf6d) \
182 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripd,ripd) \
183 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripngd,ripngd) \
184 $(call autoconf_bool,CONFIG_PACKAGE_quagga-vtysh,vtysh) \
185
186 MAKE_FLAGS += \
187 CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
188
189 define Package/quagga/install
190 $(INSTALL_DIR) $(1)/usr/sbin
191 $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
192 $(INSTALL_DIR) $(1)/etc/init.d
193 $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
194 endef
195
196 define Package/quagga-watchquagga/install
197 $(INSTALL_DIR) $(1)/usr/sbin
198 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
199 endef
200
201 define Package/quagga-zebra/install
202 $(INSTALL_DIR) $(1)/usr/sbin
203 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
204 $(INSTALL_DIR) $(1)/etc/quagga
205 chmod 0750 $(1)/etc/quagga
206 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
207 endef
208
209 define Package/quagga-bgpd/install
210 $(INSTALL_DIR) $(1)/usr/sbin
211 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
212 $(INSTALL_DIR) $(1)/etc/quagga
213 chmod 0750 $(1)/etc/quagga
214 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf
215 endef
216
217 define Package/quagga-isisd/install
218 $(INSTALL_DIR) $(1)/usr/sbin
219 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/
220 $(INSTALL_DIR) $(1)/etc/quagga
221 chmod 0750 $(1)/etc/quagga
222 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/isisd.conf
223 endef
224
225 define Package/quagga-ospfd/install
226 $(INSTALL_DIR) $(1)/usr/sbin
227 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
228 $(INSTALL_DIR) $(1)/etc/quagga
229 chmod 0750 $(1)/etc/quagga
230 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf
231 endef
232
233 define Package/quagga-ospf6d/install
234 $(INSTALL_DIR) $(1)/usr/sbin
235 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
236 $(INSTALL_DIR) $(1)/etc/quagga
237 chmod 0750 $(1)/etc/quagga
238 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf
239 endef
240
241 define Package/quagga-ripd/install
242 $(INSTALL_DIR) $(1)/usr/sbin
243 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
244 $(INSTALL_DIR) $(1)/etc/quagga
245 chmod 0750 $(1)/etc/quagga
246 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripd.conf
247 endef
248
249 define Package/quagga-ripngd/install
250 $(INSTALL_DIR) $(1)/usr/sbin
251 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
252 $(INSTALL_DIR) $(1)/etc/quagga
253 chmod 0750 $(1)/etc/quagga
254 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf
255 endef
256
257 define Package/quagga-vtysh/install
258 $(INSTALL_DIR) $(1)/usr/bin
259 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
260 endef
261
262 define Package/quagga-libospf/install
263 $(INSTALL_DIR) $(1)/usr/lib
264 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/
265 endef
266
267 define Package/quagga-libzebra/install
268 $(INSTALL_DIR) $(1)/usr/lib
269 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
270 endef
271
272 $(eval $(call BuildPackage,quagga))
273 $(eval $(call BuildPackage,quagga-libzebra))
274 $(eval $(call BuildPackage,quagga-libospf))
275 $(eval $(call BuildPackage,quagga-watchquagga))
276 $(eval $(call BuildPackage,quagga-zebra))
277 $(eval $(call BuildPackage,quagga-bgpd))
278 $(eval $(call BuildPackage,quagga-isisd))
279 $(eval $(call BuildPackage,quagga-ospfd))
280 $(eval $(call BuildPackage,quagga-ospf6d))
281 $(eval $(call BuildPackage,quagga-ripd))
282 $(eval $(call BuildPackage,quagga-ripngd))
283 $(eval $(call BuildPackage,quagga-vtysh))