diff --git a/mkosi.conf.d/build.conf b/mkosi.conf.d/build.conf index 433a059..dd8d552 100644 --- a/mkosi.conf.d/build.conf +++ b/mkosi.conf.d/build.conf @@ -3,4 +3,5 @@ Distribution=arch [Content] Packages= - crane \ No newline at end of file + crane + jq diff --git a/mkosi.postinst.chroot b/mkosi.postinst.chroot index c409132..486e702 100755 --- a/mkosi.postinst.chroot +++ b/mkosi.postinst.chroot @@ -50,4 +50,5 @@ EOF # Remove packages that are only used for building pacman -Rs --noconfirm \ - crane \ No newline at end of file + crane \ + jq diff --git a/mkosi.prepare.d/otb-rules.chroot b/mkosi.prepare.d/otb-rules.chroot new file mode 100755 index 0000000..0a72390 --- /dev/null +++ b/mkosi.prepare.d/otb-rules.chroot @@ -0,0 +1,12 @@ +#!/bin/bash + +set -ouex pipefail + +cd /tmp +otb_tag=$(curl -s "https://api.github.com/repos/OpenTabletDriver/OpenTabletDriver/releases/latest" | jq -r '.tag_name') +git clone https://github.com/opentabletdriver/opentabletdriver --branch ${otb_tag} && cd opentabletdriver + +otb_install_dir=/usr/lib/opentabletdriver-config +install -Dm0644 <(./generate-rules.sh) ${otb_install_dir}/udev/rules.d/70-opentabletdriver.rules +install -Dm0644 eng/bash/Generic/usr/lib/modprobe.d/99-opentabletdriver.conf -t ${otb_install_dir}/modprobe.d +install -Dm0644 eng/bash/Generic/usr/lib/modules-load.d/opentabletdriver.conf -t ${otb_install_dir}/modules-load.d