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