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