summaryrefslogtreecommitdiff
path: root/user/hwids/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-11-06 03:07:32 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-11-06 03:07:32 +0000
commit6b75b73bbb77141a034c65d411b3a02b037f0aa2 (patch)
tree1051ea51b2f5fa6f6ea96b23e4db52b25394d260 /user/hwids/APKBUILD
parent2148b60f21bf7c3bf0fe6a8c71b0a20774524f54 (diff)
downloadpackages-6b75b73bbb77141a034c65d411b3a02b037f0aa2.tar.gz
packages-6b75b73bbb77141a034c65d411b3a02b037f0aa2.tar.bz2
packages-6b75b73bbb77141a034c65d411b3a02b037f0aa2.tar.xz
packages-6b75b73bbb77141a034c65d411b3a02b037f0aa2.zip
user/hwdata: deprecate, move to legacy/, replace with hwids
Diffstat (limited to 'user/hwids/APKBUILD')
-rw-r--r--user/hwids/APKBUILD70
1 files changed, 70 insertions, 0 deletions
diff --git a/user/hwids/APKBUILD b/user/hwids/APKBUILD
new file mode 100644
index 000000000..92d161907
--- /dev/null
+++ b/user/hwids/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=hwids
+pkgver=20180917
+pkgrel=0
+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+"
+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"
+ 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="9fdcd5a7b3adca1bed886aa83e9cf3944391a819fc9f09b673bd815d95e6e70cecf40d8e87287207e34bfeb58c888188fc61b1c0ac13c1ecab0efbdb5100f8d9 hwids-20180917.tar.gz"