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