# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=librem-ec
pkgver=0.9.2
pkgrel=0
pkgdesc="Librem laptop EC kernel module, with AKMS"
url="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms"
arch="noarch"
license="GPL-2.0-only"
depends="akms"
source="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms/-/archive/v$pkgver/librem-ec-acpi-dkms-v$pkgver.tar.gz
	AKMBUILD"
options="!check"  # no tests
builddir="$srcdir/librem-ec-acpi-dkms-v$pkgver"

package() {
	install -Dm644 "$srcdir/AKMBUILD" "$pkgdir/usr/src/librem-ec/AKMBUILD"
	install -Dm644 "$builddir"/Makefile "$pkgdir/usr/src/librem-ec/Makefile"
	install -Dm644 "$builddir"/*.c "$pkgdir/usr/src/librem-ec/"

	install -Dm644 "$builddir"/LICENSE \
		"$pkgdir/usr/share/licenses/librem-ec/LICENSE"
}

sha512sums="
b5d10fcf34a8b424138f9db1b06e916d809462ea55c7ca2565f13154da4fa49736ac95fb1b131c27ee49aa5f170f3e8a1a9c9a61c69e0364bcee37669759e8f6  librem-ec-acpi-dkms-v0.9.2.tar.gz
98278d791c5640be0c0e0d915f46a3136a386dcf2d4534c6c0d1b0315c40553e7a81a1a3f87ec954ea2f4c8747e3e77454ac4d3a6111cf9493327f8b3a93437e  AKMBUILD
"
