Use docker image to install xboxdrv

This commit is contained in:
Gerald Pinder
2023-07-22 20:40:05 -04:00
parent 3a43dad00d
commit 785528e0e8
2 changed files with 3 additions and 23 deletions

View File

@@ -9,13 +9,6 @@ ARG FEDORA_MAJOR_VERSION=38
# Warning: changing this might not do anything for you. Read comment above.
ARG BASE_IMAGE_URL=ghcr.io/ublue-os/kinoite-main
# This is to install xboxdrv for the Xbox 360 controller.
FROM registry.fedoraproject.org/fedora-toolbox:${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}
# The default recipe set to the recipe's default filename
@@ -45,9 +38,9 @@ COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq
COPY --from=gcr.io/projectsigstore/cosign /ko-app/cosign /usr/bin/cosign
# Install xboxdrv for the Xbox 360 controller.
COPY --from=xboxdrv-bin /usr/local/bin/xboxdrv /usr/bin/xboxdrv
COPY --from=xboxdrv-bin /usr/local/bin/xboxdrvctl /usr/bin/xboxdrvctl
COPY --from=xboxdrv-bin /usr/local/share/man/man1/xboxdrv.1 /usr/share/man/man1/xboxdrv.1
COPY --from=registry.gitlab.com/wunker-bunker/xboxdrv-docker /usr/local/bin/xboxdrv /usr/bin/xboxdrv
COPY --from=registry.gitlab.com/wunker-bunker/xboxdrv-docker /usr/local/bin/xboxdrvctl /usr/bin/xboxdrvctl
COPY --from=registry.gitlab.com/wunker-bunker/xboxdrv-docker /usr/local/share/man/man1/xboxdrv.1 /usr/share/man/man1/xboxdrv.1
# Copy the build script and all custom scripts.
COPY scripts /tmp/scripts

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -oue pipefail
dnf install -y git gcc-c++ pkgconfig libusb1-devel boost-devel systemd-devel dbus-devel python3-scons libX11-devel glib2-devel dbus-glib-devel
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