[packages] memcached: update to 1.4.11 (#10804), add missing libpthread dependency...
[openwrt/svn-archive/archive.git] / net / quagga / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=quagga
11 ifneq ($(CONFIG_QUAGGA_OLD),)
12 PKG_VERSION:=0.98.6
13 PKG_RELEASE:=11
14 PKG_MD5SUM:=b0d4132039953a0214256873b7d23d68
15 PATCH_DIR:=./patches-old
16 else
17 PKG_VERSION:=0.99.20
18 PKG_RELEASE:=2
19 PKG_MD5SUM:=64cc29394eb8a4e24649d19dac868f64
20 endif
21
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
23 PKG_SOURCE_URL:=http://www.quagga.net/download/ \
24 http://www.de.quagga.net/download/ \
25 http://www.uk.quagga.net/download/
26 PKG_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
37 PKG_BUILD_PARALLEL:=1
38 PKG_FIXUP:=autoreconf
39 PKG_INSTALL:=1
40
41 include $(INCLUDE_DIR)/package.mk
42
43 define 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>
51 endef
52
53 define Package/quagga
54 $(call Package/quagga/Default)
55 DEPENDS:=+!QUAGGA_OLD:librt
56 MENU:=1
57 endef
58
59 define 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+
63 endef
64
65 define Package/quagga/config
66 config 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.
72 endef
73
74 define Package/quagga-libzebra
75 $(call Package/quagga/Default)
76 TITLE:=zebra library
77 endef
78
79 define Package/quagga-libospf
80 $(call Package/quagga/Default)
81 TITLE:=OSPF library
82 endef
83
84 define Package/quagga-bgpd
85 $(call Package/quagga/Default)
86 DEPENDS+=+quagga-libzebra
87 TITLE:=BGPv4, BGPv4+, BGPv4- routing engine
88 endef
89
90 define Package/quagga-isisd
91 $(call Package/quagga/Default)
92 TITLE:=IS-IS routing engine
93 endef
94
95 define Package/quagga-ospfd
96 $(call Package/quagga/Default)
97 DEPENDS+=+quagga-libospf +quagga-libzebra
98 TITLE:=OSPFv2 routing engine
99 endef
100
101 define Package/quagga-ospf6d
102 $(call Package/quagga/Default)
103 DEPENDS+=+quagga-libospf +quagga-libzebra @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/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-bgpd:=m
157 CONFIG_PACKAGE_quagga-isisd:=m
158 CONFIG_PACKAGE_quagga-ospf6d:=m
159 CONFIG_PACKAGE_quagga-ripd:=m
160 CONFIG_PACKAGE_quagga-ripngd:=m
161 CONFIG_PACKAGE_quagga-vtysh:=m
162 endif
163
164 CONFIGURE_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 --disable-ospfclient \
174 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libzebra,zebra) \
175 $(call autoconf_bool,CONFIG_PACKAGE_quagga-libospf,ospfd) \
176 $(call autoconf_bool,CONFIG_PACKAGE_quagga-bgpd,bgpd) \
177 $(call autoconf_bool,CONFIG_PACKAGE_quagga-isisd,isisd) \
178 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ospf6d,ospf6d) \
179 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripd,ripd) \
180 $(call autoconf_bool,CONFIG_PACKAGE_quagga-ripngd,ripngd) \
181 $(call autoconf_bool,CONFIG_PACKAGE_quagga-vtysh,vtysh) \
182
183 MAKE_FLAGS += \
184 CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
185
186 define Build/Configure
187 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
188 autoconf \
189 );
190 $(call Build/Configure/Default)
191 endef
192
193 define Package/quagga/install
194 $(INSTALL_DIR) $(1)/usr/sbin
195 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(1)/usr/sbin/
196 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(1)/usr/sbin/
197 # avoid /etc being set to 0750
198 $(INSTALL_DIR) $(1)/etc/quagga
199 chmod 0750 $(1)/etc/quagga
200 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/zebra.conf
201 $(INSTALL_DIR) $(1)/etc/init.d
202 $(INSTALL_BIN) ./files/quagga $(1)/usr/sbin/quagga.init
203 $(INSTALL_BIN) ./files/quagga.init $(1)/etc/init.d/quagga
204 endef
205
206 define Package/quagga-bgpd/install
207 $(INSTALL_DIR) $(1)/usr/sbin
208 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(1)/usr/sbin/
209 $(INSTALL_DIR) $(1)/etc/quagga
210 chmod 0750 $(1)/etc/quagga
211 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/bgpd.conf
212 endef
213
214 define Package/quagga-isisd/install
215 $(INSTALL_DIR) $(1)/usr/sbin
216 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/isisd $(1)/usr/sbin/
217 $(INSTALL_DIR) $(1)/etc/quagga
218 chmod 0750 $(1)/etc/quagga
219 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/isisd.conf
220 endef
221
222 define Package/quagga-ospfd/install
223 $(INSTALL_DIR) $(1)/usr/sbin
224 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(1)/usr/sbin/
225 $(INSTALL_DIR) $(1)/etc/quagga
226 chmod 0750 $(1)/etc/quagga
227 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospfd.conf
228 endef
229
230 define Package/quagga-ospf6d/install
231 $(INSTALL_DIR) $(1)/usr/sbin
232 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(1)/usr/sbin/
233 $(INSTALL_DIR) $(1)/etc/quagga
234 chmod 0750 $(1)/etc/quagga
235 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ospf6d.conf
236 endef
237
238 define Package/quagga-ripd/install
239 $(INSTALL_DIR) $(1)/usr/sbin
240 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(1)/usr/sbin/
241 $(INSTALL_DIR) $(1)/etc/quagga
242 chmod 0750 $(1)/etc/quagga
243 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripd.conf
244 endef
245
246 define Package/quagga-ripngd/install
247 $(INSTALL_DIR) $(1)/usr/sbin
248 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(1)/usr/sbin/
249 $(INSTALL_DIR) $(1)/etc/quagga
250 chmod 0750 $(1)/etc/quagga
251 $(INSTALL_CONF) ./files/quagga.conf $(1)/etc/quagga/ripngd.conf
252 endef
253
254 define Package/quagga-vtysh/install
255 $(INSTALL_DIR) $(1)/usr/bin
256 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(1)/usr/bin/
257 endef
258
259 define Package/quagga-libospf/install
260 $(INSTALL_DIR) $(1)/usr/lib
261 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(1)/usr/lib/
262 endef
263
264 define Package/quagga-libzebra/install
265 $(INSTALL_DIR) $(1)/usr/lib
266 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(1)/usr/lib/
267 endef
268
269 $(eval $(call BuildPackage,quagga))
270 $(eval $(call BuildPackage,quagga-libzebra))
271 $(eval $(call BuildPackage,quagga-libospf))
272 $(eval $(call BuildPackage,quagga-bgpd))
273 $(eval $(call BuildPackage,quagga-isisd))
274 $(eval $(call BuildPackage,quagga-ospfd))
275 $(eval $(call BuildPackage,quagga-ospf6d))
276 $(eval $(call BuildPackage,quagga-ripd))
277 $(eval $(call BuildPackage,quagga-ripngd))
278 $(eval $(call BuildPackage,quagga-vtysh))