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