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
|
|
|
#
|
2016-01-14 14:39:51 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX 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/
|
|
|
|
#
|
|
|
|
|
2012-03-08 17:59:23 +01:00
|
|
|
|
2007-01-16 00:17:45 +01:00
|
|
|
Name: iproute2
|
2016-12-13 15:13:01 +01:00
|
|
|
Version: 4.9
|
2011-12-31 22:12:38 +01:00
|
|
|
Release: 0
|
2016-12-13 15:13:01 +01:00
|
|
|
%define rversion 4.9.0
|
2011-07-10 19:14:43 +02:00
|
|
|
Summary: Linux network configuration utilities
|
2012-02-08 23:01:20 +01:00
|
|
|
License: GPL-2.0
|
|
|
|
Group: Productivity/Networking/Routing
|
2011-12-31 22:12:38 +01:00
|
|
|
Url: http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
|
2011-10-21 22:26:32 +02:00
|
|
|
# Using GPL-2.0 instead of GPL-2.0+ because of tc_skbedit.h and tc/q_multiq.c
|
2011-12-31 22:12:38 +01:00
|
|
|
|
2012-03-30 03:33:16 +02:00
|
|
|
#DL-URL: http://kernel.org/pub/linux/utils/net/iproute2/
|
2011-12-31 22:12:38 +01:00
|
|
|
#Git-Clone: git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2
|
2015-07-15 16:41:53 +02:00
|
|
|
Source: http://kernel.org/pub/linux/utils/net/iproute2/%name-%rversion.tar.xz
|
2014-04-28 17:24:25 +02:00
|
|
|
Source2: http://kernel.org/pub/linux/utils/net/iproute2/%name-%rversion.tar.sign
|
2014-04-28 17:07:57 +02:00
|
|
|
Source666: pre_checkin.sh
|
|
|
|
Source667: %name.keyring
|
2012-11-14 01:25:11 +01:00
|
|
|
Patch1: iproute2-dirs.diff
|
|
|
|
Patch2: iproute2-HZ.diff
|
2012-11-14 13:47:37 +01:00
|
|
|
Patch3: revert-pdf-creation.diff
|
2014-11-25 10:02:54 +01:00
|
|
|
Patch4: revert-bison-fix.diff
|
2015-02-22 12:47:38 +01:00
|
|
|
Patch5: kernel_xfrm6_raw.patch
|
2016-01-14 14:39:51 +01:00
|
|
|
Patch6: man-fix-documentation-references-in-manual-pages.patch
|
2011-07-11 12:16:05 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-02-08 23:01:20 +01:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: db-devel
|
|
|
|
BuildRequires: flex
|
2016-11-16 10:50:06 +01:00
|
|
|
BuildRequires: libelf-devel
|
2012-02-08 23:01:20 +01:00
|
|
|
BuildRequires: pkgconfig >= 0.21
|
|
|
|
BuildRequires: xz
|
2011-06-01 00:53:58 +02:00
|
|
|
%define with_xt 1
|
2011-05-30 13:51:21 +02:00
|
|
|
%if 0%{?with_xt}
|
2015-06-29 10:08:41 +02:00
|
|
|
BuildRequires: pkgconfig(libmnl)
|
2014-04-16 22:29:57 +02:00
|
|
|
BuildRequires: pkgconfig(libselinux)
|
2012-02-08 23:01:20 +01:00
|
|
|
BuildRequires: pkgconfig(xtables) >= 1.4.11
|
2011-05-30 13:51:21 +02:00
|
|
|
%endif
|
2012-05-24 21:38:11 +02:00
|
|
|
Provides: iproute = %version-%release
|
2015-02-22 12:47:38 +01:00
|
|
|
Provides: %name(xfrm6_raw) = %version-%release
|
2007-10-16 17:55:40 +02:00
|
|
|
|
2007-01-16 00:17:45 +01:00
|
|
|
%description
|
2015-02-22 12:47:38 +01:00
|
|
|
iproute2 is a collection of user-space utilities to set up networking
|
|
|
|
under Linux from the command-line. It can inspect and configure,
|
|
|
|
among other things: interface paramters, IP addresses, routing,
|
|
|
|
tunnels, bridges, packet transformations (IPsec, etc.), and Quality
|
|
|
|
of Service.
|
2007-01-16 00:17:45 +01:00
|
|
|
|
2010-11-15 23:12:28 +01:00
|
|
|
%package -n libnetlink-devel
|
|
|
|
Summary: A Higher Level Interface to the Netlink Service
|
2012-02-08 23:01:20 +01:00
|
|
|
License: GPL-2.0+
|
2010-11-15 23:12:28 +01:00
|
|
|
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
|
2015-02-22 12:47:38 +01:00
|
|
|
libnetlink provides a higher-level interface to rtnetlink(7).
|
2015-06-29 10:08:41 +02:00
|
|
|
New programs should use libmnl-devel instead.
|
2010-11-15 23:12:28 +01:00
|
|
|
|
2016-05-21 11:41:49 +02:00
|
|
|
%package bash-completion
|
|
|
|
Summary: Bash completion for iproute
|
|
|
|
License: GPL-2.0+
|
|
|
|
Group: System/Shells
|
2016-05-23 15:35:50 +02:00
|
|
|
Requires: bash-completion
|
2016-05-21 11:41:49 +02:00
|
|
|
|
|
|
|
%description bash-completion
|
|
|
|
bash command line completion support for iproute.
|
|
|
|
|
2007-01-16 00:17:45 +01:00
|
|
|
%prep
|
2014-04-28 17:24:25 +02:00
|
|
|
%setup -qn %name-%rversion
|
2012-11-14 01:25:11 +01:00
|
|
|
%patch -P 1 -P 2 -p1
|
2012-11-14 13:47:37 +01:00
|
|
|
%if 0%{?sles_version} == 11 || (0%{?suse_version} && 0%{?suse_version} <= 1220)
|
|
|
|
%patch -P 3 -p1
|
|
|
|
%endif
|
2014-11-25 10:02:54 +01:00
|
|
|
%if 0%{?sles_version} == 11
|
|
|
|
%patch -P 4 -p1
|
|
|
|
%endif
|
2016-01-14 14:39:51 +01:00
|
|
|
%patch -P 5 -P 6 -p1
|
2012-05-24 21:38:11 +02:00
|
|
|
find . -name *.orig -delete
|
2007-01-16 00:17:45 +01:00
|
|
|
|
|
|
|
%build
|
2008-05-08 23:15:15 +02:00
|
|
|
# build with -fPIC. For details see
|
|
|
|
# https://bugzilla.novell.com/show_bug.cgi?id=388021
|
2016-05-21 11:41:49 +02:00
|
|
|
xt_libdir="$(pkg-config xtables --variable=xtlibdir)"
|
|
|
|
xt_cflags="$(pkg-config xtables --cflags)"
|
2013-04-15 10:27:29 +02:00
|
|
|
make %{?_smp_mflags} LIBDIR="%_libdir" CCOPTS="-D_GNU_SOURCE %optflags -Wstrict-prototypes -Wno-error -fPIC -DXT_LIB_DIR=\\\"$xt_libdir\\\" $xt_cflags"
|
2007-01-16 00:17:45 +01:00
|
|
|
|
|
|
|
%install
|
2016-05-21 11:41:49 +02:00
|
|
|
b="%buildroot"
|
2016-11-16 09:57:24 +01:00
|
|
|
install -d "$b"/{etc/,sbin/,usr/{bin,sbin,share/man/man{3,8}}}
|
2012-11-14 01:25:11 +01:00
|
|
|
install -d "$b"/{/usr/include,%_libdir,/usr/share}
|
|
|
|
make install DESTDIR="$b" LIBDIR="%_libdir" \
|
2016-05-21 11:41:49 +02:00
|
|
|
MODDESTDIR="$b/%_libdir/tc" DOCDIR="%_docdir/%name"
|
2011-06-01 00:53:58 +02:00
|
|
|
# We have m_xt
|
2016-05-21 11:41:49 +02:00
|
|
|
rm -f "$b/%_libdir/tc/m_ipt.so"
|
|
|
|
install -pm0644 "lib/libnetlink.a" "$b/%_libdir/"
|
|
|
|
chmod -x "$b/%_libdir/libnetlink.a"
|
|
|
|
install -pm0644 "include/libnetlink.h" "$b/%_includedir/"
|
|
|
|
chmod -x "$b/%_includedir/libnetlink.h"
|
2012-03-08 17:59:23 +01:00
|
|
|
#UsrMerge
|
2016-05-21 11:41:49 +02:00
|
|
|
ln -s "%_sbindir/ip" "$b/sbin"
|
|
|
|
mkdir -p "$b/bin"
|
|
|
|
ln -sf "%_sbindir/ip" "$b/bin/ip"
|
2012-03-08 17:59:23 +01:00
|
|
|
#EndUsrMerge
|
2016-11-16 09:57:24 +01:00
|
|
|
for BIN in lnstat nstat routef routel ss; do
|
|
|
|
ln -sf "%{_sbindir}/$BIN" "$b%{_bindir}/$BIN"
|
|
|
|
done
|
2016-05-21 11:41:49 +02:00
|
|
|
rm "$b/%_sbindir/ifcfg"
|
2012-11-14 01:25:11 +01:00
|
|
|
|
2016-05-21 11:41:49 +02:00
|
|
|
mkdir -p "$b/%_docdir/%name"
|
2014-04-28 17:07:57 +02:00
|
|
|
# packaged in iproute2-doc:
|
|
|
|
rm -rf $b/%_docdir/%name/*
|
|
|
|
cp -an README* COPYING "$b/%_docdir/%name/"
|
2007-01-16 00:17:45 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2012-11-14 01:25:11 +01:00
|
|
|
%dir %_docdir/%name
|
|
|
|
%_docdir/%name/README*
|
|
|
|
%_docdir/%name/COPYING
|
2016-11-16 09:57:24 +01:00
|
|
|
%_bindir/lnstat
|
|
|
|
%_bindir/nstat
|
|
|
|
%_bindir/routef
|
|
|
|
%_bindir/routel
|
|
|
|
%_bindir/ss
|
2011-06-01 00:54:51 +02:00
|
|
|
%_sbindir/*
|
2012-03-08 17:59:23 +01:00
|
|
|
#UsrMerge
|
2007-01-16 00:17:45 +01:00
|
|
|
/sbin/*
|
|
|
|
/bin/ip
|
2012-03-08 17:59:23 +01:00
|
|
|
#EndUsrMerge
|
2013-04-15 10:27:29 +02:00
|
|
|
%_mandir/man7/*
|
2007-01-16 00:17:45 +01:00
|
|
|
%_mandir/man8/*
|
2011-06-01 00:54:51 +02:00
|
|
|
%dir %_sysconfdir/iproute2
|
2011-07-10 19:14:43 +02:00
|
|
|
%config(noreplace) %_sysconfdir/iproute2/*
|
2014-11-25 10:15:38 +01:00
|
|
|
%_libdir/tc/
|
|
|
|
%_datadir/tc/
|
2007-01-16 00:17:45 +01:00
|
|
|
|
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
|
|
|
|
2016-05-21 11:41:49 +02:00
|
|
|
%files bash-completion
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_datadir/bash-completion/
|
|
|
|
|
2007-04-03 21:30:27 +02:00
|
|
|
%changelog
|