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