aboutsummaryrefslogtreecommitdiffstats
path: root/main/hwids
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-08-11 23:40:14 -0300
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-08-12 10:04:36 +0000
commita7cac6bb1a8c7ceb836c2bc3d3a901bf522c21aa (patch)
tree1a9054a80a283e81a39c24148ed1cfff755e0213 /main/hwids
parentb765546462bae4946b2e132867d9641e1f351456 (diff)
downloadaports-a7cac6bb1a8c7ceb836c2bc3d3a901bf522c21aa.tar.bz2
aports-a7cac6bb1a8c7ceb836c2bc3d3a901bf522c21aa.tar.xz
main/hwids: move from testing
Diffstat (limited to 'main/hwids')
-rw-r--r--main/hwids/APKBUILD70
1 files changed, 70 insertions, 0 deletions
diff --git a/main/hwids/APKBUILD b/main/hwids/APKBUILD
new file mode 100644
index 0000000000..afc65b007e
--- /dev/null
+++ b/main/hwids/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=hwids
+pkgver=20190316
+pkgrel=1
+pkgdesc="Hardware identification databases"
+url="https://github.com/gentoo/hwids/"
+arch="noarch"
+options="!check" # No test suite, just databases.
+license="BSD-3-Clause OR GPL-2.0-or-later"
+makedepends="eudev-dev"
+subpackages="$pkgname-net $pkgname-pci $pkgname-udev $pkgname-usb"
+depends="$subpackages"
+subpackages="$subpackages $pkgname-doc"
+source="https://github.com/gentoo/hwids/archive/hwids-$pkgver.tar.gz"
+builddir="$srcdir/hwids-hwids-$pkgver"
+
+build() {
+ cd "$builddir"
+ make UDEV=yes
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" DOCDIR="/usr/share/doc/$pkgname-$pkgver" \
+ MISCDIR="/usr/share/hwdata" UDEV=yes install
+}
+
+_mv() {
+ local _file
+ pkgdesc="$pkgdesc ($1)"
+ shift
+ depends=""
+ mkdir -p "$subpkgdir"/usr/share/hwdata
+ for _file in $*; do
+ mv "$pkgdir"/usr/share/hwdata/$_file "$subpkgdir"/usr/share/hwdata
+ done
+}
+
+usb() {
+ replaces="hwdata-usb"
+ provides="hwdata-usb=$pkgver-r$pkgrel"
+ _mv "USB IDs" usb.ids
+}
+
+pci() {
+ replaces="hwdata-pci"
+ provides="hwdata-pci=$pkgver-r$pkgrel"
+ _mv "PCI IDs" pci.ids
+}
+
+net() {
+ replaces="hwdata-oui hwdata"
+ provides="hwdata-oui=$pkgver-r$pkgrel"
+ license="Public-Domain"
+ _mv "Networking OUIs" oui.txt iab.txt
+}
+
+udev() {
+ install_if="hwids=$pkgver-r$pkgrel eudev"
+ install_if="hwids-pci=$pkgver-r$pkgrel eudev"
+ install_if="hwids-usb=$pkgver-r$pkgrel eudev"
+ pkgdesc="$pkgdesc (udev integration)"
+
+ mkdir -p "$subpkgdir"/
+ mv "$pkgdir"/lib "$subpkgdir"/
+ mv "$pkgdir"/etc "$subpkgdir"/
+}
+
+sha512sums="6db50577b5d29d73f1dc0a44d0b74320cb0df186b9850160b15a6e8f2bcbdbf8193bae4146f81a5afc6b0e05706b5286b4b5858eb028d6c58ea4582df61d232e hwids-20190316.tar.gz"