Install xboxdrv

This commit is contained in:
gmpinder
2023-06-04 00:53:55 -04:00
parent 6b5c800d44
commit a200affa5d
2 changed files with 22 additions and 0 deletions

View File

@@ -9,6 +9,13 @@ ARG FEDORA_MAJOR_VERSION=38
# Warning: changing this might not do anything for you. Read comment above. # Warning: changing this might not do anything for you. Read comment above.
ARG BASE_IMAGE_URL=ghcr.io/ublue-os/silverblue-main ARG BASE_IMAGE_URL=ghcr.io/ublue-os/silverblue-main
# This is to install xboxdrv for the Xbox 360 controller.
FROM registry.fedoraproject.org/fedora:${FEDORA_MAJOR_VERSION} as xboxdrv-bin
COPY scripts/install-xboxdrv.sh /tmp/scripts/install-xboxdrv.sh
RUN /tmp/scripts/install-xboxdrv.sh
FROM ${BASE_IMAGE_URL}:${FEDORA_MAJOR_VERSION} FROM ${BASE_IMAGE_URL}:${FEDORA_MAJOR_VERSION}
# The default recipe set to the recipe's default filename # The default recipe set to the recipe's default filename
@@ -34,6 +41,8 @@ COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq
# Install cosign for verifying signatures for images. # Install cosign for verifying signatures for images.
COPY --from=gcr.io/projectsigstore/cosign /ko-app/cosign /usr/bin/cosign COPY --from=gcr.io/projectsigstore/cosign /ko-app/cosign /usr/bin/cosign
COPY --from=xboxdrv-bin /usr/bin/xboxdrv /usr/bin/xboxdrv
# Copy the build script and all custom scripts. # Copy the build script and all custom scripts.
COPY scripts /tmp/scripts COPY scripts /tmp/scripts

13
scripts/install-xboxdrv.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -oue pipefail
dnf install git gcc-c++ pkgconfig libusb1-devel boost-devel systemd-devel dbus-devel python3-scon
cd ~
mkdir src
cd src
git clone https://gitlab.com/xboxdrv/xboxdrv.git
cd xboxdrv
git checkout stable
git submodule update --init --recursive
scons
make install