Skip to content

Commit

Permalink
feat: Add OpenTabletDriver udev rules pulled from their latest GitHub…
Browse files Browse the repository at this point in the history
… release (#127)

* feat: Add OpenTabletDriver udev rules pulled from their latest GitHub release

* chore: Update udev rule spec file
  • Loading branch information
KyleGospo authored Sep 28, 2023
1 parent 4b0bddd commit 51d41fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
15 changes: 14 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
FROM registry.fedoraproject.org/fedora:latest AS builder

RUN dnf install --disablerepo='*' --enablerepo='fedora,updates' --setopt install_weak_deps=0 --nodocs --assumeyes rpm-build systemd-rpm-macros
RUN dnf install --disablerepo='*' --enablerepo='fedora,updates' --setopt install_weak_deps=0 --nodocs --assumeyes rpm-build systemd-rpm-macros wget

ADD https://codeberg.org/fabiscafe/game-devices-udev/archive/main.tar.gz /tmp/ublue-os/rpmbuild/SOURCES/game-devices-udev.tar.gz

# Add udev rules from repository
ADD files/etc/udev/rules.d /tmp/ublue-os/udev-rules/etc/udev/rules.d

# Install OpenTabletDriver udev rules from their portable releases
RUN mkdir -p /tmp/OpenTabletDriver/ && \
mkdir -p /usr/etc/udev/rules.d/ && \
curl -s https://api.github.com/repos/OpenTabletDriver/OpenTabletDriver/releases/latest \
| grep "browser_download_url.*opentabletdriver-.*-x64.tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi - -O /tmp/OpenTabletDriver/opentabletdriver.tar.gz && \
tar -xvzf /tmp/OpenTabletDriver/opentabletdriver.tar.gz -C /tmp/OpenTabletDriver && \
mv /tmp/OpenTabletDriver/opentabletdriver/etc/udev/rules.d/70-opentabletdriver.rules /tmp/ublue-os/udev-rules/etc/udev/rules.d/70-opentabletdriver.rules && \
rm -rf /tmp/OpenTabletDriver

ADD files/etc/rpm-ostreed.conf /tmp/ublue-os/update-services/etc/rpm-ostreed.conf
ADD files/usr/etc/systemd /tmp/ublue-os/update-services/usr/etc/systemd
ADD files/usr/lib/systemd /tmp/ublue-os/update-services/usr/lib/systemd
Expand Down
5 changes: 4 additions & 1 deletion rpmspec/ublue-os-udev-rules.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: ublue-os-udev-rules
Packager: ublue-os
Vendor: ublue-os
Version: 0.4
Version: 0.5
Release: 1%{?dist}
Summary: Additional udev files for device support

Expand Down Expand Up @@ -45,6 +45,9 @@ cp %{buildroot}%{_datadir}/%{VENDOR}/{%{sub_name}/etc/udev/rules.d,game-devices-


%changelog
* Thu Sep 28 2023 Kyle Gospodnetich <[email protected]> - 0.5
- Add OpenTabletDriver udev rules

* Sat May 13 2023 Benjamin Sherman <[email protected]> - 0.4
- Add usb-realtek-net rules

Expand Down

0 comments on commit 51d41fb

Please sign in to comment.