ae65ecea8b2b64476fc8c8ab08f144d84ae4d5aa
[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:=1
13 PKG_HASH:=e364c082c3309910e1eb7b068bf39ee298e2f2f3f31a6431a5c115193bd653d3
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 --disable-nhrpd \
178 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libzebra,zebra) \
179 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libospf,ospfd) \
180 $(call autoconf_bool,CONFIG_PACKAGE_quagga-bgpd,bgpd) \
181 $(call autoconf_bool,CONFIG_PACKAGE_quagga-isisd,isisd) \
182 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ospf6d,ospf6d) \
183 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripd,ripd) \
184 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripngd,ripngd) \
185 $(call autoconf_bool,CONFIG_PACKAGE_quagga-vtysh,vtysh) \
186
187 MAKE_FLAGS += \
188 CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
189
190 define Package/quagga/install
191 $(INSTALL_DIR) $(1)/usr/sbin
192 $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
193 $(INSTALL_DIR) $(1)/etc/init.d
194 $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
195 endef
196
197 define Package/quagga-watchquagga/install
198 $(INSTALL_DIR) $(1)/usr/sbin
199 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
200 endef
201
202 define Package/quagga-zebra/install
203 $(INSTALL_DIR) $(1)/usr/sbin
204 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
205 $(INSTALL_DIR) $(1)/etc/quagga
206 chmod 0750 $(1)/etc/quagga
207 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
208 endef
209
210 define Package/quagga-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
216 endef
217
218 define Package/quagga-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
224 endef
225
226 define Package/quagga-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
232 endef
233
234 define Package/quagga-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
240 endef
241
242 define Package/quagga-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
248 endef
249
250 define Package/quagga-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
256 endef
257
258 define Package/quagga-vtysh/install
259 $(INSTALL_DIR) $(1)/usr/bin
260 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
261 endef
262
263 define Package/quagga-libospf/install
264 $(INSTALL_DIR) $(1)/usr/lib
265 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/
266 endef
267
268 define Package/quagga-libzebra/install
269 $(INSTALL_DIR) $(1)/usr/lib
270 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
271 endef
272
273 $(eval $(call BuildPackage,quagga))
274 $(eval $(call BuildPackage,quagga-libzebra))
275 $(eval $(call BuildPackage,quagga-libospf))
276 $(eval $(call BuildPackage,quagga-watchquagga))
277 $(eval $(call BuildPackage,quagga-zebra))
278 $(eval $(call BuildPackage,quagga-bgpd))
279 $(eval $(call BuildPackage,quagga-isisd))
280 $(eval $(call BuildPackage,quagga-ospfd))
281 $(eval $(call BuildPackage,quagga-ospf6d))
282 $(eval $(call BuildPackage,quagga-ripd))
283 $(eval $(call BuildPackage,quagga-ripngd))
284 $(eval $(call BuildPackage,quagga-vtysh))