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