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