]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- %desc
[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 %description embed -l pl
57 iproute2 dla systemów osadzonych.
58
59 %prep
60 %setup -q -n %{name}
61 %patch0 -p1
62 %patch1 -p1
63 %patch2 -p1
64 %patch3 -p1
65 %patch4 -p1
66
67 %build
68
69 %if %{!?_without_embed:1}%{?_without_embed:0}
70 %{__make} \
71         OPT="%{embed_cflags}" GLIBCFIX="" \
72         KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
73         CC=%{embed_cc} \
74         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
75         SUBDIRS="lib ip"
76 # someday we might also need rtmon and rtacct, but not today ;)
77 mv -f ip/ip ip-embed-shared
78
79 %{__make} \
80         OPT="%{embed_cflags}" GLIBCFIX="" \
81         KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
82         LDFLAGS="-static" \
83         CC=%{embed_cc} \
84         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
85         SUBDIRS="lib ip"
86
87 mv -f ip/ip ip-embed-static
88 %{__make} clean
89 %endif
90
91 %{__make} \
92         CC="%{__cc}" \
93         OPT="%{rpmcflags}" \
94         KERNEL_INCLUDE="%{_kernelsrcdir}/include"
95 %{__make} -C doc
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 %if %{!?_without_embed:1}%{?_without_embed:0}
100 install -d $RPM_BUILD_ROOT%{embed_path}/{shared,static}
101 install ip-embed-shared $RPM_BUILD_ROOT%{embed_path}/shared/ip
102 install ip-embed-static $RPM_BUILD_ROOT%{embed_path}/static/ip
103 %endif
104
105 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
106 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
107 install etc/iproute2/rt_protos \
108         etc/iproute2/rt_realms \
109         etc/iproute2/rt_scopes \
110         etc/iproute2/rt_tables \
111         $RPM_BUILD_ROOT%{_sysconfdir}
112
113 gzip -9nf READ* RELNOTES doc/*.ps
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %files
119 %defattr(644,root,root,755)
120 %doc {README,README.iproute2+tc,RELNOTES}.gz
121 %doc doc/*.ps.gz
122 %attr(755,root,root) %{_sbindir}/*
123 %dir %{_sysconfdir}
124 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*
125
126 %if %{!?_without_embed:1}%{?_without_embed:0}
127 %files embed
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{embed_path}/*/*
130 %endif
This page took 0.038606 seconds and 4 git commands to generate.