]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- iproute2-label.patch: fix ISO C violation
[packages/iproute2.git] / iproute2.spec
1 %define mainver  2.4.7
2 %define snapshot ss010803
3 Summary:        Utility to control Networking behavior in 2.2.X kernels
4 Summary(pl):    Narzêdzie do kontrolowania Sieci w kernelach 2.2
5 Name:           iproute2
6 Version:        %{mainver}.%{snapshot}
7 Release:        2
8 Vendor:         Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
9 License:        GPL
10 Group:          Networking/Admin
11 Group(de):      Netzwerkwesen/Administration
12 Group(pl):      Sieciowe/Administracyjne
13 Source0:        ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{mainver}-now-%{snapshot}.tar.gz
14 Patch0:         %{name}-make.patch
15 Patch1:         %{name}-uClibc.patch
16 Patch2:         %{name}-fix-2_2.patch
17 Patch3:         %{name}-label.patch
18 BuildRequires:  tetex-dvips
19 BuildRequires:  tetex-latex
20 BuildRequires:  psutils
21 %{?BOOT:BuildRequires:  uClibc-devel-BOOT}
22 Obsoletes:      iproute
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _sbindir        /sbin
26 %define         _sysconfdir     /etc/iproute2
27
28 %description
29 This package contains the ip, tc and the rtmon tool that allow control
30 of routing and other aspects of networking.
31
32 %description -l pl
33 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
34 aspektów dotycz±cych sieci.
35
36
37 %if %{?BOOT:1}%{!?BOOT:0}
38 %package BOOT
39 Summary:        Utility to control Networking behavior in 2.2.X kernels
40 Summary(pl):    Narzêdzie do kontrolowania Sieci w kernelach 2.2
41 Group:          Networking/Admin
42 Group(de):      Netzwerkwesen/Administration
43 Group(pl):      Sieciowe/Administracyjne
44
45 %description BOOT
46
47 %endif
48
49
50 %prep
51 %setup -q -n %{name}
52 %patch0 -p1
53 %{?BOOT:%patch1 -p1}
54 %patch2 -p1
55 %patch3 -p1
56
57 %build
58
59 %if %{?BOOT:1}%{!?BOOT:0}
60 %{__make} \
61         OPT="-Os" GLIBCFIX="" \
62         KERNEL_INCLUDE="%{_kernelsrcdir}/include" \
63         OPT="-I%{_libdir}/bootdisk%{_includedir}" \
64         LDFLAGS="-nostdlib -static -s" \
65         LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
66         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
67         SUBDIRS="lib ip"
68
69 # there are some problems compiling with uClibc, falling back to simple glibc-static
70 %{__make} \
71         SUBDIRS="lib ip" \
72         OPT="-Os" \
73         LDFLAGS="-static -s" \
74         KERNEL_INCLUDE="%{_kernelsrcdir}/include"
75 mv -f ip/ip ip-BOOT
76 mv -f ip/rtacct rtacct-BOOT
77 mv -f ip/rtmon rtmon-BOOT
78 %{__make} clean
79 %endif
80
81 %{__make} \
82         OPT="%{rpmcflags}" \
83         KERNEL_INCLUDE="%{_kernelsrcdir}/include"
84 %{__make} -C doc
85
86
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90 %if %{?BOOT:1}%{!?BOOT:0}
91 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin
92 # we need only 'ip' on bootdisk (don't we??)
93 install ip-BOOT $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin/ip
94 %endif
95
96 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
97 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
98 install etc/iproute2/rt_protos \
99         etc/iproute2/rt_realms \
100         etc/iproute2/rt_scopes \
101         etc/iproute2/rt_tables \
102         $RPM_BUILD_ROOT%{_sysconfdir}
103
104 gzip -9nf READ* RELNOTES doc/*.ps
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %files
110 %defattr(644,root,root,755)
111 %doc {README,README.iproute2+tc,RELNOTES}.gz
112 %doc doc/*.ps.gz
113 %attr(755,root,root) %{_sbindir}/*
114 %dir %{_sysconfdir}
115 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*
116
117 %if %{?BOOT:1}%{!?BOOT:0}
118 %files BOOT
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/bootdisk/sbin/*
121 %endif
This page took 0.032718 seconds and 4 git commands to generate.