]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- readded tc-hfsc(7) man page
[packages/iproute2.git] / iproute2.spec
1 #
2 # TODO:
3 # - fix build @ uClibc
4 # - fix iface_descr patch
5 #
6 # Conditional build
7 %bcond_without  doc             # don't build documentation
8 %bcond_without  tc              # don't build tc program (it breaks static linkage)
9 %bcond_without  atm             # disable ATM support for tc
10 %bcond_with     uClibc          # do some hacks to build with uClibc
11 %bcond_with     iface_descr     # build with interface description support
12
13 Summary:        Advanced IP routing and network device configuration tools
14 Summary(es.UTF-8):      Herramientas para encaminamiento avanzado y configuración de interfaces de red
15 Summary(pl.UTF-8):      Narzędzie do konfigurowania sieci
16 Summary(pt_BR.UTF-8):   Ferramentas para roteamento avançado e configuração de interfaces de rede
17 Name:           iproute2
18 Version:        3.5.1
19 Release:        2
20 License:        GPL v2+
21 Group:          Networking/Admin
22 Source0:        http://kernel.org/pub/linux/utils/net/iproute2/%{name}-%{version}.tar.xz
23 # Source0-md5:  d4425b44edd5eacd6099e672e4baacbf
24 Patch0:         %{name}-build.patch
25 Patch1:         %{name}-arp.patch
26 Patch3:         %{name}-iptables.patch
27 Patch4:         %{name}-iptables64.patch
28 Patch5:         %{name}-LDFLAGS.patch
29 # extensions
30 Patch10:        %{name}-2.2.4-wrr.patch
31 Patch11:        esfq-%{name}.patch
32 Patch12:        001-net-dev-iface-descr-0.1.diff
33 Patch13:        %{name}-q_atm_c.patch
34 Patch14:        %{name}-q_srr.v0.4.patch
35 Patch15:        %{name}-ip_route_get.patch
36 URL:            http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
37 BuildRequires:  bison
38 BuildRequires:  db-devel
39 BuildRequires:  flex
40 BuildRequires:  iptables-devel >= 0:1.4.5
41 # for netlink/* headers used in ip
42 BuildRequires:  libnl1-devel
43 %if %{with atm}
44 BuildRequires:  linux-atm-devel
45 %endif
46 BuildRequires:  linux-libc-headers >= 7:2.6.12.0-15
47 %if %{with doc}
48 BuildRequires:  psutils
49 BuildRequires:  sgml-tools
50 BuildRequires:  texlive-dvips
51 BuildRequires:  texlive-fonts-cmsuper
52 BuildRequires:  texlive-fonts-jknappen
53 BuildRequires:  texlive-latex
54 BuildRequires:  texlive-tex-babel
55 %endif
56 Requires:       iptables-libs >= 0:1.4.5
57 Obsoletes:      ifstat
58 Obsoletes:      iproute
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 %define         _sbindir        /sbin
62 %define         _sysconfdir     /etc/iproute2
63
64 %description
65 The iproute package contains networking utilities (ip, tc and rtmon,
66 for example) which are designed to use the advanced networking
67 capabilities of the Linux 2.4.x and 2.6.x kernel.
68
69 %description -l es.UTF-8
70 Linux mantiene compatibilidad con los utilitarios estándares de
71 configuración de la red, pero se necesitan nuevos utilitarios para
72 usar los recursos y características del nuevo núcleo. Este paquete
73 incluye los nuevos utilitarios.
74
75 %description -l pl.UTF-8
76 Ten pakiet zawiera programy (m.in. ip, tc, rtmon) pozwalające na
77 kontrolę routingu i innych aspektów dotyczących sieci z wykorzystaniem
78 zaawansowanych możliwości jąder Linuksa 2.4.x i 2.6.x.
79
80 %description -l pt_BR.UTF-8
81 O Linux mantém compatibilidade com os utilitários padrão de
82 configuração da rede, mas novos utilitários são necessários para fazer
83 uso das características e recursos da nova kernel. This package
84 includes the new utilities.
85
86 %package -n libnetlink-devel
87 Summary:        Library for the netlink interface
88 Summary(pl.UTF-8):      Biblioteka do interfejsu netlink
89 Group:          Development/Libraries
90
91 %description -n libnetlink-devel
92 This library provides an interface for kernel-user netlink interface.
93
94 %description -n libnetlink-devel -l pl.UTF-8
95 Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem
96 a przestrzenią użytkownika.
97
98 %package doc
99 Summary:        ip and tc documentation with examples
100 Summary(pl.UTF-8):      Dokumentacja do ip i tc z przykładami
101 License:        GPL v2+
102 Group:          Applications/System
103
104 %description doc
105 The iproute documentation contains howtos and examples of settings.
106
107 %description doc -l pl.UTF-8
108 Dokumentacja do iproute zawiera "howto" oraz przykłady ustawień.
109
110 %prep
111 %setup -q
112 #rm -rf include/linux
113 %patch0 -p1
114 %patch1 -p1
115
116 %if "%{_lib}" == "lib64"
117 %patch4 -p1
118 %else
119 %patch3 -p1
120 %endif
121 %patch5 -p1
122
123 # extensions:
124 %patch10 -p1
125 %patch11 -p1
126 %{?with_iface_descr:%patch12 -p1}
127 %patch13 -p0
128 %patch14 -p1
129 %patch15 -p1
130
131 %build
132 %{__make} \
133 %if %{with uClibc}
134         CC="%{_target_cpu}-uclibc-gcc" \
135         LD="%{_target_cpu}-uclibc-gcc" \
136 %else
137         CC="%{__cc}" \
138         LD="%{__cc}" \
139 %endif
140         HOSTCC="%{__cc}" \
141         CCOPTS="%{rpmcflags} %{rpmcppflags}" \
142         LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \
143         LIBDIR=%{_libdir} \
144         %{!?with_tc:SUBDIRS="lib ip misc"}
145
146 %{?with_doc:%{__make} -C doc}
147
148 # make sure we don't produce broken ip binary
149 ./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1
150
151 %install
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT%{_includedir}
154
155 %{__make} install \
156         LIBDIR=%{_libdir} \
157         DESTDIR=$RPM_BUILD_ROOT
158
159 # omitted by make install
160 install -Dp man/man7/tc-hfsc.7 $RPM_BUILD_ROOT%{_mandir}/man7/tc-hfsc.7
161
162 # arpd is not packaged here
163 %{__rm} $RPM_BUILD_ROOT%{_sbindir}/arpd $RPM_BUILD_ROOT%{_mandir}/man8/arpd.8
164
165 cp -a lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
166 cp -a include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
167
168 %if %{with doc}
169 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
170 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
171 %endif
172
173 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/iproute2
174
175 %clean
176 rm -rf $RPM_BUILD_ROOT
177
178 %files
179 %defattr(644,root,root,755)
180 %doc README README.decnet README.iproute2+tc README.distribution README.lnstat
181 %attr(755,root,root) %{_sbindir}/bridge
182 %attr(755,root,root) %{_sbindir}/ctstat
183 %attr(755,root,root) %{_sbindir}/genl
184 %attr(755,root,root) %{_sbindir}/ifcfg
185 %attr(755,root,root) %{_sbindir}/ifstat
186 %attr(755,root,root) %{_sbindir}/ip
187 %attr(755,root,root) %{_sbindir}/lnstat
188 %attr(755,root,root) %{_sbindir}/nstat
189 %attr(755,root,root) %{_sbindir}/routef
190 %attr(755,root,root) %{_sbindir}/routel
191 %attr(755,root,root) %{_sbindir}/rtacct
192 %attr(755,root,root) %{_sbindir}/rtmon
193 %attr(755,root,root) %{_sbindir}/rtpr
194 %attr(755,root,root) %{_sbindir}/rtstat
195 %attr(755,root,root) %{_sbindir}/ss
196 %dir %{_sysconfdir}
197 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ematch_map
198 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/group
199 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_dsfield
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
204 %{_mandir}/man8/bridge.8*
205 %{_mandir}/man8/ip.8*
206 %{_mandir}/man8/ip-*.8*
207 %{_mandir}/man8/ctstat.8*
208 %{_mandir}/man8/lnstat.8*
209 %{_mandir}/man8/nstat.8*
210 %{_mandir}/man8/routef.8*
211 %{_mandir}/man8/routel.8*
212 %{_mandir}/man8/rtacct.8*
213 %{_mandir}/man8/rtmon.8*
214 %{_mandir}/man8/rtstat.8*
215 %{_mandir}/man8/ss.8*
216 %if %{with tc}
217 %attr(755,root,root) %{_sbindir}/tc
218 %dir %{_libdir}/tc
219 %attr(755,root,root) %{_libdir}/tc/*.so
220 %{_libdir}/tc/*.dist
221 %{_mandir}/man7/tc-hfsc.7*
222 %{_mandir}/man8/tc.8*
223 %{_mandir}/man8/tc-*.8*
224 %endif
225
226 %files -n libnetlink-devel
227 %defattr(644,root,root,755)
228 %{_libdir}/libnetlink.a
229 %{_includedir}/libnetlink.h
230 %{_mandir}/man3/libnetlink.3*
231
232 %if %{with doc}
233 %files doc
234 %defattr(644,root,root,755)
235 %doc doc/*.ps
236 %{_examplesdir}/%{name}-%{version}
237 %endif
This page took 0.051149 seconds and 4 git commands to generate.