1 # _without_embed - don't build uClibc version
3 %define snapshot ss010803
4 Summary: Utility to control Networking behavior in 2.2.X kernels
5 Summary(pl): Narzêdzie do kontrolowania Sieci w kernelach 2.2
7 Version: %{mainver}.%{snapshot}
9 Vendor: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
11 Group: Networking/Admin
12 Group(de): Netzwerkwesen/Administration
13 Group(pl): Sieciowe/Administracyjne
14 Source0: ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{mainver}-now-%{snapshot}.tar.gz
15 Patch0: %{name}-make.patch
16 Patch1: %{name}-uClibc.patch
17 Patch2: %{name}-fix-2_2.patch
18 Patch3: %{name}-label.patch
19 BuildRequires: tetex-dvips
20 BuildRequires: tetex-latex
21 BuildRequires: psutils
22 %if %{!?_without_embed:1}%{?_without_embed:0}
23 BuildRequires: uClibc-devel
24 BuildRequires: uClibc-static
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _sbindir /sbin
30 %define _sysconfdir /etc/iproute2
32 %define embed_path /usr/lib/embed
33 %define embed_cc %{_arch}-uclibc-cc
34 %define embed_cflags %{rpmcflags} -Os
35 %define uclibc_prefix /usr/%{_arch}-linux-uclibc
38 This package contains the ip, tc and the rtmon tool that allow control
39 of routing and other aspects of networking.
42 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
43 aspektów dotycz±cych sieci.
46 Summary: Utility to control Networking behavior in 2.2.X kernels
47 Summary(pl): Narzêdzie do kontrolowania Sieci w kernelach 2.2
48 Group: Networking/Admin
49 Group(de): Netzwerkwesen/Administration
50 Group(pl): Sieciowe/Administracyjne
64 %if %{!?_without_embed:1}%{?_without_embed:0}
66 OPT="%{embed_cflags}" GLIBCFIX="" \
67 KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
69 ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
71 # someday we might also need rtmon and rtacct, but not today ;)
72 mv -f ip/ip ip-embed-shared
75 OPT="%{embed_cflags}" GLIBCFIX="" \
76 KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
79 ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
82 mv -f ip/ip ip-embed-static
88 KERNEL_INCLUDE="%{_kernelsrcdir}/include"
92 rm -rf $RPM_BUILD_ROOT
93 %if %{!?_without_embed:1}%{?_without_embed:0}
94 install -d $RPM_BUILD_ROOT%{embed_path}/{shared,static}
95 install ip-embed-shared $RPM_BUILD_ROOT%{embed_path}/shared/ip
96 install ip-embed-static $RPM_BUILD_ROOT%{embed_path}/static/ip
99 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
100 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
101 install etc/iproute2/rt_protos \
102 etc/iproute2/rt_realms \
103 etc/iproute2/rt_scopes \
104 etc/iproute2/rt_tables \
105 $RPM_BUILD_ROOT%{_sysconfdir}
107 gzip -9nf READ* RELNOTES doc/*.ps
110 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
114 %doc {README,README.iproute2+tc,RELNOTES}.gz
116 %attr(755,root,root) %{_sbindir}/*
118 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*
120 %if %{!?_without_embed:1}%{?_without_embed:0}
122 %defattr(644,root,root,755)
123 %attr(755,root,root) %{embed_path}/*/*