File steam.spec of Package steam
#
# spec file for package steam
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: steam
Version: 1.0.0.54
Release: 0
Summary: Installer for Valve's digital software distribution service
# "Limited Installation License"
License: SUSE-Freeware
Group: Amusements/Games/Other
Url: http://www.steampowered.com/
Source: http://repo.steampowered.com/steam/pool/steam/s/steam/steam_%{version}.tar.gz
Source1: steamruntime-fix
Source2: steam.appdata.xml
# https://github.com/ValveSoftware/steam-for-linux/issues/3273
Patch0: invoke-libstdc-removal-before-starting-steam.patch
# PATCH-FEATURE-OPENSUSE allow-non-root-controller-access.patch -- Allow non root users to access the steam-controller
Patch1: allow-non-root-controller-access.patch
BuildRequires: hicolor-icon-theme
BuildRequires: shared-mime-info
BuildRequires: update-desktop-files
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: pkgconfig(udev)
# dep_postfix macro is used to append "-32bit" to dependencies for x86_64 on openSUSE
%define dep_postfix %{nil}
%ifarch x86_64
%define dep_postfix -32bit
%endif
Requires: Mesa-libGL1%{dep_postfix}
Requires: alsa%{dep_postfix} >= 1.0.23
Requires: alsa-devel%{dep_postfix} >= 1.0.23
Requires: dbus-1-glib%{dep_postfix}
Requires: gtk2-engine-oxygen%{dep_postfix}
Requires: libSDL-1_2-0%{dep_postfix} >= 1.2.10
Requires: libX11-6%{dep_postfix} >= 1.4.99.1
Requires: libXdmcp6%{dep_postfix}
Requires: libXext6%{dep_postfix}
Requires: libXfixes3%{dep_postfix}
Requires: libXi6%{dep_postfix} >= 1.2.99.4
Requires: libXrandr2%{dep_postfix} >= 1.2.99.3
Requires: libXrender1%{dep_postfix}
Requires: libatk-1_0-0%{dep_postfix}
Requires: libcairo2%{dep_postfix} >= 1.6.0
Requires: libcurl4%{dep_postfix} >= 7.16.2-1
Requires: libdbus-1-3%{dep_postfix} >= 1.2.14
Requires: libfreetype6%{dep_postfix} >= 2.3.9
%if 0%{?suse_version} >= 1315
Requires: libgcrypt20%{dep_postfix} >= 1.6.1
%else
Requires: libgcrypt11%{dep_postfix} >= 1.4.5
%endif
Requires: libgdk_pixbuf-2_0-0%{dep_postfix} >= 2.22.0
Requires: libglib-2_0-0%{dep_postfix} >= 2.14.0
Requires: libgmodule-2_0-0%{dep_postfix}
Requires: libgobject-2_0-0%{dep_postfix}
Requires: libgtk-2_0-0%{dep_postfix} >= 2.24.0
Requires: libnm-glib4%{dep_postfix}
Requires: libnm-util2%{dep_postfix}
Requires: libogg0%{dep_postfix} >= 1.0
Requires: libpango-1_0-0%{dep_postfix} >= 1.22.0
Requires: libpixman-1-0%{dep_postfix} >= 0.24.4
Requires: libpng12-0%{dep_postfix} >= 1.2.13
Requires: libpulse0%{dep_postfix} >= 0.99.1
Requires: libtheora0%{dep_postfix} >= 1.0
Requires: libvorbis0%{dep_postfix} >= 1.1.2
Requires: mozilla-nspr%{dep_postfix} >= 1.8.0.10
Requires: mozilla-nss%{dep_postfix} >= 3.12.3
Requires: cups-libs%{dep_postfix} >= 1.4.0
Requires: fontconfig%{dep_postfix} >= 2.8.0
Requires: glibc%{dep_postfix} >= 2.15
Requires: openal-soft >= 1.13
Requires: zlib%{dep_postfix} >= 1.2.3.3
Requires: libgcc_s1%{dep_postfix} >= 4.1.1
Requires: libopenal1%{dep_postfix} >= 1.13
Requires: libstdc++6%{dep_postfix} >= 4.6
# our own builds of libcrypto.so.1 and libssl.so.1.
Requires: libopenssl1_0_0-steam
%ifarch x86_64
Requires: libopenssl1_0_0-steam-32bit
%endif
# from steamdeps.txt which uses Debian package syntax
Requires: curl
Requires: xz
Requires: zenity
Requires: libxcb-dri2-0%{dep_postfix}
Requires: libxcb-glx0%{dep_postfix}
%description
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 controller
Summary: Steam Controller
Group: Hardware/Joystick
Requires: steam = %{version}
%description controller
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.
%package vr
Summary: Steam VR
Group: Hardware/Joystick
Requires: steam = %{version}
%description vr
A full-featured, 360° room-scale virtual reality experience.
%prep
%setup -q -n steam
%patch0 -p1
%patch1 -p1
%build
%install
make DESTDIR=%{buildroot} install-bin install-docs install-icons install-bootstrap install-desktop
# TODO: Patch it so it works with zypper or at least does not invoke apt-get.
rm %{buildroot}%{_bindir}/steamdeps
mkdir -p %{buildroot}%{_udevrulesdir}
cp lib/udev/rules.d/* %{buildroot}%{_udevrulesdir}
cp %{SOURCE1} %{buildroot}%{_bindir}
chmod +x %{buildroot}%{_bindir}/steamruntime-fix
%suse_update_desktop_file -n -r steam Game Amusement
dos2unix %{buildroot}%{_datadir}/doc/steam/steam_install_agreement.txt
# https://en.opensuse.org/openSUSE:AppStore
install -Dm0644 %{SOURCE2} %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
%fdupes %{buildroot}%{_prefix}
%post
%desktop_database_post
%icon_theme_cache_post
%mime_database_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%mime_database_postun
%post controller
%{?udev_rules_update:%udev_rules_update}
%postun controller
%{?udev_rules_update:%udev_rules_update}
%post vr
%{?udev_rules_update:%udev_rules_update}
%postun vr
%{?udev_rules_update:%udev_rules_update}
%files
%defattr(-,root,root)
%{_bindir}/steam
%{_bindir}/steamruntime-fix
%dir %{_prefix}/lib/steam
%{_prefix}/lib/steam/bootstraplinux_ubuntu12_32.tar.xz
%{_datadir}/pixmaps/steam_tray_mono.png
%{_datadir}/pixmaps/steam.png
%{_datadir}/applications/steam.desktop
%{_datadir}/icons/hicolor/*/apps/steam.png
%dir %{_datadir}/doc/steam
%doc %{_datadir}/doc/steam/steam_install_agreement.txt
%doc %{_datadir}/doc/steam/README
%doc debian/changelog
%{_mandir}/man6/steam.6.gz
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%files controller
%{_udevrulesdir}/99-steam-controller-perms.rules
%files vr
%{_udevrulesdir}/60-HTC-Vive-perms.rules
%changelog