diff --git a/srcpkgs/pinebookpro-base/files/10-usb-kbd.hwdb b/srcpkgs/pinebookpro-base/files/10-pinebookpro.hwdb similarity index 76% rename from srcpkgs/pinebookpro-base/files/10-usb-kbd.hwdb rename to srcpkgs/pinebookpro-base/files/10-pinebookpro.hwdb index f8348e6fb3..65f4b3ed31 100644 --- a/srcpkgs/pinebookpro-base/files/10-usb-kbd.hwdb +++ b/srcpkgs/pinebookpro-base/files/10-pinebookpro.hwdb @@ -1,4 +1,4 @@ -evdev:input:b0003v258Ap001E* +pinebookpro:keyboard KEYBOARD_KEY_700a5=brightnessdown KEYBOARD_KEY_700a6=brightnessup KEYBOARD_KEY_70066=sleep diff --git a/srcpkgs/pinebookpro-base/files/60-pinebookpro.rules b/srcpkgs/pinebookpro-base/files/60-pinebookpro.rules new file mode 100644 index 0000000000..63d3e9ea21 --- /dev/null +++ b/srcpkgs/pinebookpro-base/files/60-pinebookpro.rules @@ -0,0 +1,7 @@ +ACTION=="remove", GOTO="pinebookpro_end" +KERNEL!="event*", GOTO="pinebookpro_end" + +ENV{idVendor}=="258a", ENV{idProduct}=="001e", ENV{ID_INPUT_KEYBOARD}=="1", \ + IMPORT{builtin}="hwdb 'pinebookpro:keyboard'", RUN{builtin}+="keyboard" + +LABEL="pinebookpro_end" diff --git a/srcpkgs/pinebookpro-base/template b/srcpkgs/pinebookpro-base/template index 9b4a41eb9a..fce0a329b9 100644 --- a/srcpkgs/pinebookpro-base/template +++ b/srcpkgs/pinebookpro-base/template @@ -1,6 +1,6 @@ # Template file for 'pinebookpro-base' pkgname=pinebookpro-base -version=0.2 +version=0.3 revision=1 archs="aarch64*" build_style=meta @@ -9,8 +9,10 @@ short_desc="Void Linux Pinebook Pro platform package" maintainer="Renato Aguiar " license="Public Domain" homepage="https://www.voidlinux.org" +mutable_files="/var/lib/alsa/asound.state" do_install() { - vinstall "${FILESDIR}/10-usb-kbd.hwdb" 644 usr/lib/udev/hwdb.d + vinstall "${FILESDIR}/60-pinebookpro.rules" 644 usr/lib/udev/rules.d + vinstall "${FILESDIR}/10-pinebookpro.hwdb" 644 usr/lib/udev/hwdb.d vinstall "${FILESDIR}/asound.state" 644 var/lib/alsa }