]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- up to 2.6.39
[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:        2.6.39
19 Release:        1
20 License:        GPL v2+
21 Group:          Networking/Admin
22 Source0:        http://devresources.linux-foundation.org/dev/iproute2/download/%{name}-%{version}.tar.gz
23 # Source0-md5:  8a3b6bc77c2ecf752284aa4a6fc630a6
24 Source1:        libnetlink.3
25 Patch0:         %{name}-build.patch
26 Patch1:         %{name}-arp.patch
27 Patch3:         %{name}-iptables.patch
28 Patch4:         %{name}-iptables64.patch
29 Patch5:         %{name}-LDFLAGS.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 Patch16:        %{name}-xt.patch
38 URL:            http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
39 BuildRequires:  bison
40 BuildRequires:  db-devel
41 BuildRequires:  flex
42 BuildRequires:  iptables-devel >= 0:1.4.3
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 %if "%{pld_release}" != "th"
51 BuildRequires:  tetex-dvips
52 BuildRequires:  tetex-fonts-jknappen
53 BuildRequires:  tetex-format-latex
54 BuildRequires:  tetex-metafont
55 BuildRequires:  tetex-tex-babel
56 %else
57 BuildRequires:  texlive-dvips
58 BuildRequires:  texlive-fonts-cmsuper
59 BuildRequires:  texlive-fonts-jknappen
60 BuildRequires:  texlive-latex
61 BuildRequires:  texlive-tex-babel
62 %endif
63 %endif
64 Obsoletes:      ifstat
65 Obsoletes:      iproute
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %define         _sbindir        /sbin
69 %define         _sysconfdir     /etc/iproute2
70
71 %description
72 The iproute package contains networking utilities (ip, tc and rtmon,
73 for example) which are designed to use the advanced networking
74 capabilities of the Linux 2.4.x and 2.6.x kernel.
75
76 %description -l es.UTF-8
77 Linux mantiene compatibilidad con los utilitarios estándares de
78 configuración de la red, pero se necesitan nuevos utilitarios para
79 usar los recursos y características del nuevo núcleo. Este paquete
80 incluye los nuevos utilitarios.
81
82 %description -l pl.UTF-8
83 Ten pakiet zawiera programy (m.in. ip, tc, rtmon) pozwalające na
84 kontrolę routingu i innych aspektów dotyczących sieci z wykorzystaniem
85 zaawansowanych możliwości jąder Linuksa 2.4.x i 2.6.x.
86
87 %description -l pt_BR.UTF-8
88 O Linux mantém compatibilidade com os utilitários padrão de
89 configuração da rede, mas novos utilitários são necessários para fazer
90 uso das características e recursos da nova kernel. This package
91 includes the new utilities.
92
93 %package -n libnetlink-devel
94 Summary:        Library for the netlink interface
95 Summary(pl.UTF-8):      Biblioteka do interfejsu netlink
96 Group:          Development/Libraries
97
98 %description -n libnetlink-devel
99 This library provides an interface for kernel-user netlink interface.
100
101 %description -n libnetlink-devel -l pl.UTF-8
102 Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem
103 a przestrzenią użytkownika.
104
105 %package doc
106 Summary:        ip and tc documentation with examples
107 Summary(pl.UTF-8):      Dokumentacja do ip i tc z przykładami
108 License:        GPL v2+
109 Group:          Applications/System
110
111 %description doc
112 The iproute documentation contains howtos and examples of settings.
113
114 %description doc -l pl.UTF-8
115 Dokumentacja do iproute zawiera "howto" oraz przykłady ustawień.
116
117 %prep
118 %setup -q
119 #rm -rf include/linux
120 %patch0 -p1
121 %patch1 -p1
122
123 %if "%{_lib}" == "lib64"
124 %patch4 -p1
125 %else
126 %patch3 -p1
127 %endif
128 %patch5 -p1
129
130 # extensions:
131 %patch10 -p1
132 %patch11 -p1
133 %{?with_iface_descr:%patch12 -p1}
134 %patch13 -p0
135 %patch14 -p1
136 %patch15 -p1
137 %patch16 -p1
138
139 %build
140 %{__make} \
141 %if %{with uClibc}
142         CC="%{_target_cpu}-uclibc-gcc" \
143         LD="%{_target_cpu}-uclibc-gcc" \
144 %else
145         CC="%{__cc}" \
146         LD="%{__cc}" \
147 %endif
148         HOSTCC="%{__cc}" \
149         OPT="%{rpmcflags} %{rpmcppflags}" \
150         LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \
151         LIBDIR=%{_libdir} \
152         %{!?with_tc:SUBDIRS="lib ip misc"}
153
154 %{?with_doc:%{__make} -C doc}
155
156 # make sure we don't produce broken ip binary
157 ./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir},%{_mandir}/man{3,8},%{_libdir},%{_includedir},%{?with_tc:%{_libdir}/tc}}
162
163 install -p ip/{ip,rtmon,routel} %{?with_tc:tc/tc} misc/{ifstat,lnstat,nstat,rtacct,ss} $RPM_BUILD_ROOT%{_sbindir}
164 cp -a etc/iproute2/rt_protos \
165         etc/iproute2/rt_realms \
166         etc/iproute2/rt_scopes \
167         etc/iproute2/rt_tables \
168         $RPM_BUILD_ROOT%{_sysconfdir}
169
170 cp -a man/man8/*        $RPM_BUILD_ROOT%{_mandir}/man8
171 echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-bfifo.8
172 echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-pfifo.8
173 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man3
174
175 cp -a lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
176 cp -a include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
177 %{?with_tc:install -p tc/*.so $RPM_BUILD_ROOT%{_libdir}/tc}
178
179 %if %{with doc}
180 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
181 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
182 %endif
183
184 %clean
185 rm -rf $RPM_BUILD_ROOT
186
187 %files
188 %defattr(644,root,root,755)
189 %doc ChangeLog README README.decnet README.iproute2+tc README.distribution README.lnstat
190 %attr(755,root,root) %{_sbindir}/ifstat
191 %attr(755,root,root) %{_sbindir}/ip
192 %attr(755,root,root) %{_sbindir}/lnstat
193 %attr(755,root,root) %{_sbindir}/nstat
194 %attr(755,root,root) %{_sbindir}/routel
195 %attr(755,root,root) %{_sbindir}/rtacct
196 %attr(755,root,root) %{_sbindir}/rtmon
197 %attr(755,root,root) %{_sbindir}/ss
198 %dir %{_sysconfdir}
199 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_protos
200 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_realms
201 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_scopes
202 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_tables
203 %{_mandir}/man8/arpd.8*
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*
210 %if %{with tc}
211 %attr(755,root,root) %{_sbindir}/tc
212 %dir %{_libdir}/tc
213 %attr(755,root,root) %{_libdir}/tc/*.so
214 %{_mandir}/man8/tc.8*
215 %{_mandir}/man8/tc-*.8*
216 %endif
217
218 %files -n libnetlink-devel
219 %defattr(644,root,root,755)
220 %{_libdir}/libnetlink.a
221 %{_includedir}/libnetlink.h
222 %{_mandir}/man3/libnetlink.3*
223
224 %if %{with doc}
225 %files doc
226 %defattr(644,root,root,755)
227 %doc RELNOTES doc/*.ps
228 %{_examplesdir}/%{name}-%{version}
229 %endif
This page took 0.514603 seconds and 4 git commands to generate.