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