source: packages/net/quagga/Makefile @ 26360

Last change on this file since 26360 was 26360, checked in by acinonyx, 6 years ago

[packages] quagga: Update to v0.99.18

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