6 %bcond_without doc # don't build documentation
7 %bcond_without tc # don't build tc program (it breaks static linkage)
8 %bcond_without atm # don't required ATM.
9 %bcond_with uClibc # do some hacks to build with uClibc
10 %bcond_with iface_descr # build with interface description support
12 Summary: Utility to control Networking behavior in.X kernels
13 Summary(es.UTF-8): Herramientas para encaminamiento avanzado y configuración de interfaces de red
14 Summary(pl.UTF-8): Narzędzie do kontrolowania Sieci w kernelach
15 Summary(pt_BR.UTF-8): Ferramentas para roteamento avançado e configuração de interfaces de rede
18 # do not use ,,2.6.X'' as version here, put whole number like 2.6.8
22 Vendor: Stephen Hemminger <shemminger@osdl.org>
23 Group: Networking/Admin
24 Source0: http://developer.osdl.org/dev/iproute2/download/%{name}-%{version}-%{sdate}.tar.gz
25 # Source0-md5: 193b570128cf852afba337438413adf9
26 Patch0: %{name}-build.patch
27 Patch1: %{name}-arp.patch
28 Patch2: %{name}-lex.patch
29 Patch3: %{name}-iptables.patch
30 Patch4: %{name}-iptables64.patch
31 Patch5: %{name}-LDFLAGS.patch
33 Patch10: %{name}-2.2.4-wrr.patch
34 Patch11: esfq-%{name}.patch
35 Patch12: 001-net-dev-iface-descr-0.1.diff
36 URL: http://linux-net.osdl.org/index.php/Iproute2
38 BuildRequires: db-devel
41 BuildRequires: linux-atm-devel
43 BuildRequires: linux-libc-headers >= 7:2.6.12.0-15
45 BuildRequires: psutils
46 BuildRequires: sgml-tools
47 BuildRequires: tetex-dvips
48 BuildRequires: tetex-fonts-jknappen
49 BuildRequires: tetex-format-latex
50 BuildRequires: tetex-metafont
51 BuildRequires: tetex-tex-babel
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _sbindir /sbin
58 %define _sysconfdir /etc/iproute2
61 Linux maintains compatibility with the basic configuration utilities
62 of the network (ifconfig, route) but a new utility is required to
63 exploit the new characteristics and features of the kernel. This
64 package includes the new utilities.
66 %description -l es.UTF-8
67 Linux mantiene compatibilidad con los utilitarios estándares de
68 configuración de la red, pero se necesitan nuevos utilitarios para
69 usar los recursos y características del nuevo núcleo. Este paquete
70 incluye los nuevos utilitarios.
72 %description -l pl.UTF-8
73 Ten pakiet zawiera programy pozwalające na kontrolę routingu i innych
74 aspektów dotyczących sieci.
76 %description -l pt_BR.UTF-8
77 O Linux mantém compatibilidade com os utilitários padrão de
78 configuração da rede, mas novos utilitários são necessários para fazer
79 uso das características e recursos da nova kernel. This package
80 includes the new utilities.
82 %package -n libnetlink-devel
83 Summary: Library for the netlink interface
84 Summary(pl.UTF-8): Biblioteka do interfejsu netlink
85 Group: Development/Libraries
87 %description -n libnetlink-devel
88 This library provides an interface for kernel-user netlink interface.
90 %description -n libnetlink-devel -l pl.UTF-8
91 Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem
92 a przestrzenią użytkownika.
95 %setup -q -n %{name}-%{version}-%{sdate}
96 rm -rf include-glibc include/linux
100 %if "%{_lib}" == "lib64"
110 %{?with_iface_descr:%patch12 -p1}
115 CC="%{_target_cpu}-uclibc-gcc" \
116 LD="%{_target_cpu}-uclibc-gcc" \
123 LDFLAGS="%{rpmldflags}" \
124 %{!?with_tc:SUBDIRS="lib ip misc"}
126 %{?with_doc:%{__make} -C doc}
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir},%{_mandir}/man8,%{_libdir},%{_includedir}}
132 install ip/{ip,rtmon,routel} %{?with_tc:tc/tc} misc/{ifstat,lnstat,nstat,rtacct,ss} $RPM_BUILD_ROOT%{_sbindir}
133 install etc/iproute2/rt_protos \
134 etc/iproute2/rt_realms \
135 etc/iproute2/rt_scopes \
136 etc/iproute2/rt_tables \
137 $RPM_BUILD_ROOT%{_sysconfdir}
139 install man/man8/* $RPM_BUILD_ROOT%{_mandir}/man8
140 echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-bfifo.8
141 echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-pfifo.8
143 install lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
144 install include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
147 rm -rf $RPM_BUILD_ROOT
150 %defattr(644,root,root,755)
151 %doc README README.decnet README.iproute2+tc README.lnstat RELNOTES
152 %doc ChangeLog %{?with_doc:doc/*.ps}
153 %attr(755,root,root) %{_sbindir}/*
155 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
158 %files -n libnetlink-devel
159 %defattr(644,root,root,755)