]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
b572e9dcfbd648ab451f8aeb2ea16cae0441dfb5
[packages/iproute2.git] / iproute2.spec
1 # _without_embed - don't build uClibc version
2 %define mainver  2.4.7
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
6 Name:           iproute2
7 Version:        %{mainver}.%{snapshot}
8 Release:        3
9 Vendor:         Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
10 License:        GPL
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
25 %endif
26 Obsoletes:      iproute
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _sbindir        /sbin
30 %define         _sysconfdir     /etc/iproute2
31
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
36
37 %description
38 This package contains the ip, tc and the rtmon tool that allow control
39 of routing and other aspects of networking.
40
41 %description -l pl
42 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
43 aspektów dotycz±cych sieci.
44
45 %package embed
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
51
52 %description embed
53 Embedded iproute2.
54
55 %prep
56 %setup -q -n %{name}
57 %patch0 -p1
58 %patch1 -p1
59 %patch2 -p1
60 %patch3 -p1
61
62 %build
63
64 %if %{!?_without_embed:1}%{?_without_embed:0}
65 %{__make} \
66         OPT="%{embed_cflags}" GLIBCFIX="" \
67         KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
68         CC=%{embed_cc} \
69         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
70         SUBDIRS="lib ip"
71 # someday we might also need rtmon and rtacct, but not today ;)
72 mv -f ip/ip ip-embed-shared
73
74 %{__make} \
75         OPT="%{embed_cflags}" GLIBCFIX="" \
76         KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
77         LDFLAGS="-static" \
78         CC=%{embed_cc} \
79         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
80         SUBDIRS="lib ip"
81
82 mv -f ip/ip ip-embed-static
83 %{__make} clean
84 %endif
85
86 %{__make} \
87         OPT="%{rpmcflags}" \
88         KERNEL_INCLUDE="%{_kernelsrcdir}/include"
89 %{__make} -C doc
90
91 %install
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
97 %endif
98
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}
106
107 gzip -9nf READ* RELNOTES doc/*.ps
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %files
113 %defattr(644,root,root,755)
114 %doc {README,README.iproute2+tc,RELNOTES}.gz
115 %doc doc/*.ps.gz
116 %attr(755,root,root) %{_sbindir}/*
117 %dir %{_sysconfdir}
118 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*
119
120 %if %{!?_without_embed:1}%{?_without_embed:0}
121 %files embed
122 %defattr(644,root,root,755)
123 %attr(755,root,root) %{embed_path}/*/*
124 %endif
This page took 0.050679 seconds and 2 git commands to generate.