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