]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
linux-devel-BOOT is dead, uClibc don't have symlinks to kernel includes :-(
[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 Patch3:         %{name}-linux-2.4.5.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 %patch1 -p1
54 %{?BOOT:%patch2 -p1}
55 #%patch3 -p1
56
57 %build
58
59 %if %{?BOOT:1}%{!?BOOT:0}
60 %{__make} \
61         OPT="-m386 -Os" GLIBCFIX="" \
62         KERNEL_INCLUDE="/usr/src/linux/include -I%{_libdir}/bootdisk%{_includedir}" \
63         LDFLAGS="-nostdlib -static -s" \
64         LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
65         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
66         SUBDIRS="lib ip"
67
68         LDLIBS="/usr/lib/libresolv.a %{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
69
70 # there are some problems compiling with uClibc, falling back to simple glibc-static
71 %{__make} SUBDIRS="lib ip" OPT="-Os" LDFLAGS="-static -s" 
72 mv -f ip/ip ip-BOOT
73 mv -f ip/rtacct rtacct-BOOT
74 mv -f ip/rtmon rtmon-BOOT
75 %{__make} clean
76 %endif
77
78 %{__make} OPT="%{rpmcflags}"
79 %{__make} -C doc
80
81
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 %if %{?BOOT:1}%{!?BOOT:0}
86 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin
87 # we need only 'ip' on bootdisk (don't we??)
88 install -s ip-BOOT $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin/ip
89 %endif
90
91 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
92 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
93 install etc/iproute2/rt_protos \
94         etc/iproute2/rt_realms \
95         etc/iproute2/rt_scopes \
96         etc/iproute2/rt_tables \
97         $RPM_BUILD_ROOT%{_sysconfdir}
98
99 gzip -9nf READ* RELNOTES doc/*.ps
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %files
105 %defattr(644,root,root,755)
106 %doc {README,README.iproute2+tc,RELNOTES}.gz
107 %doc doc/*.ps.gz
108 %attr(755,root,root) %{_sbindir}/*
109 %{_sysconfdir}
110
111 %if %{?BOOT:1}%{!?BOOT:0}
112 %files BOOT
113 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_libdir}/bootdisk/sbin/*
115 %endif
This page took 0.169766 seconds and 4 git commands to generate.