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 Patch4: %{name}-latest.patch
20 BuildRequires: tetex-dvips
21 BuildRequires: tetex-latex
22 BuildRequires: psutils
23 %if %{!?_without_embed:1}%{?_without_embed:0}
24 BuildRequires: uClibc-devel
25 BuildRequires: uClibc-static
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _sbindir /sbin
31 %define _sysconfdir /etc/iproute2
33 %define embed_path /usr/lib/embed
34 %define embed_cc %{_arch}-uclibc-cc
35 %define embed_cflags %{rpmcflags} -Os
36 %define uclibc_prefix /usr/%{_arch}-linux-uclibc
39 This package contains the ip, tc and the rtmon tool that allow control
40 of routing and other aspects of networking.
43 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
44 aspektów dotycz±cych sieci.
47 Summary: Utility to control Networking behavior in 2.2.X kernels
48 Summary(pl): Narzêdzie do kontrolowania Sieci w kernelach 2.2
49 Group: Networking/Admin
50 Group(de): Netzwerkwesen/Administration
51 Group(pl): Sieciowe/Administracyjne
66 %if %{!?_without_embed:1}%{?_without_embed:0}
68 OPT="%{embed_cflags}" GLIBCFIX="" \
69 KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
71 ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
73 # someday we might also need rtmon and rtacct, but not today ;)
74 mv -f ip/ip ip-embed-shared
77 OPT="%{embed_cflags}" GLIBCFIX="" \
78 KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
81 ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
84 mv -f ip/ip ip-embed-static
91 KERNEL_INCLUDE="%{_kernelsrcdir}/include"
95 rm -rf $RPM_BUILD_ROOT
96 %if %{!?_without_embed:1}%{?_without_embed:0}
97 install -d $RPM_BUILD_ROOT%{embed_path}/{shared,static}
98 install ip-embed-shared $RPM_BUILD_ROOT%{embed_path}/shared/ip
99 install ip-embed-static $RPM_BUILD_ROOT%{embed_path}/static/ip
102 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
103 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
104 install etc/iproute2/rt_protos \
105 etc/iproute2/rt_realms \
106 etc/iproute2/rt_scopes \
107 etc/iproute2/rt_tables \
108 $RPM_BUILD_ROOT%{_sysconfdir}
110 gzip -9nf READ* RELNOTES doc/*.ps
113 rm -rf $RPM_BUILD_ROOT
116 %defattr(644,root,root,755)
117 %doc {README,README.iproute2+tc,RELNOTES}.gz
119 %attr(755,root,root) %{_sbindir}/*
121 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*
123 %if %{!?_without_embed:1}%{?_without_embed:0}
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{embed_path}/*/*