]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- Up to 2.6.37
[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             # don't required ATM.
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 kontrolowania Sieci w kernelach
16 Summary(pt_BR.UTF-8):   Ferramentas para roteamento avançado e configuração de interfaces de rede
17 Name:           iproute2
18 # do not use ,,2.6.X'' as version here, put whole number like 2.6.8
19 Version:        2.6.37
20 Release:        1
21 License:        GPL
22 Group:          Networking/Admin
23 Source0:        http://devresources.linux-foundation.org/dev/iproute2/download/%{name}-%{version}.tar.bz2
24 # Source0-md5:  9774ff9d74ebd301bf56bd8d74473786
25 Source1:        libnetlink.3
26 Patch0:         %{name}-build.patch
27 Patch1:         %{name}-arp.patch
28 Patch3:         %{name}-iptables.patch
29 Patch4:         %{name}-iptables64.patch
30 Patch5:         %{name}-LDFLAGS.patch
31 # extensions
32 Patch10:        %{name}-2.2.4-wrr.patch
33 Patch11:        esfq-%{name}.patch
34 Patch12:        001-net-dev-iface-descr-0.1.diff
35 Patch13:        %{name}-q_atm_c.patch
36 Patch14:        %{name}-q_srr.v0.4.patch
37 Patch15:        %{name}-ip_route_get.patch
38 URL:            http://linux-net.osdl.org/index.php/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 and rtmon, for
73 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 pozwalające na kontrolę routingu i innych
84 aspektów dotyczących sieci.
85
86 %description -l pt_BR.UTF-8
87 O Linux mantém compatibilidade com os utilitários padrão de
88 configuração da rede, mas novos utilitários são necessários para fazer
89 uso das características e recursos da nova kernel. This package
90 includes the new utilities.
91
92 %package -n libnetlink-devel
93 Summary:        Library for the netlink interface
94 Summary(pl.UTF-8):      Biblioteka do interfejsu netlink
95 Group:          Development/Libraries
96
97 %description -n libnetlink-devel
98 This library provides an interface for kernel-user netlink interface.
99
100 %description -n libnetlink-devel -l pl.UTF-8
101 Ta biblioteka udostępnia interfejs do interfejsu netlink między jądrem
102 a przestrzenią użytkownika.
103
104 %package doc
105 Summary:        ip and tc documentation with examples
106 License:        GPL v2+
107 Group:          Applications/System
108
109 %description doc
110 The iproute documentation contains howtos and examples of settings.
111
112 %prep
113 %setup -q
114 #rm -rf include/linux
115 %patch0 -p1
116 %patch1 -p1
117
118 %if "%{_lib}" == "lib64"
119 %patch4 -p1
120 %else
121 %patch3 -p1
122 %endif
123 %patch5 -p1
124
125 # extensions:
126 %patch10 -p1
127 %patch11 -p1
128 %{?with_iface_descr:%patch12 -p1}
129 %patch13 -p0
130 %patch14 -p1
131 %patch15 -p1
132
133 %build
134 %{__make} \
135 %if %{with uClibc}
136         CC="%{_target_cpu}-uclibc-gcc" \
137         LD="%{_target_cpu}-uclibc-gcc" \
138 %else
139         CC="%{__cc}" \
140         LD="%{__cc}" \
141 %endif
142         HOSTCC="%{__cc}" \
143         OPT="%{rpmcflags} %{rpmcppflags}" \
144         LDFLAGS="%{rpmldflags} -Wl,-export-dynamic" \
145         LIBDIR=%{_libdir} \
146         %{!?with_tc:SUBDIRS="lib ip misc"}
147
148 %{?with_doc:%{__make} -C doc}
149
150 # make sure we don't produce broken ip binary
151 ./ip/ip link add type vlan help 2>&1 | grep -q "VLANID :=" || exit 1
152
153 %install
154 rm -rf $RPM_BUILD_ROOT
155 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir},%{_mandir}/man{3,8},%{_libdir},%{_includedir},%{?with_tc:%{_libdir}/tc}}
156
157 install -p ip/{ip,rtmon,routel} %{?with_tc:tc/tc} misc/{ifstat,lnstat,nstat,rtacct,ss} $RPM_BUILD_ROOT%{_sbindir}
158 cp -a etc/iproute2/rt_protos \
159         etc/iproute2/rt_realms \
160         etc/iproute2/rt_scopes \
161         etc/iproute2/rt_tables \
162         $RPM_BUILD_ROOT%{_sysconfdir}
163
164 cp -a man/man8/*        $RPM_BUILD_ROOT%{_mandir}/man8
165 echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-bfifo.8
166 echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-pfifo.8
167 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man3
168
169 cp -a lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
170 cp -a include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
171 %{?with_tc:install -p tc/*.so $RPM_BUILD_ROOT%{_libdir}/tc}
172
173 %if %{with doc}
174 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
175 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
176 %endif
177
178 %clean
179 rm -rf $RPM_BUILD_ROOT
180
181 %files
182 %defattr(644,root,root,755)
183 %doc README README.decnet README.iproute2+tc README.distribution README.lnstat
184 %doc ChangeLog
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}/routel
190 %attr(755,root,root) %{_sbindir}/rtacct
191 %attr(755,root,root) %{_sbindir}/rtmon
192 %attr(755,root,root) %{_sbindir}/ss
193 %attr(755,root,root) %{_sbindir}/tc
194 %dir %{_sysconfdir}
195 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_protos
196 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_realms
197 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_scopes
198 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rt_tables
199 %{_mandir}/man8/*
200 %if %{with tc}
201 %dir %{_libdir}/tc
202 %attr(755,root,root) %{_libdir}/tc/*.so
203 %endif
204
205 %files -n libnetlink-devel
206 %defattr(644,root,root,755)
207 %{_libdir}/libnetlink.a
208 %{_includedir}/libnetlink.h
209 %{_mandir}/man3/libnetlink.3*
210
211 %if %{with doc}
212 %files doc
213 %defattr(644,root,root,755)
214 %doc doc/*.ps
215 %doc RELNOTES
216 %{_examplesdir}/%{name}-%{version}
217 %endif
This page took 0.051542 seconds and 3 git commands to generate.