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