]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- kernel-headers dependency killer for iproute2 (includes needed definitions)
[packages/iproute2.git] / iproute2.spec
1 #
2 # Conditional build
3 %bcond_without  tetex   # don't build documentation
4 %bcond_without  tc      # don't build tc program (it breaks static linkage)
5 %bcond_without  tc_esfq # build tc without esfq support (requires patched headers)
6 %bcond_without  tc_wrr  # build tc without wrr support
7 %bcond_with     uClibc  # do some hacks to build with uClibc
8
9 # is it 2.2 not 2.4+?
10 %define         _kernel22       %(echo %{_kernel_ver} | grep -q '2\.[3-9]\.' ; echo $?)
11
12 Summary:        Utility to control Networking behavior in 2.2.X kernels
13 Summary(es):    Herramientas para encaminamiento avanzado y configuración de interfaces de red
14 Summary(pl):    Narzêdzie do kontrolowania Sieci w kernelach 2.2
15 Summary(pt_BR): Ferramentas para roteamento avançado e configuração de interfaces de rede
16 Name:           iproute2
17 %define mainver 2.4.7
18 %define snapshot ss020116
19 Version:        %{mainver}.%{snapshot}
20 %define _rel    13
21 Release:        %{_rel}@%{_kernel_ver_str}
22 License:        GPL
23 Vendor:         Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
24 Group:          Networking/Admin
25 Source0:        ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{mainver}-now-%{snapshot}.tar.gz
26 # Source0-md5:  2c7e5f3a10e703745ecdc613f7a7d187
27 Source1:        %{name}-owl-man.tar.bz2
28 # Source1-md5:  cd4425df972a4ab001db31a5eb1c5da5
29 Patch0:         %{name}-make.patch
30 Patch1:         %{name}-no_libresolv.patch
31 Patch2:         %{name}-disable_arpd.patch
32 Patch3:         %{name}-uspace.patch
33 Patch4:         %{name}-diffserv-config.patch
34 Patch5:         %{name}-netlink.patch
35 Patch6:         %{name}-kernellast.patch
36 # uClibc hacks
37 Patch7:         %{name}-uClibc.patch
38 # 2.2-specific stuff
39 Patch8:         %{name}-fix-2_2.patch
40 Patch9:         %{name}-htb2_tc.patch
41 # 2.4-specific
42 Patch10:        htb3.6_tc.patch
43 Patch11:        %{name}-stats.patch
44 # extensions
45 Patch12:        wrr-iproute2-2.2.4.patch
46 Patch13:        %{name}-2.2.4-now-ss001007-esfq.diff
47 BuildRequires:  bison
48 %{?with_tetex:BuildRequires:    psutils}
49 %{?with_tetex:BuildRequires:    sgml-tools}
50 %{?with_tetex:BuildRequires:    tetex-dvips}
51 %{?with_tetex:BuildRequires:    tetex-latex}
52 %{?with_tetex:BuildRequires:    tetex-tex-babel}
53 Obsoletes:      iproute
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %define         _sbindir        /sbin
57 %define         _sysconfdir     /etc/iproute2
58
59 %description
60 Linux 2.2 maintains compatibility with the basic configuration
61 utilities of the network (ifconfig, route) but a new utility is
62 required to exploit the new characteristics and features of the
63 kernel. This package includes the new utilities.
64
65 %description -l es
66 Linux mantiene compatibilidad con los utilitarios estándares de
67 configuración de la red, pero se necesitan nuevos utilitarios para
68 usar los recursos y características del nuevo núcleo. Este paquete
69 incluye los nuevos utilitarios.
70
71 %description -l pl
72 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
73 aspektów dotycz±cych sieci.
74
75 %description -l pt_BR
76 O Linux mantém compatibilidade com os utilitários padrão de
77 configuração da rede, mas novos utilitários são necessários para fazer
78 uso das características e recursos da nova kernel. This package
79 includes the new utilities.
80
81 %package -n libnetlink-devel
82 Summary:        Library for the netlink interface
83 Summary(pl):    Biblioteka do interfejsu netlink
84 Group:          Development/Libraries
85
86 %description -n libnetlink-devel
87 This library provides an interface for kernel-user netlink interface.
88
89 %description -n libnetlink-devel -l pl
90 Ta biblioteka udostêpnia interfejs do interfejsu netlink miêdzy j±drem
91 a przestrzeni± u¿ytkownika.
92
93 %prep
94 %setup -q -n %{name} -a1
95 %patch0 -p1
96 %patch1 -p1
97 %patch2 -p1
98 %patch3 -p1
99 %patch4 -p1
100 %patch5 -p1
101 %patch6 -p1
102 %{?with_uClibc:%patch7 -p1}
103 %if %{_kernel22}
104 %patch8 -p1
105 %patch9 -p1
106 %else
107 %patch10 -p1
108 %patch11 -p1
109 %endif
110 %{?with_tc_wrr:%patch12 -p1}
111 %{?with_tc_esfq:%patch13 -p1}
112
113 %build
114 WRRDEF=""
115 %{?with_tc_wrr:grep -q tc_wrr_class_weight %{_kernelsrcdir}/include/linux/pkt_sched.h || WRRDEF="-DNEED_WRR_DEFS"}
116
117 %{__make} \
118         CC="%{__cc}" \
119         OPT="%{rpmcflags} ${WRRDEF}" \
120         KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
121         %{!?with_tc:SUBDIRS="lib ip misc" LDFLAGS="%{rpmldflags}"}
122
123 %{?with_tetex:%{__make} -C doc}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir},%{_mandir}/man8,%{_libdir},%{_includedir}}
128
129 install ip/{ip,rtmon,routel} %{?with_tc:tc/tc} misc/{rtacct,rtstat} $RPM_BUILD_ROOT%{_sbindir}
130 install etc/iproute2/rt_protos \
131         etc/iproute2/rt_realms \
132         etc/iproute2/rt_scopes \
133         etc/iproute2/rt_tables \
134         $RPM_BUILD_ROOT%{_sysconfdir}
135 install man/*   $RPM_BUILD_ROOT%{_mandir}/man8
136 install lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
137 install include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %files
143 %defattr(644,root,root,755)
144 %doc README README.iproute2+tc RELNOTES %{?with_tetex:doc/*.ps}
145 %attr(755,root,root) %{_sbindir}/*
146 %dir %{_sysconfdir}
147 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*
148 %{_mandir}/man8/*
149
150 %files -n libnetlink-devel
151 %defattr(644,root,root,755)
152 %{_libdir}/lib*.a
153 %{_includedir}/*.h
This page took 0.054316 seconds and 3 git commands to generate.