]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
outdated
[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 %{?BOOT: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="-m386 -Os" GLIBCFIX="" \
58         KERNEL_INCLUDE="/usr/src/linux/include -I%{_libdir}/bootdisk%{_includedir}" \
59         LDFLAGS="-nostdlib -static -s" \
60         LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc" \
61         ADDLIB="inet_ntop.o inet_pton.o dnet_ntop.o dnet_pton.o ipx_ntop.o ipx_pton.o" \
62         SUBDIRS="lib ip"
63
64 # there are some problems compiling with uClibc, falling back to simple glibc-static
65 %{__make} SUBDIRS="lib ip" OPT="-Os" LDFLAGS="-static -s" 
66 mv -f ip/ip ip-BOOT
67 mv -f ip/rtacct rtacct-BOOT
68 mv -f ip/rtmon rtmon-BOOT
69 %{__make} clean
70 %endif
71
72 %{__make} OPT="%{rpmcflags}"
73 %{__make} -C doc
74
75
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 %if %{?BOOT:1}%{!?BOOT:0}
80 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin
81 # we need only 'ip' on bootdisk (don't we??)
82 install -s ip-BOOT $RPM_BUILD_ROOT%{_libdir}/bootdisk/sbin/ip
83 %endif
84
85 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}}
86 install ip/{ip,rtmon,rtacct,routel} tc/tc $RPM_BUILD_ROOT%{_sbindir}
87 install etc/iproute2/rt_protos \
88         etc/iproute2/rt_realms \
89         etc/iproute2/rt_scopes \
90         etc/iproute2/rt_tables \
91         $RPM_BUILD_ROOT%{_sysconfdir}
92
93 gzip -9nf READ* RELNOTES doc/*.ps
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %files
99 %defattr(644,root,root,755)
100 %doc {README,README.iproute2+tc,RELNOTES}.gz
101 %doc doc/*.ps.gz
102 %attr(755,root,root) %{_sbindir}/*
103 %dir %{_sysconfdir}
104 %config(noreplace) %verify(not md5 size mtime) %{_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.080967 seconds and 4 git commands to generate.