[packages] quagga: Bump to v0.99.21
[packages.git] / net / quagga / Makefile
1 #
2 # Copyright (C) 2006-2012 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.21
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=99840adbe57047c90dfba6b6ed9aec7f
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.quagga.net/download/ \
17                 http://www.de.quagga.net/download/ \
18                 http://www.uk.quagga.net/download/
19 PKG_CONFIG_DEPENDS:= \
20         CONFIG_IPV6 \
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
33 include $(INCLUDE_DIR)/package.mk
34
35 define Package/quagga/Default
36   SECTION:=net
37   CATEGORY:=Network
38   SUBMENU:=Routing and Redirection
39   DEPENDS:=quagga
40   TITLE:=The Quagga Software Routing Suite
41   URL:=http://www.quagga.net
42   MAINTAINER:=Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
43 endef
44
45 define Package/quagga
46   $(call Package/quagga/Default)
47   DEPENDS:=+librt
48   MENU:=1
49 endef
50
51 define Package/quagga/description
52   A routing software package that provides TCP/IP based routing services
53   with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2,
54   OSPFv3, BGP-4, and BGP-4+
55 endef
56
57 define Package/quagga-libzebra
58   $(call Package/quagga/Default)
59   TITLE:=zebra library
60 endef
61
62 define Package/quagga-libospf
63   $(call Package/quagga/Default)
64   TITLE:=OSPF library
65 endef
66
67 define Package/quagga-bgpd
68   $(call Package/quagga/Default)
69   DEPENDS+=+quagga-libzebra
70   TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
71 endef
72
73 define Package/quagga-isisd
74   $(call Package/quagga/Default)
75   TITLE:=IS-IS routing engine
76 endef
77
78 define Package/quagga-ospfd
79   $(call Package/quagga/Default)
80   DEPENDS+=+quagga-libospf +quagga-libzebra
81   TITLE:=OSPFv2 routing engine
82 endef
83
84 define Package/quagga-ospf6d
85   $(call Package/quagga/Default)
86   DEPENDS+=+quagga-libospf +quagga-libzebra @IPV6
87   TITLE:=OSPFv3 routing engine
88 endef
89
90 define Package/quagga-ripd
91   $(call Package/quagga/Default)
92   DEPENDS+=+quagga-libzebra
93   TITLE:=RIP routing engine
94 endef
95
96 define Package/quagga-ripngd
97   $(call Package/quagga/Default)
98   DEPENDS+=+quagga-libzebra @IPV6
99   TITLE:=RIPNG routing engine
100 endef
101
102 define Package/quagga-vtysh
103   $(call Package/quagga/Default)
104   DEPENDS+=quagga-libzebra +libreadline +libncurses
105   TITLE:=integrated shell for Quagga routing software
106 endef
107
108 define Package/quagga/conffiles
109 /etc/quagga/zebra.conf
110 endef
111
112 define Package/quagga-bgpd/conffiles
113 /etc/quagga/bgpd.conf
114 endef
115
116 define Package/quagga-isisd/conffiles
117 /etc/quagga/isisd.conf
118 endef
119
120 define Package/quagga-ospfd/conffiles
121 /etc/quagga/ospfd.conf
122 endef
123
124 define Package/quagga-ospf6d/conffiles
125 /etc/quagga/ospf6d.conf
126 endef
127
128 define Package/quagga-ripd/conffiles
129 /etc/quagga/ripd.conf
130 endef
131
132 define Package/quagga-ripngd/conffiles
133 /etc/quagga/ripngd.conf
134 endef
135
136 ifneq ($(SDK),)
137 CONFIG_PACKAGE_quagga-libzebra:=m
138 CONFIG_PACKAGE_quagga-libospf:=m
139 CONFIG_PACKAGE_quagga-bgpd:=m
140 CONFIG_PACKAGE_quagga-isisd:=m
141 CONFIG_PACKAGE_quagga-ospf6d:=m
142 CONFIG_PACKAGE_quagga-ripd:=m
143 CONFIG_PACKAGE_quagga-ripngd:=m
144 CONFIG_PACKAGE_quagga-vtysh:=m
145 endif
146
147 CONFIGURE_ARGS+= \
148         --localstatedir=/var/run/quagga \
149         --sysconfdir=/etc/quagga/ \
150         --enable-shared \
151         --disable-static \
152         --enable-user=network \
153         --enable-group=network \
154         --enable-pie=no \
155         --enable-multipath=8 \
156         --disable-ospfclient \
157         --disable-capabilities \
158         $(call autoconf_bool,CONFIG_PACKAGE_quagga-libzebra,zebra) \
159         $(call autoconf_bool,CONFIG_PACKAGE_quagga-libospf,ospfd) \
160         $(call autoconf_bool,CONFIG_PACKAGE_quagga-bgpd,bgpd) \
161         $(call autoconf_bool,CONFIG_PACKAGE_quagga-isisd,isisd) \
162         $(call autoconf_bool,CONFIG_PACKAGE_quagga-ospf6d,ospf6d) \
163         $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripd,ripd) \
164         $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripngd,ripngd) \
165         $(call autoconf_bool,CONFIG_PACKAGE_quagga-vtysh,vtysh) \
166
167 MAKE_FLAGS += \
168         CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
169
170 define Build/Configure
171         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
172                 autoconf \
173         );
174         $(call Build/Configure/Default)
175 endef
176
177 define Package/quagga/install
178         $(INSTALL_DIR) $(1)/usr/sbin
179         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
180         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
181         # avoid /etc being set to 0750
182         $(INSTALL_DIR) $(1)/etc/quagga
183         chmod 0750 $(1)/etc/quagga
184         $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
185         $(INSTALL_DIR) $(1)/etc/init.d
186         $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
187         $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
188 endef
189
190 define Package/quagga-bgpd/install
191         $(INSTALL_DIR) $(1)/usr/sbin
192         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
193         $(INSTALL_DIR) $(1)/etc/quagga
194         chmod 0750 $(1)/etc/quagga
195         $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf
196 endef
197
198 define Package/quagga-isisd/install
199         $(INSTALL_DIR) $(1)/usr/sbin
200         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/
201         $(INSTALL_DIR) $(1)/etc/quagga
202         chmod 0750 $(1)/etc/quagga
203         $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/isisd.conf
204 endef
205
206 define Package/quagga-ospfd/install
207         $(INSTALL_DIR) $(1)/usr/sbin
208         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
209         $(INSTALL_DIR) $(1)/etc/quagga
210         chmod 0750 $(1)/etc/quagga
211         $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf
212 endef
213
214 define Package/quagga-ospf6d/install
215         $(INSTALL_DIR) $(1)/usr/sbin
216         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
217         $(INSTALL_DIR) $(1)/etc/quagga
218         chmod 0750 $(1)/etc/quagga
219         $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf
220 endef
221
222 define Package/quagga-ripd/install
223         $(INSTALL_DIR) $(1)/usr/sbin
224         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
225         $(INSTALL_DIR) $(1)/etc/quagga
226         chmod 0750 $(1)/etc/quagga
227         $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripd.conf
228 endef
229
230 define Package/quagga-ripngd/install
231         $(INSTALL_DIR) $(1)/usr/sbin
232         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
233         $(INSTALL_DIR) $(1)/etc/quagga
234         chmod 0750 $(1)/etc/quagga
235         $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf
236 endef
237
238 define Package/quagga-vtysh/install
239         $(INSTALL_DIR) $(1)/usr/bin
240         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
241 endef
242
243 define Package/quagga-libospf/install
244         $(INSTALL_DIR) $(1)/usr/lib
245         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/
246 endef
247
248 define Package/quagga-libzebra/install
249         $(INSTALL_DIR) $(1)/usr/lib
250         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
251 endef
252
253 $(eval $(call BuildPackage,quagga))
254 $(eval $(call BuildPackage,quagga-libzebra))
255 $(eval $(call BuildPackage,quagga-libospf))
256 $(eval $(call BuildPackage,quagga-bgpd))
257 $(eval $(call BuildPackage,quagga-isisd))
258 $(eval $(call BuildPackage,quagga-ospfd))
259 $(eval $(call BuildPackage,quagga-ospf6d))
260 $(eval $(call BuildPackage,quagga-ripd))
261 $(eval $(call BuildPackage,quagga-ripngd))
262 $(eval $(call BuildPackage,quagga-vtysh))