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