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