]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # TODO: | |
3 | # - fix build @ uClibc | |
4 | # - fix iface_descr patch | |
5 | # | |
6 | # Conditional build | |
7 | %bcond_without doc # don't build documentation | |
8 | %bcond_without tc # don't build tc program (it breaks static linkage) | |
9 | %bcond_without atm # disable ATM support for tc | |
10 | %bcond_with uClibc # do some hacks to build with uClibc | |
11 | %bcond_with iface_descr # build with interface description support | |
12 | ||
13 | Summary: Advanced IP routing and network device configuration tools | |
14 | Summary(es.UTF-8): Herramientas para encaminamiento avanzado y configuración de interfaces de red | |
15 | Summary(pl.UTF-8): Narzędzie do konfigurowania sieci | |
16 | Summary(pt_BR.UTF-8): Ferramentas para roteamento avançado e configuração de interfaces de rede | |
17 | Name: iproute2 | |
18 | Version: 3.7.0 | |
19 | Release: 1 | |
20 | License: GPL v2+ | |
21 | Group: Networking/Admin | |
22 | Source0: http://kernel.org/pub/linux/utils/net/iproute2/%{name}-%{version}.tar.xz | |
23 | # Source0-md5: bea92f26c8cc04e79f4db02dc1d258d3 | |
24 | Patch0: %{name}-arp.patch | |
25 | Patch1: %{name}-iptables.patch | |
26 | Patch2: %{name}-iptables64.patch | |
27 | Patch3: %{name}-LDFLAGS.patch | |
28 | # extensions | |
29 | Patch10: %{name}-2.2.4-wrr.patch | |
30 | Patch11: esfq-%{name}.patch | |
31 | Patch12: 001-net-dev-iface-descr-0.1.diff | |
32 | Patch13: %{name}-q_atm_c.patch | |
33 | Patch14: %{name}-q_srr.v0.4.patch | |
34 | Patch15: %{name}-ip_route_get.patch | |
35 | URL: http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 | |
36 | BuildRequires: bison | |
37 | BuildRequires: db-devel | |
38 | BuildRequires: flex | |
39 | BuildRequires: iptables-devel >= 0:1.4.5 | |
40 | # for netlink/* headers used in ip | |
41 | BuildRequires: libnl1-devel | |
42 | %if %{with atm} | |
43 | BuildRequires: linux-atm-devel | |
44 | %endif | |
45 | BuildRequires: linux-libc-headers >= 7:2.6.12.0-15 | |
46 | %if %{with doc} | |
47 | BuildRequires: psutils | |
48 | BuildRequires: sgml-tools | |
49 | BuildRequires: texlive-dvips | |
50 | BuildRequires: texlive-fonts-cmsuper | |
51 | BuildRequires: texlive-fonts-jknappen | |
52 | BuildRequires: texlive-latex | |
53 | BuildRequires: texlive-tex-babel | |
54 | %endif | |
55 | Requires: iptables-libs >= 0:1.4.5 | |
56 | Obsoletes: ifstat | |
57 | Obsoletes: iproute | |
58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
59 | ||
60 | %define _sbindir /sbin | |
61 | %define _sysconfdir /etc/iproute2 | |
62 | ||
63 | %description | |
64 | The iproute package contains networking utilities (ip, tc and rtmon, | |
65 | for example) which are designed to use the advanced networking | |
66 | capabilities of the Linux 2.4.x and 2.6.x kernel. | |
67 | ||
68 | %description -l es.UTF-8 | |
69 | Linux mantiene compatibilidad con los utilitarios estándares de | |
70 | configuración de la red, pero se necesitan nuevos utilitarios para | |
71 | usar los recursos y características del nuevo núcleo. Este paquete | |
72 | incluye los nuevos utilitarios. | |
73 | ||
74 | %description -l pl.UTF-8 | |
75 | Ten pakiet zawiera programy (m.in. ip, tc, rtmon) pozwalające na | |
76 | kontrolę routingu i innych aspektów dotyczących sieci z wykorzystaniem | |
77 | zaawansowanych możliwości jąder Linuksa 2.4.x i 2.6.x. | |
78 | ||
79 | %description -l pt_BR.UTF-8 | |
80 | O Linux mantém compatibilidade com os utilitários padrão de | |
81 | configuração da rede, mas novos utilitários são necessários para fazer | |
82 | uso das características e recursos da nova kernel. This package | |
83 | includes the new utilities. | |
84 | ||
85 | %package -n libnetlink-devel | |
86 | Summary: Library for the netlink interface | |
87 | Summary(pl.UTF-8): Biblioteka do interfejsu netlink | |
88 | Group: Development/Libraries | |
89 | ||
90 | %description -n libnetlink-devel | |
91 | This library provides an interface for kernel-user netlink interface. | |
92 | ||
93 | %description -n libnetlink-devel -l pl.UTF-8 | |
94 | Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem | |
95 | a przestrzenią użytkownika. | |
96 | ||
97 | %package doc | |
98 | Summary: ip and tc documentation with examples | |
99 | Summary(pl.UTF-8): Dokumentacja do ip i tc z przykładami | |
100 | License: GPL v2+ | |
101 | Group: Applications/System | |
102 | ||
103 | %description doc | |
104 | The iproute documentation contains howtos and examples of settings. | |
105 | ||
106 | %description doc -l pl.UTF-8 | |
107 | Dokumentacja do iproute zawiera "howto" oraz przykłady ustawień. | |
108 | ||
109 | %prep | |
110 | %setup -q -n iproute-%{version} | |
111 | ||
112 | # conflict with atm-vbr patched linux-libc-headers | |
113 | %{__rm} include/linux/atm.h | |
114 | #%{__rm} -r include/linux | |
115 | ||
116 | %patch0 -p1 | |
117 | %if "%{_lib}" == "lib64" | |
118 | %patch2 -p1 | |
119 | %else | |
120 | %patch1 -p1 | |
121 | %endif | |
122 | %patch3 -p1 | |
123 | ||
124 | # extensions: | |
125 | %patch10 -p1 | |
126 | %patch11 -p1 | |
127 | %{?with_iface_descr:%patch12 -p1} | |
128 | %patch13 -p0 | |
129 | %patch14 -p1 | |
130 | %patch15 -p1 | |
131 | ||
132 | %build | |
133 | %{__make} \ | |
134 | %if %{with uClibc} | |
135 | CC="%{_target_cpu}-uclibc-gcc" \ | |
136 | LD="%{_target_cpu}-uclibc-gcc" \ | |
137 | %else | |
138 | CC="%{__cc}" \ | |
139 | LD="%{__cc}" \ | |
140 | %endif | |
141 | HOSTCC="%{__cc}" \ | |
142 | CCOPTS="%{rpmcflags} %{rpmcppflags}" \ | |
143 | LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \ | |
144 | LIBDIR=%{_libdir} \ | |
145 | %{!?with_tc:SUBDIRS="lib ip misc"} | |
146 | ||
147 | %{?with_doc:%{__make} -C doc} | |
148 | ||
149 | # make sure we don't produce broken ip binary | |
150 | ./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1 | |
151 | ||
152 | %install | |
153 | rm -rf $RPM_BUILD_ROOT | |
154 | install -d $RPM_BUILD_ROOT%{_includedir} | |
155 | ||
156 | %{__make} install \ | |
157 | LIBDIR=%{_libdir} \ | |
158 | DESTDIR=$RPM_BUILD_ROOT | |
159 | ||
160 | # omitted by make install | |
161 | install -Dp man/man7/tc-hfsc.7 $RPM_BUILD_ROOT%{_mandir}/man7/tc-hfsc.7 | |
162 | ||
163 | # arpd is not packaged here | |
164 | %{__rm} $RPM_BUILD_ROOT%{_sbindir}/arpd $RPM_BUILD_ROOT%{_mandir}/man8/arpd.8 | |
165 | ||
166 | cp -a lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir} | |
167 | cp -a include/libnetlink.h $RPM_BUILD_ROOT%{_includedir} | |
168 | ||
169 | %if %{with doc} | |
170 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
171 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
172 | %endif | |
173 | ||
174 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/iproute2 | |
175 | ||
176 | %clean | |
177 | rm -rf $RPM_BUILD_ROOT | |
178 | ||
179 | %files | |
180 | %defattr(644,root,root,755) | |
181 | %doc README README.decnet README.iproute2+tc README.distribution README.lnstat | |
182 | %attr(755,root,root) %{_sbindir}/bridge | |
183 | %attr(755,root,root) %{_sbindir}/ctstat | |
184 | %attr(755,root,root) %{_sbindir}/genl | |
185 | %attr(755,root,root) %{_sbindir}/ifcfg | |
186 | %attr(755,root,root) %{_sbindir}/ifstat | |
187 | %attr(755,root,root) %{_sbindir}/ip | |
188 | %attr(755,root,root) %{_sbindir}/lnstat | |
189 | %attr(755,root,root) %{_sbindir}/nstat | |
190 | %attr(755,root,root) %{_sbindir}/routef | |
191 | %attr(755,root,root) %{_sbindir}/routel | |
192 | %attr(755,root,root) %{_sbindir}/rtacct | |
193 | %attr(755,root,root) %{_sbindir}/rtmon | |
194 | %attr(755,root,root) %{_sbindir}/rtpr | |
195 | %attr(755,root,root) %{_sbindir}/rtstat | |
196 | %attr(755,root,root) %{_sbindir}/ss | |
197 | %dir %{_sysconfdir} | |
198 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ematch_map | |
199 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/group | |
200 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_dsfield | |
201 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_protos | |
202 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_realms | |
203 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_scopes | |
204 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_tables | |
205 | %{_mandir}/man8/bridge.8* | |
206 | %{_mandir}/man8/ip.8* | |
207 | %{_mandir}/man8/ip-*.8* | |
208 | %{_mandir}/man8/ctstat.8* | |
209 | %{_mandir}/man8/lnstat.8* | |
210 | %{_mandir}/man8/nstat.8* | |
211 | %{_mandir}/man8/routef.8* | |
212 | %{_mandir}/man8/routel.8* | |
213 | %{_mandir}/man8/rtacct.8* | |
214 | %{_mandir}/man8/rtmon.8* | |
215 | %{_mandir}/man8/rtstat.8* | |
216 | %{_mandir}/man8/ss.8* | |
217 | %if %{with tc} | |
218 | %attr(755,root,root) %{_sbindir}/tc | |
219 | %dir %{_libdir}/tc | |
220 | %attr(755,root,root) %{_libdir}/tc/*.so | |
221 | %{_libdir}/tc/*.dist | |
222 | %{_mandir}/man7/tc-hfsc.7* | |
223 | %{_mandir}/man8/tc.8* | |
224 | %{_mandir}/man8/tc-*.8* | |
225 | %endif | |
226 | ||
227 | %files -n libnetlink-devel | |
228 | %defattr(644,root,root,755) | |
229 | %{_libdir}/libnetlink.a | |
230 | %{_includedir}/libnetlink.h | |
231 | %{_mandir}/man3/libnetlink.3* | |
232 | ||
233 | %if %{with doc} | |
234 | %files doc | |
235 | %defattr(644,root,root,755) | |
236 | %doc doc/*.ps | |
237 | %{_examplesdir}/%{name}-%{version} | |
238 | %endif |