File steam.spec of Package steam

# spec file for package steam
# Copyright (c) 2021 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

%define dependency() \
%ifarch %{ix86} \
Requires: %{1} \
%else \
Requires: %{1}-32bit \
%endif \
%define booldependency() \
%ifarch x86_64 \
Requires: (%{1}-32bit if %{1}) \
%endif \
Name:           steam
Release:        0
Summary:        Installer for Valve's digital software distribution service
# "Limited Installation License"
License:        SUSE-Freeware
Group:          Amusements/Games/Other
Source2:        %{name}-streaming.xml
Source3:        51-these-are-not-joysticks-rm.rules
# Based on
Patch0:         steam-invoke_steamtricks.patch
# PATCH-FIX-OPENSUSE steam-path-fix.patch bnc#1025841
Patch1:         steam-path-fix.patch
Patch4:         gpu-offload.patch
BuildRequires:  fdupes
BuildRequires:  firewall-macros
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
# from steamdeps.txt which uses Debian package syntax
Requires:       curl
# our own builds of and
Requires:       libopenssl1_0_0-steam
# for Steam Hardware Survey
Requires:       lsb-release
#Proton Requirements
Requires:       python3
Requires:       xz
Requires:       zenity
Requires:       openal-soft
Recommends:     bubblewrap
# replaces steamruntime-fix and is required for steam to boot
Recommends:     steamtricks
ExclusiveArch:  %{ix86} x86_64
%booldependency  Mesa-libGL1
%booldependency  libvulkan_intel
%booldependency  libvulkan_radeon
%dependency  libvulkan1
%dependency  dbus-1-glib
%dependency  gtk2-engine-oxygen
%dependency  libSDL-1_2-0
%dependency  libX11-6
%dependency  libXdmcp6
%dependency  libXext6
%dependency  libXfixes3
%dependency  libXi6
%dependency  libXrandr2
%dependency  libXrender1
%dependency  libatk-1_0-0
%dependency  libcairo2
%dependency  libcurl4
%dependency  libdbus-1-3
%dependency  libfreetype6
%dependency  libgcrypt20
%dependency  libgdk_pixbuf-2_0-0
%dependency  libglib-2_0-0
%dependency  libgmodule-2_0-0
%dependency  libgobject-2_0-0
%dependency  libgtk-2_0-0
%dependency  libogg0
%dependency  libpango-1_0-0
%dependency  libpixman-1-0
%dependency  libpng12-0
%dependency  libpulse0
%dependency  libtheora0
%dependency  libvorbis0
%dependency  mozilla-nspr
%dependency  mozilla-nss
%dependency  libcups2
%dependency  fontconfig
%dependency  glibc
%dependency  libz1
%dependency  libgcc_s1
%dependency  libopenal1
%dependency  libstdc++6
%dependency  glibc-locale-base
%dependency  libudev1
%dependency  libxcb-dri2-0
%dependency  libxcb-glx0
%dependency  libdrm2
%dependency  libXtst6
%dependency  libpipewire-0_3-0
%dependency  libva2
%dependency  libva-drm2
%dependency  libva-x11-2
%dependency  libvdpau1
%dependency  libICE6
%dependency  libSM6
%dependency  libusb-1_0-0
%ifarch x86_64
Requires:       libopenssl1_0_0-steam-32bit

Steam is a software distribution service with an online store, automated
installation, automatic updates, achievements, SteamCloud synchronized
savegame and screenshot functionality, and many social features.

This package will fetch and install the Steam bootstrap. Start Steam to
complete the installation of the client for the current user.

%package        devices
Summary:        Device support for Steam-related hardware
License:        MIT
Group:          Hardware/Joystick
Requires:       steam = %{version}
Supplements:    steam = %{version}
Obsoletes:      steam-controller < %{version}
Obsoletes:      steam-vr < %{version}
Provides:       steam-controller = %{version}
Provides:       steam-vr = %{version}
%if 0%{?suse_version} >= 1330
Requires(pre):  group(games)
Requires(pre):  user(games)

%description devices
The Steam Controller features dual trackpads, HD haptic feedback, dual-stage
triggers, back grip buttons, and fully-customizable control schemes.
Make sure that all users, which should have access to the steam-controller,
are in the "games" group. Steam VR is a full-featured, 360° room-scale
virtual reality experience.

%setup -q -n steam-launcher
%patch0 -p1
%patch1 -p1
%if 0%{?suse_version} < 1550
%patch4 -p1


make DESTDIR=%{buildroot} install-bin install-docs install-icons install-bootstrap install-desktop install-appdata

mkdir -p %{buildroot}%{_udevrulesdir}
install -Dm0644 subprojects/steam-devices/60-steam-input.rules %{buildroot}%{_udevrulesdir}/60-steam-input.rules
install -Dm0644 subprojects/steam-devices/60-steam-vr.rules %{buildroot}%{_udevrulesdir}/60-steam-vr.rules
install -Dm0644 %{SOURCE3} %{buildroot}%{_udevrulesdir}/51-these-are-not-joysticks-rm.rules
%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300
install -Dm0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/firewalld/services/steam-streaming.xml

%fdupes -s %{buildroot}

%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300

%dir %{_datadir}/doc/%{name}
%doc %{_datadir}/doc/%{name}/steam_subscriber_agreement.txt
%doc %{_datadir}/doc/%{name}/README
%doc debian/changelog
%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300
%dir %{_prefix}/lib/firewalld
%dir %{_prefix}/lib/firewalld/services

%files devices
%license subprojects/steam-devices/LICENSE

openSUSE Build Service is sponsored by