]> git.pld-linux.org Git - packages/iproute2.git/blob - iproute2.spec
- added LDFLAGS patch
[packages/iproute2.git] / iproute2.spec
1 #
2 # TODO:
3 #       - fix build @ uClibc
4 #
5 # Conditional build
6 %bcond_without  doc             # don't build documentation
7 %bcond_without  tc              # don't build tc program (it breaks static linkage)
8 %bcond_without  atm             # don't required ATM.
9 %bcond_with     uClibc          # do some hacks to build with uClibc
10 #
11 Summary:        Utility to control Networking behavior in.X kernels
12 Summary(es):    Herramientas para encaminamiento avanzado y configuración de interfaces de red
13 Summary(pl):    Narzêdzie do kontrolowania Sieci w kernelach
14 Summary(pt_BR): Ferramentas para roteamento avançado e configuração de interfaces de rede
15 Name:           iproute2
16 %define sdate   060323
17 # do not use ,,2.6.X'' as version here, put whole number like 2.6.8
18 Version:        2.6.16
19 Release:        1
20 License:        GPL
21 Vendor:         Stephen Hemminger <shemminger@osdl.org>
22 Group:          Networking/Admin
23 Source0:        http://developer.osdl.org/dev/iproute2/download/%{name}-%{version}-%{sdate}.tar.gz
24 # Source0-md5:  f31d4516b35bbfeaa72c762f5959e97c
25 Patch0:         %{name}-build.patch
26 Patch1:         %{name}-arp.patch
27 Patch2:         %{name}-lex.patch
28 Patch3:         %{name}-iptables.patch
29 Patch4:         %{name}-iptables64.patch
30 Patch5:         %{name}-LDFLAGS.patch
31 # extensions
32 Patch10:        %{name}-2.2.4-wrr.patch
33 Patch11:        esfq-%{name}.patch
34 URL:            http://linux-net.osdl.org/index.php/Iproute2
35 BuildRequires:  bison
36 BuildRequires:  db-devel
37 BuildRequires:  flex
38 %if %{with atm}
39 BuildRequires:  linux-atm-devel
40 %endif
41 BuildRequires:  linux-libc-headers >= 7:2.6.12.0-13
42 %if %{with doc}
43 BuildRequires:  psutils
44 BuildRequires:  sgml-tools
45 BuildRequires:  tetex-dvips
46 BuildRequires:  tetex-fonts-jknappen
47 BuildRequires:  tetex-format-latex
48 BuildRequires:  tetex-metafont
49 BuildRequires:  tetex-tex-babel
50 %endif
51 Obsoletes:      iproute
52 Obsoletes:      ifstat
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %define         _sbindir        /sbin
56 %define         _sysconfdir     /etc/iproute2
57
58 %description
59 Linux maintains compatibility with the basic configuration utilities
60 of the network (ifconfig, route) but a new utility is required to
61 exploit the new characteristics and features of the kernel. This
62 package includes the new utilities.
63
64 %description -l es
65 Linux mantiene compatibilidad con los utilitarios estándares de
66 configuración de la red, pero se necesitan nuevos utilitarios para
67 usar los recursos y características del nuevo núcleo. Este paquete
68 incluye los nuevos utilitarios.
69
70 %description -l pl
71 Ten pakiet zawiera programy pozwalaj±ce na kontrolê routingu i innych
72 aspektów dotycz±cych sieci.
73
74 %description -l pt_BR
75 O Linux mantém compatibilidade com os utilitários padrão de
76 configuração da rede, mas novos utilitários são necessários para fazer
77 uso das características e recursos da nova kernel. This package
78 includes the new utilities.
79
80 %package -n libnetlink-devel
81 Summary:        Library for the netlink interface
82 Summary(pl):    Biblioteka do interfejsu netlink
83 Group:          Development/Libraries
84
85 %description -n libnetlink-devel
86 This library provides an interface for kernel-user netlink interface.
87
88 %description -n libnetlink-devel -l pl
89 Ta biblioteka udostêpnia interfejs do interfejsu netlink miêdzy j±drem
90 a przestrzeni± u¿ytkownika.
91
92 %prep
93 %setup -q -n %{name}-%{version}-%{sdate}
94 rm -rf include-glibc include/linux
95 %patch0 -p1
96 %patch1 -p1
97 %patch2 -p1
98 %ifarch "%{_lib}" == "lib64"
99 %patch4 -p1
100 %else
101 %patch3 -p1
102 %endif
103 %patch5 -p1
104 %patch10 -p1
105 %patch11 -p1
106
107 %build
108 %{__make} \
109 %if %{with uClibc}
110         CC="%{_target_cpu}-uclibc-gcc" \
111         LD="%{_target_cpu}-uclibc-gcc" \
112 %else
113         CC="%{__cc}" \
114         LD="%{__cc}" \
115 %endif
116         OPT="%{rpmcflags}" \
117         LDFLAGS="%{rpmldflags}" \
118         %{!?with_tc:SUBDIRS="lib ip misc"}
119
120 %{?with_doc:%{__make} -C doc}
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir},%{_mandir}/man8,%{_libdir},%{_includedir}}
125
126 install ip/{ip,rtmon,routel} %{?with_tc:tc/tc} misc/{ifstat,lnstat,nstat,rtacct,ss} $RPM_BUILD_ROOT%{_sbindir}
127 install etc/iproute2/rt_protos \
128         etc/iproute2/rt_realms \
129         etc/iproute2/rt_scopes \
130         etc/iproute2/rt_tables \
131         $RPM_BUILD_ROOT%{_sysconfdir}
132
133 install man/man8/*      $RPM_BUILD_ROOT%{_mandir}/man8
134 echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-bfifo.8
135 echo ".so tc-pbfifo.8" > $RPM_BUILD_ROOT%{_mandir}/man8/tc-pfifo.8
136
137 install lib/libnetlink.a $RPM_BUILD_ROOT%{_libdir}
138 install include/libnetlink.h $RPM_BUILD_ROOT%{_includedir}
139
140 %clean
141 rm -rf $RPM_BUILD_ROOT
142
143 %files
144 %defattr(644,root,root,755)
145 %doc README README.decnet README.iproute2+tc README.lnstat RELNOTES
146 %doc ChangeLog %{?with_doc:doc/*.ps}
147 %attr(755,root,root) %{_sbindir}/*
148 %dir %{_sysconfdir}
149 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
150 %{_mandir}/man8/*
151
152 %files -n libnetlink-devel
153 %defattr(644,root,root,755)
154 %{_libdir}/lib*.a
155 %{_includedir}/*.h
This page took 0.955431 seconds and 4 git commands to generate.