Jan Engelhardt
a0e649d830
OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iproute2?expand=0&rev=30
141 lines
4.2 KiB
RPMSpec
141 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package iproute2
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: iproute2
|
|
License: GPLv2+
|
|
Group: Productivity/Networking/Routing
|
|
Provides: iproute
|
|
Version: 2.6.38
|
|
Release: 2
|
|
%define rversion 2.6.38
|
|
Summary: Advanced Routing
|
|
URL: http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
|
|
Source0: %name-%rversion.tar.bz2
|
|
Patch0: %name-libdir-1.diff
|
|
Patch1: %name-HZ.diff
|
|
Patch2: %name-pdfdoc.diff
|
|
Patch3: %name-memleak.diff
|
|
Patch4: iproute2-xt.diff
|
|
Patch5: iproute2-libxtables6.diff
|
|
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
|
|
%define with_xt 1
|
|
%if 0%{?with_xt}
|
|
BuildRequires: iptables-devel
|
|
%endif
|
|
|
|
%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>
|
|
|
|
%package -n libnetlink-devel
|
|
License: GPLv2+
|
|
Summary: A Higher Level Interface to the Netlink Service
|
|
Group: Development/Libraries/C and C++
|
|
Provides: libnetlink = %version-%release
|
|
|
|
%description -n libnetlink-devel
|
|
libnetlink provides a higher level interface to rtnetlink(7).
|
|
|
|
%package doc
|
|
License: GPLv2+
|
|
Summary: Documentation to iproute2
|
|
Group: Documentation
|
|
%if 0%{?suse_version} >= 1130
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description doc
|
|
This package contains the PDF documentation from iproute2,
|
|
as well as examples and other outdated files.
|
|
|
|
%prep
|
|
%setup -q -n %name-%rversion
|
|
%patch0
|
|
%patch1
|
|
%patch2
|
|
%patch3
|
|
%patch -P 4 -P 5 -p1
|
|
find . -name *.orig -print0 | xargs -r0 rm -v
|
|
|
|
%build
|
|
# build with -fPIC. For details see
|
|
# https://bugzilla.novell.com/show_bug.cgi?id=388021
|
|
xtlibdir="$(pkg-config xtables --variable=xtlibdir)";
|
|
make %{?_smp_mflags} LIBDIR=%_libdir CCOPTS="-D_GNU_SOURCE %optflags -Wstrict-prototypes -fPIC -DXT_LIB_DIR=\\\"$xtlibdir\\\""
|
|
cd doc
|
|
make pdf
|
|
|
|
%install
|
|
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"
|
|
# We have m_xt
|
|
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
|
|
|
|
%clean
|
|
rm -rf %buildroot
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README* RELNOTES
|
|
%_sbindir/*
|
|
/sbin/*
|
|
/bin/ip
|
|
%_mandir/man8/*
|
|
%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
|
|
%_libdir/tc
|
|
%dir %_datadir/tc
|
|
%attr(644,root,root)%_datadir/tc/*
|
|
|
|
%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
|
|
|
|
%files -n libnetlink-devel
|
|
%defattr(-,root,root)
|
|
%_includedir/*
|
|
%_mandir/man3/libnetlink*
|
|
%_libdir/lib*
|
|
|
|
%changelog
|