]>
Commit | Line | Data |
---|---|---|
4d4e8753 | 1 | # |
0a1f6d9e AM |
2 | # TODO: |
3 | # - fix build @ uClibc | |
039e8f2b | 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) | |
d072516f | 9 | %bcond_without atm # don't required ATM. |
c2f906a7 | 10 | %bcond_with uClibc # do some hacks to build with uClibc |
039e8f2b | 11 | #%bcond_with iface_descr # build with interface description support |
61f3b6a3 | 12 | # |
0a1f6d9e | 13 | Summary: Utility to control Networking behavior in.X kernels |
d2344512 ER |
14 | Summary(es.UTF-8): Herramientas para encaminamiento avanzado y configuración de interfaces de red |
15 | Summary(pl.UTF-8): Narzędzie do kontrolowania Sieci w kernelach | |
16 | Summary(pt_BR.UTF-8): Ferramentas para roteamento avançado e configuração de interfaces de rede | |
354f4215 | 17 | Name: iproute2 |
aa691b5d | 18 | # do not use ,,2.6.X'' as version here, put whole number like 2.6.8 |
557abf76 | 19 | Version: 2.6.35 |
0f0817af | 20 | Release: 2 |
323e0978 | 21 | License: GPL |
354f4215 | 22 | Group: Networking/Admin |
50efb828 | 23 | Source0: http://devresources.linux-foundation.org/dev/iproute2/download/%{name}-%{version}.tar.bz2 |
557abf76 | 24 | # Source0-md5: b0f281b3124bf04669e18f5fe16d4934 |
e1c03590 | 25 | Source1: libnetlink.3 |
4c4edaba | 26 | Patch0: %{name}-build.patch |
3f9edb83 | 27 | Patch1: %{name}-arp.patch |
e3fc76c4 | 28 | Patch3: %{name}-iptables.patch |
29 | Patch4: %{name}-iptables64.patch | |
93591f64 | 30 | Patch5: %{name}-LDFLAGS.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 |
9b057263 | 37 | URL: http://linux-net.osdl.org/index.php/Iproute2 |
4ef82693 | 38 | BuildRequires: bison |
4c573c73 | 39 | BuildRequires: db-devel |
e3fc76c4 | 40 | BuildRequires: flex |
4daabbab | 41 | BuildRequires: iptables-devel >= 0:1.4.3 |
d072516f | 42 | %if %{with atm} |
76ab126a | 43 | BuildRequires: linux-atm-devel |
d072516f | 44 | %endif |
1525a420 | 45 | BuildRequires: linux-libc-headers >= 7:2.6.12.0-15 |
61f3b6a3 PS |
46 | %if %{with doc} |
47 | BuildRequires: psutils | |
48 | BuildRequires: sgml-tools | |
defcb014 | 49 | %if "%{pld_release}" != "th" |
50 | BuildRequires: tetex-dvips | |
51 | BuildRequires: tetex-fonts-jknappen | |
52 | BuildRequires: tetex-format-latex | |
53 | BuildRequires: tetex-metafont | |
54 | BuildRequires: tetex-tex-babel | |
55 | %else | |
38a6c613 | 56 | BuildRequires: texlive-dvips |
57 | BuildRequires: texlive-fonts-cmsuper | |
58 | BuildRequires: texlive-fonts-jknappen | |
59 | BuildRequires: texlive-latex | |
60 | BuildRequires: texlive-tex-babel | |
61f3b6a3 | 61 | %endif |
defcb014 | 62 | %endif |
b84ea0a7 | 63 | Obsoletes: ifstat |
e1c03590 | 64 | Obsoletes: iproute |
4c4edaba | 65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8ca003ed | 66 | |
9ea83253 | 67 | %define _sbindir /sbin |
68 | %define _sysconfdir /etc/iproute2 | |
c2827c7c | 69 | |
8ca003ed | 70 | %description |
af6313ca SP |
71 | Linux maintains compatibility with the basic configuration utilities |
72 | of the network (ifconfig, route) but a new utility is required to | |
73 | exploit the new characteristics and features of the kernel. This | |
74 | package includes the new utilities. | |
e316d7c9 | 75 | |
70fcbc5f JR |
76 | %description -l es.UTF-8 |
77 | Linux mantiene compatibilidad con los utilitarios estándares de | |
78 | configuración de la red, pero se necesitan nuevos utilitarios para | |
79 | usar los recursos y características del nuevo núcleo. Este paquete | |
e316d7c9 | 80 | incluye los nuevos utilitarios. |
323e0978 | 81 | |
70fcbc5f JR |
82 | %description -l pl.UTF-8 |
83 | Ten pakiet zawiera programy pozwalające na kontrolę routingu i innych | |
84 | aspektów dotyczących sieci. | |
e316d7c9 | 85 | |
70fcbc5f JR |
86 | %description -l pt_BR.UTF-8 |
87 | O Linux mantém compatibilidade com os utilitários padrão de | |
88 | configuração da rede, mas novos utilitários são necessários para fazer | |
89 | uso das características e recursos da nova kernel. This package | |
e316d7c9 | 90 | includes the new utilities. |
323e0978 | 91 | |
49c78676 JK |
92 | %package -n libnetlink-devel |
93 | Summary: Library for the netlink interface | |
d2344512 | 94 | Summary(pl.UTF-8): Biblioteka do interfejsu netlink |
49c78676 JK |
95 | Group: Development/Libraries |
96 | ||
97 | %description -n libnetlink-devel | |
98 | This library provides an interface for kernel-user netlink interface. | |
99 | ||
70fcbc5f JR |
100 | %description -n libnetlink-devel -l pl.UTF-8 |
101 | Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem | |
102 | a przestrzenią użytkownika. | |
a52556c3 | 103 | |
8ca003ed | 104 | %prep |
50efb828 | 105 | %setup -q |
4c4edaba JB |
106 | #rm -rf include/linux |
107 | %patch0 -p1 | |
039e8f2b | 108 | %patch1 -p1 |
36f42953 | 109 | |
039e8f2b BZ |
110 | %if "%{_lib}" == "lib64" |
111 | %patch4 -p1 | |
112 | %else | |
113 | %patch3 -p1 | |
114 | %endif | |
115 | %patch5 -p1 | |
91d521f5 PG |
116 | |
117 | # extensions: | |
6234a9fe | 118 | %patch10 -p1 |
039e8f2b | 119 | %patch11 -p1 |
f30217b5 | 120 | #%{?with_iface_descr:%patch12 -p1} |
99e81fa6 | 121 | %patch13 -p0 |
8f6469c2 | 122 | %patch14 -p1 |
d1f6ab22 | 123 | |
8ca003ed | 124 | %build |
dd97cf21 | 125 | %{__make} \ |
93591f64 | 126 | %if %{with uClibc} |
127 | CC="%{_target_cpu}-uclibc-gcc" \ | |
128 | LD="%{_target_cpu}-uclibc-gcc" \ | |
129 | %else | |
130 | CC="%{__cc}" \ | |
131 | LD="%{__cc}" \ | |
132 | %endif | |
f2b536a2 | 133 | HOSTCC="%{__cc}" \ |
25f0047d | 134 | OPT="%{rpmcflags}" \ |
4e7688ae | 135 | LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \ |
93591f64 | 136 | %{!?with_tc:SUBDIRS="lib ip misc"} |
207621e4 | 137 | |
1b109167 | 138 | %{?with_doc:%{__make} -C doc} |
8ca003ed | 139 | |
5e896a68 AM |
140 | # make sure we don't produce broken ip binary |
141 | ./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1 | |
142 | ||
8ca003ed AM |
143 | %install |
144 | rm -rf $RPM_BUILD_ROOT | |
e1c03590 | 145 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir},%{_mandir}/man{3,8},%{_libdir},%{_includedir},%{?with_tc:%{_libdir}/tc}} |
9ea83253 | 146 | |
3f9edb83 | 147 | install ip/{ip,rtmon,routel} %{?with_tc:tc/tc} misc/{ifstat,lnstat,nstat,rtacct,ss} $RPM_BUILD_ROOT%{_sbindir} |
354f4215 | 148 | install etc/iproute2/rt_protos \ |
149 | etc/iproute2/rt_realms \ | |
150 | etc/iproute2/rt_scopes \ | |
151 | etc/iproute2/rt_tables \ | |
323e0978 | 152 | $RPM_BUILD_ROOT%{_sysconfdir} |
0a1f6d9e | 153 | |
e1c03590 | 154 | cp -a man/man8/* $RPM_BUILD_ROOT%{_mandir}/man8 |
0a1f6d9e AM |
155 | echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-bfifo.8 |
156 | echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-pfifo.8 | |
e1c03590 | 157 | cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man3 |
0a1f6d9e | 158 | |
49c78676 JK |
159 | install lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir} |
160 | install include/libnetlink.h $RPM_BUILD_ROOT%{_includedir} | |
49382eb3 | 161 | %{?with_tc:install tc/*.so $RPM_BUILD_ROOT%{_libdir}/tc} |
354f4215 | 162 | |
8ca003ed AM |
163 | %clean |
164 | rm -rf $RPM_BUILD_ROOT | |
165 | ||
166 | %files | |
167 | %defattr(644,root,root,755) | |
9b6ea7ca AM |
168 | %doc README README.decnet README.iproute2+tc README.lnstat RELNOTES |
169 | %doc ChangeLog %{?with_doc:doc/*.ps} | |
e1c03590 ER |
170 | %attr(755,root,root) %{_sbindir}/ifstat |
171 | %attr(755,root,root) %{_sbindir}/ip | |
172 | %attr(755,root,root) %{_sbindir}/lnstat | |
173 | %attr(755,root,root) %{_sbindir}/nstat | |
174 | %attr(755,root,root) %{_sbindir}/routel | |
175 | %attr(755,root,root) %{_sbindir}/rtacct | |
176 | %attr(755,root,root) %{_sbindir}/rtmon | |
177 | %attr(755,root,root) %{_sbindir}/ss | |
178 | %attr(755,root,root) %{_sbindir}/tc | |
dd519f44 | 179 | %dir %{_sysconfdir} |
e1c03590 ER |
180 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_protos |
181 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_realms | |
182 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_scopes | |
183 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_tables | |
6ef7db99 | 184 | %{_mandir}/man8/* |
49382eb3 | 185 | %{?with_tc:%dir %{_libdir}/tc} |
186 | %{?with_tc:%attr(755,root,root) %{_libdir}/tc/*.so} | |
49c78676 JK |
187 | |
188 | %files -n libnetlink-devel | |
189 | %defattr(644,root,root,755) | |
c529e3fb JB |
190 | %{_libdir}/libnetlink.a |
191 | %{_includedir}/libnetlink.h | |
e1c03590 | 192 | %{_mandir}/man3/libnetlink.3* |