2007-01-16 00:17:45 +01:00
|
|
|
#
|
2011-03-24 09:37:24 +01:00
|
|
|
# spec file for package iproute2
|
2007-01-16 00:17:45 +01:00
|
|
|
#
|
2011-03-22 09:26:04 +01:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:17:45 +01:00
|
|
|
#
|
2008-09-24 16:51:26 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:17:45 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-04-20 16:07:08 +02:00
|
|
|
|
2007-01-16 00:17:45 +01:00
|
|
|
Name: iproute2
|
2010-03-16 10:05:52 +01:00
|
|
|
License: GPLv2+
|
2007-01-16 00:17:45 +01:00
|
|
|
Group: Productivity/Networking/Routing
|
2011-01-11 04:30:40 +01:00
|
|
|
Provides: iproute
|
2011-03-22 09:26:04 +01:00
|
|
|
Version: 2.6.38
|
2011-05-31 21:14:04 +02:00
|
|
|
Release: 2
|
2011-03-22 09:26:04 +01:00
|
|
|
%define rversion 2.6.38
|
2007-01-16 00:17:45 +01:00
|
|
|
Summary: Advanced Routing
|
2011-06-01 00:54:51 +02:00
|
|
|
URL: http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
|
2009-08-13 23:25:48 +02:00
|
|
|
Source0: %name-%rversion.tar.bz2
|
2011-03-22 09:26:04 +01:00
|
|
|
Patch0: %name-libdir-1.diff
|
|
|
|
Patch1: %name-HZ.diff
|
|
|
|
Patch2: %name-pdfdoc.diff
|
2011-03-23 20:38:37 +01:00
|
|
|
Patch3: %name-memleak.diff
|
2011-06-01 00:53:58 +02:00
|
|
|
Patch4: iproute2-xt.diff
|
|
|
|
Patch5: iproute2-libxtables6.diff
|
2011-06-01 00:54:51 +02:00
|
|
|
BuildRoot: %_tmppath/%name-%version-build
|
|
|
|
BuildRequires: bison, db-devel, flex, ghostscript-fonts-std, ghostscript-x11, libpng-devel, libtiff-devel, sgmltool, texlive-latex, xorg-x11-devel
|
2011-06-01 00:53:58 +02:00
|
|
|
%define with_xt 1
|
2011-05-30 13:51:21 +02:00
|
|
|
%if 0%{?with_xt}
|
|
|
|
BuildRequires: iptables-devel
|
|
|
|
%endif
|
2007-10-16 17:55:40 +02:00
|
|
|
|
2007-01-16 00:17:45 +01:00
|
|
|
%description
|
|
|
|
This package provides the tools ip, tc, and rtmon needed to use the new
|
|
|
|
and advanced routing options of the Linux kernel. The SUSE Linux
|
|
|
|
distribution has used this package for network setup since SuSE Linux
|
|
|
|
8.0.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Alexey Kuznetsov <kuznet at ms2 dot inr dot ac dot ru>
|
|
|
|
Stephem Hemminger <shemminger at osdl dot org>
|
|
|
|
|
2010-11-15 23:12:28 +01:00
|
|
|
%package -n libnetlink-devel
|
2010-11-20 11:31:11 +01:00
|
|
|
License: GPLv2+
|
2010-11-15 23:12:28 +01:00
|
|
|
Summary: A Higher Level Interface to the Netlink Service
|
|
|
|
Group: Development/Libraries/C and C++
|
2010-11-20 11:31:11 +01:00
|
|
|
Provides: libnetlink = %version-%release
|
2010-11-15 23:12:28 +01:00
|
|
|
|
|
|
|
%description -n libnetlink-devel
|
|
|
|
libnetlink provides a higher level interface to rtnetlink(7).
|
|
|
|
|
|
|
|
%package doc
|
2010-11-20 11:31:11 +01:00
|
|
|
License: GPLv2+
|
|
|
|
Summary: Documentation to iproute2
|
|
|
|
Group: Documentation
|
2010-11-15 23:12:28 +01:00
|
|
|
%if 0%{?suse_version} >= 1130
|
2010-11-20 11:31:11 +01:00
|
|
|
BuildArch: noarch
|
2010-11-15 23:12:28 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
This package contains the PDF documentation from iproute2,
|
|
|
|
as well as examples and other outdated files.
|
|
|
|
|
2007-01-16 00:17:45 +01:00
|
|
|
%prep
|
2009-08-13 23:25:48 +02:00
|
|
|
%setup -q -n %name-%rversion
|
2009-08-28 00:00:11 +02:00
|
|
|
%patch0
|
2007-01-16 00:17:45 +01:00
|
|
|
%patch1
|
|
|
|
%patch2
|
2011-03-22 09:26:04 +01:00
|
|
|
%patch3
|
2011-06-01 00:53:58 +02:00
|
|
|
%patch -P 4 -P 5 -p1
|
2007-01-16 00:17:45 +01:00
|
|
|
find . -name *.orig -print0 | xargs -r0 rm -v
|
|
|
|
|
|
|
|
%build
|
2008-05-08 23:15:15 +02:00
|
|
|
# build with -fPIC. For details see
|
|
|
|
# https://bugzilla.novell.com/show_bug.cgi?id=388021
|
2011-06-01 01:29:07 +02:00
|
|
|
xtlibdir="$(pkg-config xtables --variable=xtlibdir)";
|
|
|
|
make %{?_smp_mflags} LIBDIR=%_libdir CCOPTS="-D_GNU_SOURCE %optflags -Wstrict-prototypes -fPIC -DXT_LIB_DIR=\"$xtlibdir\""
|
2007-01-16 00:17:45 +01:00
|
|
|
cd doc
|
|
|
|
make pdf
|
|
|
|
|
|
|
|
%install
|
2011-06-01 00:54:51 +02:00
|
|
|
install -d %buildroot/{etc/,sbin/,usr/{sbin,share/man/man{3,8}}}
|
|
|
|
install -d %buildroot/{/usr/include,%_libdir,/usr/share}
|
|
|
|
make install DESTDIR=%buildroot LIBDIR=%_libdir \
|
|
|
|
MODDESTDIR="%buildroot/%_libdir/tc"
|
2011-06-01 00:53:58 +02:00
|
|
|
# We have m_xt
|
2011-06-01 00:54:51 +02:00
|
|
|
rm -f "%buildroot/%_libdir/tc/m_ipt.so"
|
|
|
|
install lib/libnetlink.a %buildroot/%_libdir
|
|
|
|
install include/libnetlink.h %buildroot%_includedir
|
|
|
|
mv %buildroot%_sbindir/ip %buildroot/sbin
|
|
|
|
mkdir -p %buildroot/bin
|
|
|
|
ln -sf /sbin/ip %buildroot/bin/ip
|
|
|
|
rm %buildroot%_sbindir/ifcfg
|
2007-01-16 00:17:45 +01:00
|
|
|
|
|
|
|
%clean
|
2011-06-01 00:54:51 +02:00
|
|
|
rm -rf %buildroot
|
2007-01-16 00:17:45 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2010-11-15 23:12:28 +01:00
|
|
|
%doc README* RELNOTES
|
2011-06-01 00:54:51 +02:00
|
|
|
%_sbindir/*
|
2007-01-16 00:17:45 +01:00
|
|
|
/sbin/*
|
|
|
|
/bin/ip
|
|
|
|
%_mandir/man8/*
|
2011-06-01 00:54:51 +02:00
|
|
|
%dir %_sysconfdir/iproute2
|
|
|
|
%config(noreplace) %_sysconfdir/iproute2/rt_dsfield
|
|
|
|
%config(noreplace) %_sysconfdir/iproute2/rt_protos
|
|
|
|
%config(noreplace) %_sysconfdir/iproute2/rt_scopes
|
|
|
|
%config(noreplace) %_sysconfdir/iproute2/rt_realms
|
|
|
|
%config(noreplace) %_sysconfdir/iproute2/rt_tables
|
|
|
|
%config(noreplace) %_sysconfdir/iproute2/ematch_map
|
2011-06-01 00:53:58 +02:00
|
|
|
%_libdir/tc
|
2011-06-01 00:54:51 +02:00
|
|
|
%dir %_datadir/tc
|
|
|
|
%attr(644,root,root)%_datadir/tc/*
|
2007-01-16 00:17:45 +01:00
|
|
|
|
2010-11-15 23:12:28 +01:00
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc doc/api-ip6-flowlabels.pdf doc/arpd.pdf doc/ip-cref.pdf
|
|
|
|
%doc doc/ip-tunnels.pdf doc/nstat.pdf doc/rtstat.pdf doc/ss.pdf
|
|
|
|
%doc ChangeLog examples/ ip/ifcfg ip/routef ip/routel
|
|
|
|
|
2008-09-24 16:51:26 +02:00
|
|
|
%files -n libnetlink-devel
|
2010-11-15 23:12:28 +01:00
|
|
|
%defattr(-,root,root)
|
2011-06-01 00:54:51 +02:00
|
|
|
%_includedir/*
|
2007-01-16 00:17:45 +01:00
|
|
|
%_mandir/man3/libnetlink*
|
|
|
|
%_libdir/lib*
|
2008-04-20 16:07:08 +02:00
|
|
|
|
2007-04-03 21:30:27 +02:00
|
|
|
%changelog
|