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