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