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