source: packages/net/quagga/Makefile @ 28319

Last change on this file since 28319 was 28319, checked in by acinonyx, 5 years ago

[packages] quagga: Update to v0.99.20

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 7.4 KB
Line 
1#
2# Copyright (C) 2006-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=quagga
11ifneq ($(CONFIG_QUAGGA_OLD),)
12  PKG_VERSION:=0.98.6
13  PKG_RELEASE:=10
14  PKG_MD5SUM:=b0d4132039953a0214256873b7d23d68
15  PATCH_DIR:=./patches-old
16else
17  PKG_VERSION:=0.99.20
18  PKG_RELEASE:=1
19  PKG_MD5SUM:=64cc29394eb8a4e24649d19dac868f64
20endif
21
22PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
23PKG_SOURCE_URL:=http://www.quagga.net/download/ \
24                http://www.de.quagga.net/download/ \
25                http://www.uk.quagga.net/download/
26PKG_CONFIG_DEPENDS:= \
27        CONFIG_QUAGGA_OLD \
28        CONFIG_IPV6 \
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
37PKG_BUILD_PARALLEL:=1
38PKG_FIXUP:=autoreconf
39PKG_INSTALL:=1
40
41include $(INCLUDE_DIR)/package.mk
42
43define Package/quagga/Default
44  SECTION:=net
45  CATEGORY:=Network
46  SUBMENU:=Routing and Redirection
47  DEPENDS:=quagga
48  TITLE:=The Quagga Software Routing Suite
49  URL:=http://www.quagga.net
50  MAINTAINER:=Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
51endef
52
53define Package/quagga
54  $(call Package/quagga/Default)
55  DEPENDS:=+!QUAGGA_OLD:librt
56  MENU:=1
57endef
58
59define Package/quagga/description
60  A routing software package that provides TCP/IP based routing services
61  with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2,
62  OSPFv3, BGP-4, and BGP-4+
63endef
64
65define Package/quagga/config
66config QUAGGA_OLD
67        depends on (PACKAGE_quagga && BROKEN)
68        default n
69        bool "Use the old release version 0.98.6"
70        help
71          This option allows you to select the old version of Quagga to be built.
72endef
73
74define Package/quagga-libzebra
75  $(call Package/quagga/Default)
76  TITLE:=zebra library
77endef
78
79define Package/quagga-libospf
80  $(call Package/quagga/Default)
81  TITLE:=OSPF library
82endef
83
84define Package/quagga-bgpd
85  $(call Package/quagga/Default)
86  DEPENDS+=+quagga-libzebra
87  TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
88endef
89
90define Package/quagga-isisd
91  $(call Package/quagga/Default)
92  TITLE:=IS-IS routing engine
93endef
94
95define Package/quagga-ospfd
96  $(call Package/quagga/Default)
97  DEPENDS+=+quagga-libospf +quagga-libzebra
98  TITLE:=OSPFv2 routing engine
99endef
100
101define Package/quagga-ospf6d
102  $(call Package/quagga/Default)
103  DEPENDS+=+quagga-libospf +quagga-libzebra @IPV6
104  TITLE:=OSPFv3 routing engine
105endef
106
107define Package/quagga-ripd
108  $(call Package/quagga/Default)
109  DEPENDS+=+quagga-libzebra
110  TITLE:=RIP routing engine
111endef
112
113define Package/quagga-ripngd
114  $(call Package/quagga/Default)
115  DEPENDS+=+quagga-libzebra @IPV6
116  TITLE:=RIPNG routing engine
117endef
118
119define Package/quagga-vtysh
120  $(call Package/quagga/Default)
121  DEPENDS+=quagga-libzebra +libreadline +libncurses
122  TITLE:=integrated shell for Quagga routing software
123endef
124
125define Package/quagga/conffiles
126/etc/quagga/zebra.conf
127endef
128
129define Package/quagga-bgpd/conffiles
130/etc/quagga/bgpd.conf
131endef
132
133define Package/quagga-isisd/conffiles
134/etc/quagga/isisd.conf
135endef
136
137define Package/quagga-ospfd/conffiles
138/etc/quagga/ospfd.conf
139endef
140
141define Package/quagga-ospf6d/conffiles
142/etc/quagga/ospf6d.conf
143endef
144
145define Package/quagga-ripd/conffiles
146/etc/quagga/ripd.conf
147endef
148
149define Package/quagga-ripngd/conffiles
150/etc/quagga/ripngd.conf
151endef
152
153ifneq ($(SDK),)
154CONFIG_PACKAGE_quagga-libzebra:=m
155CONFIG_PACKAGE_quagga-libospf:=m
156CONFIG_PACKAGE_quagga-bgpd:=m
157CONFIG_PACKAGE_quagga-isisd:=m
158CONFIG_PACKAGE_quagga-ospf6d:=m
159CONFIG_PACKAGE_quagga-ripd:=m
160CONFIG_PACKAGE_quagga-ripngd:=m
161CONFIG_PACKAGE_quagga-vtysh:=m
162endif
163
164CONFIGURE_ARGS+= \
165        --localstatedir=/var/run/quagga \
166        --sysconfdir=/etc/quagga/ \
167        --enable-shared \
168        --disable-static \
169        --enable-user=network \
170        --enable-group=network \
171        --enable-pie=no \
172        --enable-multipath=8 \
173        $(call autoconf_bool,CONFIG_PACKAGE_quagga-libzebra,zebra) \
174        $(call autoconf_bool,CONFIG_PACKAGE_quagga-libospf,ospfd) \
175        $(call autoconf_bool,CONFIG_PACKAGE_quagga-bgpd,bgpd) \
176        $(call autoconf_bool,CONFIG_PACKAGE_quagga-isisd,isisd) \
177        $(call autoconf_bool,CONFIG_PACKAGE_quagga-ospf6d,ospf6d) \
178        $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripd,ripd) \
179        $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripngd,ripngd) \
180        $(call autoconf_bool,CONFIG_PACKAGE_quagga-vtysh,vtysh) \
181
182MAKE_FLAGS += \
183        CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
184
185define Build/Configure
186        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
187                autoconf \
188        );
189        $(call Build/Configure/Default)
190endef
191
192define Package/quagga/install
193        $(INSTALL_DIR) $(1)/usr/sbin
194        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
195        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
196        # avoid /etc being set to 0750
197        $(INSTALL_DIR) $(1)/etc/quagga
198        chmod 0750 $(1)/etc/quagga
199        $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
200        $(INSTALL_DIR) $(1)/etc/init.d
201        $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
202        $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
203endef
204
205define Package/quagga-bgpd/install
206        $(INSTALL_DIR) $(1)/usr/sbin
207        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
208        $(INSTALL_DIR) $(1)/etc/quagga
209        chmod 0750 $(1)/etc/quagga
210        $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf
211endef
212
213define Package/quagga-isisd/install
214        $(INSTALL_DIR) $(1)/usr/sbin
215        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/
216        $(INSTALL_DIR) $(1)/etc/quagga
217        chmod 0750 $(1)/etc/quagga
218        $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/isisd.conf
219endef
220
221define Package/quagga-ospfd/install
222        $(INSTALL_DIR) $(1)/usr/sbin
223        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
224        $(INSTALL_DIR) $(1)/etc/quagga
225        chmod 0750 $(1)/etc/quagga
226        $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf
227endef
228
229define Package/quagga-ospf6d/install
230        $(INSTALL_DIR) $(1)/usr/sbin
231        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
232        $(INSTALL_DIR) $(1)/etc/quagga
233        chmod 0750 $(1)/etc/quagga
234        $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf
235endef
236
237define Package/quagga-ripd/install
238        $(INSTALL_DIR) $(1)/usr/sbin
239        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
240        $(INSTALL_DIR) $(1)/etc/quagga
241        chmod 0750 $(1)/etc/quagga
242        $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripd.conf
243endef
244
245define Package/quagga-ripngd/install
246        $(INSTALL_DIR) $(1)/usr/sbin
247        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
248        $(INSTALL_DIR) $(1)/etc/quagga
249        chmod 0750 $(1)/etc/quagga
250        $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf
251endef
252
253define Package/quagga-vtysh/install
254        $(INSTALL_DIR) $(1)/usr/bin
255        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
256endef
257
258define Package/quagga-libospf/install
259        $(INSTALL_DIR) $(1)/usr/lib
260        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/
261endef
262
263define Package/quagga-libzebra/install
264        $(INSTALL_DIR) $(1)/usr/lib
265        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
266endef
267
268$(eval $(call BuildPackage,quagga))
269$(eval $(call BuildPackage,quagga-libzebra))
270$(eval $(call BuildPackage,quagga-libospf))
271$(eval $(call BuildPackage,quagga-bgpd))
272$(eval $(call BuildPackage,quagga-isisd))
273$(eval $(call BuildPackage,quagga-ospfd))
274$(eval $(call BuildPackage,quagga-ospf6d))
275$(eval $(call BuildPackage,quagga-ripd))
276$(eval $(call BuildPackage,quagga-ripngd))
277$(eval $(call BuildPackage,quagga-vtysh))
Note: See TracBrowser for help on using the repository browser.