File ethtool.spec of Package ethtool

# spec file for package ethtool
# Copyright (c) 2017 SUSE LINUX 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

Name:           ethtool
Version:        4.5
Release:        0
Summary:        Examine and Tune Ethernet-Based Network Interfaces
License:        GPL-2.0
Group:          Productivity/Networking/Diagnostic

#Git-Clone:	git://
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  xz

Patch1:         ethtool.c-add-support-for-ETHTOOL_xLINKSETTINGS-ioct.patch
Patch2:         ethtool-copy.h-sync-with-net.patch
Patch3:         ethtool-Enhancing-link-mode-bits-to-support-25G-50G-.patch
Patch4:         ethtool-Document-new-ethtool-advertise-speeds.patch
Patch5:         ethtool-Fix-the-advertise-parameter-logic.patch

Ethtool is a small utility for examining and tuning ethernet-based
network interfaces.  See the man page for more details.

%{?gpg_verify: xz -dk "%{S:0}"; %gpg_verify %{S:2}}
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

export CFLAGS="%{optflags} -W -Wall -Wstrict-prototypes -Wformat-security -Wpointer-arith"
make %{?_smp_mflags}

make install DESTDIR="%buildroot"
mkdir -p %{buildroot}/sbin
ln -sf %{_sbindir}/ethtool %{buildroot}/sbin/


openSUSE Build Service is sponsored by