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