]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- added no_libresolv patch
[packages/iproute2.git] / iproute2.spec
1 # conditional build
2 # --without tetex
3 # --without tc (don't build tc program, it break static linkage)
4 # --without dist_kernel
5
6 %define         _kernel24       %(echo %{_kernel_ver} | grep -q '2\.[012]\.' ; echo $?)
7 %define mainver         2.4.7
8 %define snapshot        ss010803
9 Summary:        Utility to control Networking behavior in 2.2.X kernels
10 Summary(es):    Herramientas para encaminamiento avanzado y configuración de interfaces de red
11 Summary(pl):    Narzêdzie do kontrolowania Sieci w kernelach 2.2
12 Summary(pt_BR): Ferramentas para roteamento avançado e configuração de interfaces de rede
13 Name:           iproute2
14 Version:        %{mainver}.%{snapshot}
15 Release:        10@%{_kernel_ver_str}
16 License:        GPL
17 Vendor:         Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
18 Group:          Networking/Admin
19 Source0:        ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{mainver}-now-%{snapshot}.tar.gz
20 Source1:        %{name}-owl-man.tar.bz2
21 Patch0:         %{name}-make.patch
22 Patch1:         %{name}-uClibc.patch
23 Patch2:         %{name}-fix-2_2.patch
24 Patch3:         %{name}-label.patch
25 Patch4:         %{name}-latest.patch
26 Patch5:         %{name}-htb2_tc.patch
27 Patch6:         wrr-iproute2-2.2.4.patch
28 Patch7:         htb3.6_tc.patch
29 Patch8:         %{name}-no_libresolv.patch
30 %{!?_without_tetex:BuildRequires:       tetex-dvips}
31 %{!?_without_tetex:BuildRequires:       tetex-latex}
32 %{!?_without_tetex:BuildRequires:       psutils}
33 Obsoletes:      iproute
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         _sbindir        /sbin
37 %define         _sysconfdir     /etc/iproute2
38
39 %description
40 Linux 2.2 maintains compatibility with the basic configuration
41 utilities of the network (ifconfig, route) but a new utility is
42 required to exploit the new characteristics and features of the
43 kernel. This package includes the new utilities.
44
45 %description -l es
46 Linux mantiene compatibilidad con los utilitarios estándares de
47 configuración de la red, pero se necesitan nuevos utilitarios para
48 usar los recursos y características del nuevo núcleo. Este paquete
49 incluye los nuevos utilitarios.
50
51 %description -l pl
52 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
53 aspektów dotycz±cych sieci.
54
55 %description -l pt_BR
56 O Linux mantém compatibilidade com os utilitários padrão de
57 configuração da rede, mas novos utilitários são necessários para fazer
58 uso das características e recursos da nova kernel. This package
59 includes the new utilities.
60
61 %prep
62 %setup -q -n %{name} -a1
63 %patch0 -p1
64 %patch1 -p1
65 %patch2 -p1
66 %patch3 -p1
67 %patch4 -p1
68 %if %{_kernel24}
69 %patch7 -p1
70 %else
71 %patch5 -p1
72 %endif
73 %patch6 -p1
74 %patch8 -p1
75
76 %build
77 WRRDEF=""
78 grep -q tc_wrr_class_weight /usr/include/linux/pkt_sched.h || WRRDEF="-DNEED_WRR_DEFS"
79
80 %{__make} \
81         CC="%{__cc}" \
82         OPT="%{rpmcflags} ${WRRDEF}" \
83         KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
84         %{?_without_tc:SUBDIRS="lib ip" LDFLAGS="%{rpmldflags}"}
85 %{!?_without_tetex:%{__make} -C doc}
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir},%{_mandir}/man8}
90
91 install ip/{ip,rtmon,rtacct,routel} %{!?_without_tc:tc/tc} $RPM_BUILD_ROOT%{_sbindir}
92 install etc/iproute2/rt_protos \
93         etc/iproute2/rt_realms \
94         etc/iproute2/rt_scopes \
95         etc/iproute2/rt_tables \
96         $RPM_BUILD_ROOT%{_sysconfdir}
97 install man/*   $RPM_BUILD_ROOT%{_mandir}/man8
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %files
103 %defattr(644,root,root,755)
104 %doc README README.iproute2+tc RELNOTES
105 %{!?_without_tetex:%doc doc/*.ps}
106 %attr(755,root,root) %{_sbindir}/*
107 %dir %{_sysconfdir}
108 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*
109 %{_mandir}/man8/*
This page took 0.055504 seconds and 4 git commands to generate.