]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- now it links against uClibc!
[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:        2
8 Vendor:         Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
9 License:        GPL
10 Group:          Networking/Admin
11 Group(pl):      Sieciowe/Administracyjne
12 Source0:        ftp://ftp.inr.ac.ru/ip-routing/%{name}-%{mainver}-now-%{snapshot}.tar.gz
13 Patch0:         %{name}-make.patch
14 Patch1:         %{name}-ll_types.patch
15 %{?BOOT:Patch2:         %{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
41 %description BOOT
42
43 %endif
44
45
46 %prep
47 %setup -q -n %{name}
48 %patch0 -p1
49 %patch1 -p1
50 %patch2 -p1
51
52 %build
53
54 %if %{?BOOT:1}%{!?BOOT:0}
55 %{__make} \
56         OPT="-Os" GLIBCFIX="" \
57         KERNEL_INCLUDE="/usr/lib/bootdisk%{_includedir}" \
58         LDFLAGS="-nostdlib -static -s" \
59         LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
60         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
61         SUBDIRS="lib ip"
62
63         LDLIBS="/usr/lib/libresolv.a %{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
64
65 # there are some problems compiling with uClibc, falling back to simple glibc-static
66 %{__make} SUBDIRS="lib ip" OPT="-Os" LDFLAGS="-static -s" 
67 mv -f ip/ip ip-BOOT
68 mv -f ip/rtacct rtacct-BOOT
69 mv -f ip/rtmon rtmon-BOOT
70 %{__make} clean
71 %endif
72
73 %{__make} OPT="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-g -O0}"
74 %{__make} -C doc
75
76
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 %if %{?BOOT:1}%{!?BOOT:0}
81 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin
82 # we need only 'ip' on bootdisk (don't we??)
83 install -s ip-BOOT $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin/ip
84 %endif
85
86 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
87 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
88 install etc/iproute2/rt_protos \
89         etc/iproute2/rt_realms \
90         etc/iproute2/rt_scopes \
91         etc/iproute2/rt_tables \
92         $RPM_BUILD_ROOT%{_sysconfdir}
93
94 gzip -9nf READ* RELNOTES doc/*.ps
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %files
100 %defattr(644,root,root,755)
101 %doc {README,README.iproute2+tc,RELNOTES}.gz
102 %doc doc/*.ps.gz
103 %attr(755,root,root) %{_sbindir}/*
104 %{_sysconfdir}
105
106 %if %{?BOOT:1}%{!?BOOT:0}
107 %files BOOT
108 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/bootdisk/sbin/*
110 %endif
This page took 0.07007 seconds and 3 git commands to generate.