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