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