2 %define snapshot ss001007
3 Summary: Utility to control Networking behavior in 2.2.X kernels
4 Summary(pl): Narzêdzie do kontrolowania Sieci w kernelach 2.2
6 Version: %{mainver}.%{snapshot}
8 Vendor: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
10 Group: Networking/Admin
11 Group(pl): Sieciowe/Administracyjne
12 Source0: ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{mainver}-now-%{snapshot}.tar.gz
13 Patch0: %{name}-make.patch
14 Patch1: %{name}-ll_types.patch
15 %{?BOOT:Patch2: %{name}-uClibc.patch}
16 BuildRequires: tetex-dvips
17 BuildRequires: tetex-latex
18 BuildRequires: psutils
19 %{?BOOT:BuildRequires: uClibc-devel-BOOT}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _sbindir /sbin
24 %define _sysconfdir /etc/iproute2
27 This package contains the ip, tc and the rtmon tool that allow control
28 of routing and other aspects of networking.
31 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
32 aspektów dotycz±cych sieci.
35 %if %{?BOOT:1}%{!?BOOT:0}
37 Summary: Utility to control Networking behavior in 2.2.X kernels
38 Summary(pl): Narzêdzie do kontrolowania Sieci w kernelach 2.2
39 Group: Networking/Admin
54 %if %{?BOOT:1}%{!?BOOT:0}
56 OPT="-Os" GLIBCFIX="" \
57 KERNEL_INCLUDE="/usr/lib/bootdisk%{_includedir}" \
58 LDFLAGS="-nostdlib -static -s" \
59 LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
60 ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
63 LDLIBS="/usr/lib/libresolv.a %{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
65 # there are some problems compiling with uClibc, falling back to simple glibc-static
66 %{__make} SUBDIRS="lib ip" OPT="-Os" LDFLAGS="-static -s"
68 mv -f ip/rtacct rtacct-BOOT
69 mv -f ip/rtmon rtmon-BOOT
73 %{__make} OPT="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-g -O0}"
79 rm -rf $RPM_BUILD_ROOT
80 %if %{?BOOT:1}%{!?BOOT:0}
81 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin
82 # we need only 'ip' on bootdisk (don't we??)
83 install -s ip-BOOT $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin/ip
86 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
87 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
88 install etc/iproute2/rt_protos \
89 etc/iproute2/rt_realms \
90 etc/iproute2/rt_scopes \
91 etc/iproute2/rt_tables \
92 $RPM_BUILD_ROOT%{_sysconfdir}
94 gzip -9nf READ* RELNOTES doc/*.ps
97 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc {README,README.iproute2+tc,RELNOTES}.gz
103 %attr(755,root,root) %{_sbindir}/*
106 %if %{?BOOT:1}%{!?BOOT:0}
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/bootdisk/sbin/*