Skip to content

Commit

Permalink
feat: Add OpenRazer kmod (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo authored Sep 16, 2023
1 parent e8142b0 commit 57c91c7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN /tmp/build-ublue-os-akmods-addons.sh
RUN /tmp/build-kmod-evdi.sh
RUN /tmp/build-kmod-gasket.sh
RUN /tmp/build-kmod-gcadapter_oc.sh
RUN /tmp/build-kmod-openrazer.sh
RUN /tmp/build-kmod-openrgb.sh
RUN /tmp/build-kmod-steamdeck.sh
RUN /tmp/build-kmod-v4l2loopback.sh
Expand Down
25 changes: 25 additions & 0 deletions build-kmod-openrazer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

set -oeux pipefail

cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/

ARCH="$(rpm -E '%_arch')"
KERNEL="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
RELEASE="$(rpm -E '%fedora')"


### BUILD openrazer (succeed or fail-fast with debug output)
rpm-ostree install \
akmod-openrazer-*.fc${RELEASE}.${ARCH}
akmods --force --kernels "${KERNEL}" --kmod openrazer
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razerkbd.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razermouse.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razerkraken.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)
modinfo /usr/lib/modules/${KERNEL}/extra/openrazer/razeraccessory.ko.xz > /dev/null \
|| (find /var/cache/akmods/openrazer/ -name \*.log -print -exec cat {} \; && exit 1)

rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo

0 comments on commit 57c91c7

Please sign in to comment.