aboutsummaryrefslogtreecommitdiffstats
path: root/main/hwdata/APKBUILD
blob: caa449df860ff96cea8ec4e59ac1b88a626a96d9 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=hwdata
pkgver=0.248
pkgrel=0
pkgdesc="Hardware identification and configuration data"
url="http://git.fedorahosted.org/git/hwdata.git"
arch="noarch"
license="GPLv2+"
makedepends="bash"
install=""
subpackages="$pkgname-usb $pkgname-pci $pkgname-pnp $pkgname-oui"
depends="$subpackages"
source="http://fedorahosted.org/releases/h/w/hwdata/hwdata-$pkgver.tar.bz2
	install-T.patch"

_builddir="$srcdir"/hwdata-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--datadir=/usr/share \
		|| return 1
	# nothing to make
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
	# remove modprobe blacklist
	rm -r "$pkgdir"/usr/lib
}

_mv() {
	pkgdesc="$pkgdesc - $1"
	depends=""
	mkdir -p "$subpkgdir"/usr/share/hwdata
	mv "$pkgdir"/usr/share/hwdata/$1 "$subpkgdir"/usr/share/hwdata
}

usb() { replaces="usbutils"; _mv usb.ids; }
pci() { replaces="pciutils"; _mv pci.ids; }
pnp() { _mv pnp.ids; }
oui() { _mv oui.txt; }

md5sums="0ad47033d24a7c6c174e108d8fec07c4  hwdata-0.248.tar.bz2
b30d7aab15c0c399d01867e797319cf0  install-T.patch"
sha256sums="ec150fa99b01283f53d1a3aec7063622bc77e42e34a8dcb5023a7d112859e5a6  hwdata-0.248.tar.bz2
d3020c09de374f28d1ffb470c1cae5c45af6b5eac161b2f805f9d0332959d5be  install-T.patch"
sha512sums="cdc2d2ec21325c8d9672681214840ffbc433f14392ab220858c3803e3157f06d91abfde4c6dceb8c7729d36c197d8a9c751b7d56c590b747a4a46f29097d7e45  hwdata-0.248.tar.bz2
f3e67cb573ad617ff6b9c57af502652780581b3e87d5eec4fbe9bcf8c16c3eccb0629193e38fd0ebd21eeaae87aad152687f0bc62c4ddc17cedaebf82fd1d94d  install-T.patch"