summaryrefslogtreecommitdiff
path: root/user/ethtool/APKBUILD
blob: 0f899072c1d4fba2f7a69820aeb9956b7ba6e001 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=ethtool
pkgver=5.3
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 AND GPL-2.0+"
depends=""
makedepends="linux-headers"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="https://www.kernel.org/pub/software/network/ethtool/$pkgname-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

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

bashcomp() {
	pkgdesc="Bash completions for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/bash-completion/ "$subpkgdir"/usr/share/
}

sha512sums="ad3651f74850e6773489baec27c51d077e3c080eb1d536a585ae05c618304880caf7598df5c9b1416c47ae9c4eac301032f6ea65fe47650dd9ecb7603c1857b0  ethtool-5.3.tar.xz"