File jupiter-hw-support.spec of Package jupiter-hw-support
#
# spec file for package jupiter-hw-support
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: jupiter-hw-support
Version: 20250728.1
Release: 0
Summary: Jupiter HW support package
License: SUSE-NonFree
Group: System/Daemon
URL: https://gitlab.com/evlaV/jupiter-hw-support
Source0: jupiter-hw-support-%{version}.tar.xz
Source1: jupiter-hw-support.rpmlintrc
Patch0: rpm.patch
Patch1: selinux.patch
Requires: python3
Requires: python3-evdev
Requires: python3-crcmod
Requires: python3-click
Requires: python3-progressbar2
Requires: python3-hid
Requires: hidapi
Requires: dmidecode
Requires: jq
Requires: alsa-utils
Requires: parted
Requires: e2fsprogs
Requires: f3
Requires: jupiter-fan-control
Requires: gamescope-session-common
BuildRequires: systemd-rpm-macros
BuildRequires: xcursorgen
BuildRequires: sed
BuildRequires: pkgconfig(systemd)
%description
SteamOS 3.0 Steam Deck Hardware Support Package
%package -n gamescope-session-common
Summary: Gamescope Session required files
Requires: gamescope-session-steam
%description -n gamescope-session-common
Required files for the SteamOS experience on actual devices.
%package -n plymouth-theme-steamos
Summary: The official SteamOS 3 plymouth theme
Requires: plymouth
Requires: plymouth-scripts
Requires: plymouth-plugin-script
Requires(post): plymouth-scripts
BuildArch: noarch
%description -n plymouth-theme-steamos
This package provides the official SteamOS 3 plymouth theme.
# Disable debug packages
%define debug_package %{nil}
%prep
%autosetup -p1 -n %{name}-%{version}
%build
%install
mkdir -pv %{buildroot}%{_bindir} \
%{buildroot}%{_datadir} \
%{buildroot}%{_prefix}/lib/hwsupport/ \
%{buildroot}%{_unitdir} \
%{buildroot}%{_prefix}/lib/jupiter-dock-updater/
cp -av usr/share/* %{buildroot}/%{_datadir}/
cp -av usr/lib/systemd/system/jupiter-* %{buildroot}%{_unitdir}/
cp -av usr/lib/hwsupport/* %{buildroot}/%{_prefix}/lib/hwsupport/
cp -av usr/lib/udev %{buildroot}/%{_prefix}/lib/udev
cp -av usr/bin/* %{buildroot}/%{_bindir}/
rm -fv %{buildroot}/%{_datadir}/steamos/steamos.png
cp -av %{buildroot}/%{_datadir}/plymouth/themes/steamos/steamos-jupiter.png %{buildroot}/%{_datadir}/steamos/steamos.png
sed -i 's@steamos-cursor@usr/share/steamos/steamos-cursor@g' usr/share/steamos/steamos-cursor-config
xcursorgen usr/share/steamos/steamos-cursor-config %{buildroot}%{_datadir}/icons/steam/cursors/default
rm -rv %{buildroot}/%{_datadir}/jupiter_bios_updater/driver
%pre
%systemd_pre jupiter-biosupdate.service jupiter-controller-update.service
%post
%systemd_post jupiter-biosupdate.service jupiter-controller-update.service
%preun
%systemd_preun jupiter-biosupdate.service jupiter-controller-update.service
%postun
%systemd_postun_with_restart jupiter-biosupdate.service jupiter-controller-update.service
%post -n plymouth-theme-steamos
if [ "$1" = 1 ]; then
set -x
export LIB=%{_libdir}
OTHEME="$(%{_sbindir}/plymouth-set-default-theme)"
if [ "$OTHEME" = "text" ]; then
if [ ! -e /.buildenv ]; then
%{_sbindir}/plymouth-set-default-theme -R steamos
else
%{_sbindir}/plymouth-set-default-theme steamos
fi
fi
fi
%postun -n plymouth-theme-steamos
if [ "$1" = 0 ]; then
export LIB=%{_libdir}
if [ "$(%{_sbindir}/plymouth-set-default-theme)" = "steamos" ]; then
%{_sbindir}/plymouth-set-default-theme -R --reset
fi
fi
%files
%{_bindir}/amd_system_info
%{_bindir}/foxnet-biosupdate
%{_bindir}/jupiter-biosupdate
%{_bindir}/jupiter-check-support
%{_bindir}/jupiter-controller-update
%{_bindir}/jupiter-initial-firmware-update
%{_bindir}/thumbstick_cal
%{_bindir}/thumbstick_fine_cal
%{_bindir}/trigger_cal
%{_bindir}/steamos-polkit-helpers/jupiter-amp-control
%{_bindir}/steamos-polkit-helpers/jupiter-biosupdate
%{_bindir}/steamos-polkit-helpers/jupiter-check-support
%{_bindir}/steamos-polkit-helpers/jupiter-dock-updater
%{_bindir}/steamos-polkit-helpers/jupiter-fan-control
%{_bindir}/steamos-polkit-helpers/jupiter-get-als-gain
%{_unitdir}/jupiter-biosupdate.service
%{_unitdir}/jupiter-controller-update.service
%{_datadir}/jupiter_bios
%{_datadir}/jupiter_bios_updater
%{_datadir}/jupiter_controller_fw_updater
%files -n gamescope-session-common
%dir %{_bindir}/steamos-polkit-helpers
%{_bindir}/steamos-polkit-helpers/steamos-devkit-mode
%{_bindir}/steamos-polkit-helpers/steamos-disable-wireless-power-management
%{_bindir}/steamos-polkit-helpers/steamos-enable-sshd
%{_bindir}/steamos-polkit-helpers/steamos-factory-reset-config
%{_bindir}/steamos-polkit-helpers/steamos-format-device
%{_bindir}/steamos-polkit-helpers/steamos-format-sdcard
%{_bindir}/steamos-polkit-helpers/steamos-trim-devices
%{_bindir}/steamos-polkit-helpers/steamos-poweroff-now
%{_bindir}/steamos-polkit-helpers/steamos-priv-write
%{_bindir}/steamos-polkit-helpers/steamos-reboot-now
%{_bindir}/steamos-polkit-helpers/steamos-reboot-other
%{_bindir}/steamos-polkit-helpers/steamos-restart-sddm
%{_bindir}/steamos-polkit-helpers/steamos-select-branch
%{_bindir}/steamos-polkit-helpers/steamos-set-hostname
%{_bindir}/steamos-polkit-helpers/steamos-set-timezone
%{_bindir}/steamos-polkit-helpers/steamos-update
%dir %{_prefix}/lib/hwsupport
%{_prefix}/lib/hwsupport/block-device-event.sh
%{_prefix}/lib/hwsupport/common-functions
%{_prefix}/lib/hwsupport/format-device.sh
%{_prefix}/lib/hwsupport/format-sdcard.sh
%{_prefix}/lib/hwsupport/sdcard-rescan.sh
%{_prefix}/lib/hwsupport/steamos-automount.sh
%{_prefix}/lib/hwsupport/trim-devices.sh
%{_prefix}/lib/udev/rules.d/80-gpu-reset.rules
%{_prefix}/lib/udev/rules.d/80-rtl-wobt.rules
%{_prefix}/lib/udev/rules.d/99-sdcard-rescan.rules
%{_prefix}/lib/udev/rules.d/99-steamos-automount.rules
%{_datadir}/icons/steam
%{_datadir}/steamos
%dir %{_datadir}/polkit-1/rules.d
%{_datadir}/polkit-1/rules.d/*
%{_datadir}/polkit-1/actions/*
%files -n plymouth-theme-steamos
%{_datadir}/plymouth
%changelog