]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- added fix-2_2.patch - fixes building on 2.2 kernel (adds missing
[packages/iproute2.git] / iproute2.spec
1 %define mainver  2.4.7
2 %define snapshot ss010803
3 Summary:        Utility to control Networking behavior in 2.2.X kernels
4 Summary(pl):    Narzêdzie do kontrolowania Sieci w kernelach 2.2
5 Name:           iproute2
6 Version:        %{mainver}.%{snapshot}
7 Release:        1
8 Vendor:         Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
9 License:        GPL
10 Group:          Networking/Admin
11 Group(de):      Netzwerkwesen/Administration
12 Group(pl):      Sieciowe/Administracyjne
13 Source0:        ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{mainver}-now-%{snapshot}.tar.gz
14 Patch0:         %{name}-make.patch
15 Patch1:         %{name}-uClibc.patch
16 Patch2:         %{name}-fix-2_2.patch
17 BuildRequires:  tetex-dvips
18 BuildRequires:  tetex-latex
19 BuildRequires:  psutils
20 %{?BOOT:BuildRequires:  uClibc-devel-BOOT}
21 Obsoletes:      iproute
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _sbindir        /sbin
25 %define         _sysconfdir     /etc/iproute2
26
27 %description
28 This package contains the ip, tc and the rtmon tool that allow control
29 of routing and other aspects of networking.
30
31 %description -l pl
32 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
33 aspektów dotycz±cych sieci.
34
35
36 %if %{?BOOT:1}%{!?BOOT:0}
37 %package BOOT
38 Summary:        Utility to control Networking behavior in 2.2.X kernels
39 Summary(pl):    Narzêdzie do kontrolowania Sieci w kernelach 2.2
40 Group:          Networking/Admin
41 Group(de):      Netzwerkwesen/Administration
42 Group(pl):      Sieciowe/Administracyjne
43
44 %description BOOT
45
46 %endif
47
48
49 %prep
50 %setup -q -n %{name}
51 %patch0 -p1
52 %{?BOOT:%patch1 -p1}
53 %patch2 -p1
54
55 %build
56
57 %if %{?BOOT:1}%{!?BOOT:0}
58 %{__make} \
59         OPT="-Os" GLIBCFIX="" \
60         KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
61         OPT="-I%{_libdir}/bootdisk%{_includedir}" \
62         LDFLAGS="-nostdlib -static -s" \
63         LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
64         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
65         SUBDIRS="lib ip"
66
67 # there are some problems compiling with uClibc, falling back to simple glibc-static
68 %{__make} \
69         SUBDIRS="lib ip" \
70         OPT="-Os" \
71         LDFLAGS="-static -s" \
72         KERNEL_INCLUDE="%{_kernelsrcdir}/include"
73 mv -f ip/ip ip-BOOT
74 mv -f ip/rtacct rtacct-BOOT
75 mv -f ip/rtmon rtmon-BOOT
76 %{__make} clean
77 %endif
78
79 %{__make} \
80         OPT="%{rpmcflags}" \
81         KERNEL_INCLUDE="%{_kernelsrcdir}/include"
82 %{__make} -C doc
83
84
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 %if %{?BOOT:1}%{!?BOOT:0}
89 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin
90 # we need only 'ip' on bootdisk (don't we??)
91 install ip-BOOT $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin/ip
92 %endif
93
94 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
95 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
96 install etc/iproute2/rt_protos \
97         etc/iproute2/rt_realms \
98         etc/iproute2/rt_scopes \
99         etc/iproute2/rt_tables \
100         $RPM_BUILD_ROOT%{_sysconfdir}
101
102 gzip -9nf READ* RELNOTES doc/*.ps
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %files
108 %defattr(644,root,root,755)
109 %doc {README,README.iproute2+tc,RELNOTES}.gz
110 %doc doc/*.ps.gz
111 %attr(755,root,root) %{_sbindir}/*
112 %dir %{_sysconfdir}
113 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*
114
115 %if %{?BOOT:1}%{!?BOOT:0}
116 %files BOOT
117 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_libdir}/bootdisk/sbin/*
119 %endif
This page took 0.035043 seconds and 4 git commands to generate.