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