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