naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
Petr Šabata d9a596
Summary:            Advanced IP routing and network device configuration tools
Petr Šabata d9a596
Name:               iproute
030cdd
Version:            6.7.0
030cdd
Release:            %autorelease
87177b
%if 0%{?rhel}
2f8814
Group:              Applications/System
2f8814
%endif
2f8814
URL:                https://kernel.org/pub/linux/utils/net/%{name}2/
2f8814
Source0:            https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz
87177b
Source1:            rt_dsfield.deprecated
Petr Šabata d9a596
925304
License:            GPL-2.0-or-later AND NIST-PD
Petr Šabata d9a596
BuildRequires:      bison
Petr Šabata d9a596
BuildRequires:      elfutils-libelf-devel
Petr Šabata d9a596
BuildRequires:      flex
2f8814
BuildRequires:      gcc
Petr Šabata d9a596
BuildRequires:      iptables-devel >= 1.4.5
2f8814
BuildRequires:      libbpf-devel
Petr Šabata d9a596
BuildRequires:      libcap-devel
Petr Šabata d9a596
BuildRequires:      libdb-devel
Petr Šabata d9a596
BuildRequires:      libmnl-devel
Petr Šabata d9a596
BuildRequires:      libselinux-devel
DistroBaker a0a3c8
BuildRequires:      make
2f8814
BuildRequires:      pkgconfig
Petr Šabata d9a596
%if ! 0%{?_module_build}
Petr Šabata d9a596
%if 0%{?fedora}
Petr Šabata d9a596
BuildRequires:      linux-atm-libs-devel
Petr Šabata d9a596
%endif
Petr Šabata d9a596
%endif
2f8814
Requires:           libbpf
Petr Šabata d9a596
Requires:           psmisc
2f8814
Provides:           /sbin/ip
Petr Šabata d9a596
Petr Šabata d9a596
%description
Petr Šabata d9a596
The iproute package contains networking utilities (ip and rtmon, for example)
Petr Šabata d9a596
which are designed to use the advanced networking capabilities of the Linux
Petr Šabata d9a596
kernel.
Petr Šabata d9a596
Petr Šabata d9a596
%package tc
Petr Šabata d9a596
Summary:            Linux Traffic Control utility
87177b
%if 0%{?rhel}
2f8814
Group:              Applications/System
2f8814
%endif
925304
License:            GPL-2.0-or-later
Petr Šabata d9a596
Requires:           %{name}%{?_isa} = %{version}-%{release}
DistroBaker e5f2ac
Provides:           /sbin/tc
Petr Šabata d9a596
Petr Šabata d9a596
%description tc
Petr Šabata d9a596
The Traffic Control utility manages queueing disciplines, their classes and
Petr Šabata d9a596
attached filters and actions. It is the standard tool to configure QoS in
Petr Šabata d9a596
Linux.
Petr Šabata d9a596
2f8814
%if ! 0%{?_module_build}
2f8814
%package doc
2f8814
Summary:            Documentation for iproute2 utilities with examples
87177b
%if 0%{?rhel}
2f8814
Group:              Applications/System
2f8814
%endif
925304
License:            GPL-2.0-or-later
2f8814
Requires:           %{name} = %{version}-%{release}
2f8814
2f8814
%description doc
2f8814
The iproute documentation contains howtos and examples of settings.
2f8814
%endif
2f8814
Petr Šabata d9a596
%package devel
Petr Šabata d9a596
Summary:            iproute development files
87177b
%if 0%{?rhel}
2f8814
Group:              Development/Libraries
2f8814
%endif
925304
License:            GPL-2.0-or-later
2f8814
Requires:           %{name} = %{version}-%{release}
Petr Šabata d9a596
Provides:           iproute-static = %{version}-%{release}
Petr Šabata d9a596
Petr Šabata d9a596
%description devel
Petr Šabata d9a596
The libnetlink static library.
Petr Šabata d9a596
Petr Šabata d9a596
%prep
Petr Šabata d9a596
%autosetup -p1 -n %{name}2-%{version}
Petr Šabata d9a596
Petr Šabata d9a596
%build
030cdd
%configure
030cdd
echo -e "\nSBINDIR=%{_sbindir}" >> config.mk
DistroBaker e5f2ac
%make_build
Petr Šabata d9a596
Petr Šabata d9a596
%install
DistroBaker e5f2ac
%make_install
Petr Šabata d9a596
2f8814
echo '.so man8/tc-cbq.8' > %{buildroot}%{_mandir}/man8/cbq.8
2f8814
Petr Šabata d9a596
# libnetlink
Petr Šabata d9a596
install -D -m644 include/libnetlink.h %{buildroot}%{_includedir}/libnetlink.h
Petr Šabata d9a596
install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a
Petr Šabata d9a596
2f8814
# drop these files, iproute-doc package extracts files directly from _builddir
2f8814
rm -rf '%{buildroot}%{_docdir}'
2f8814
87177b
# append deprecated values to rt_dsfield for compatibility reasons
38f643
%if 0%{?rhel} && ! 0%{?eln}
030cdd
cat %{SOURCE1} >>%{buildroot}%{_datadir}/iproute2/rt_dsfield
2f8814
%endif
2f8814
Petr Šabata d9a596
%files
030cdd
%dir %{_datadir}/iproute2
Petr Šabata d9a596
%license COPYING
2f8814
%doc README README.devel
Petr Šabata d9a596
%{_mandir}/man7/*
Petr Šabata d9a596
%exclude %{_mandir}/man7/tc-*
Petr Šabata d9a596
%{_mandir}/man8/*
Petr Šabata d9a596
%exclude %{_mandir}/man8/tc*
2f8814
%exclude %{_mandir}/man8/cbq*
030cdd
%attr(644,root,root) %config(noreplace) %{_datadir}/iproute2/*
Petr Šabata d9a596
%{_sbindir}/*
Petr Šabata d9a596
%exclude %{_sbindir}/tc
4bf0a0
%exclude %{_sbindir}/routel
Petr Šabata d9a596
%{_datadir}/bash-completion/completions/devlink
Petr Šabata d9a596
Petr Šabata d9a596
%files tc
Petr Šabata d9a596
%license COPYING
Petr Šabata d9a596
%{_mandir}/man7/tc-*
Petr Šabata d9a596
%{_mandir}/man8/tc*
2f8814
%{_mandir}/man8/cbq*
Petr Šabata d9a596
%dir %{_libdir}/tc/
Petr Šabata d9a596
%{_libdir}/tc/*
Petr Šabata d9a596
%{_sbindir}/tc
Petr Šabata d9a596
%{_datadir}/bash-completion/completions/tc
Petr Šabata d9a596
2f8814
%if ! 0%{?_module_build}
2f8814
%files doc
2f8814
%license COPYING
2f8814
%doc examples
2f8814
%endif
2f8814
Petr Šabata d9a596
%files devel
Petr Šabata d9a596
%license COPYING
Petr Šabata d9a596
%{_mandir}/man3/*
Petr Šabata d9a596
%{_libdir}/libnetlink.a
Petr Šabata d9a596
%{_includedir}/libnetlink.h
Petr Šabata d9a596
%{_includedir}/iproute2/bpf_elf.h
Petr Šabata d9a596
Petr Šabata d9a596
%changelog
030cdd
%autochangelog