# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ethtool
pkgver=6.14.1
pkgrel=0
pkgdesc="Utility for controlling network drivers and hardware"
url="https://mirrors.edge.kernel.org/pub/software/network/ethtool/"
arch="all"
license="GPL-2.0-only"
makedepends="linux-headers libmnl-dev"
subpackages="$pkgname-doc $pkgname-bash-completion"
source="https://www.kernel.org/pub/software/network/ethtool/ethtool-$pkgver.tar.xz"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
ba15c2c82f2a04126aa4a9f85a242ef647c82eb6a383559ed309cd8be9be249aa2cf42f0f0362fdfee58d1c8840ee0bc453c890d0e893ea5e958ac97e6522fe1  ethtool-6.14.1.tar.xz
"
