summaryrefslogtreecommitdiffstats
path: root/testing/hwdata/APKBUILD
blob: d6bb344f60744e6fce30ae67990484cbe87aed39 (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
# Maintainer: Natanael Copa
pkgname=hwdata
pkgver=0.240
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"

_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 --prefix=/usr \
		--sysconfdir=/etc \
		--datadir=/usr/share \
		|| return 1
	# nothing to make
}

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

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

usb() { _mv usb.ids; }
pci() { _mv pci.ids; }
pnp() { _mv pnp.ids; }
oui() { _mv oui.txt; }

md5sums="e7fbd88a28a6acea05feb6064bb49f2c  hwdata-0.240.tar.bz2"