File steam-bootstrap.spec of Package steam-bootstrap

#
# spec file for package steam-bootstrap
#
# 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:           steam-bootstrap
Version:        1.0.0.85
Release:        0%{?dist}
Summary:        Steam bootstrap archive downloader
# The downloaded content is proprietary / without explicit license.
# This package itself only ships the helper script and placeholders.
License:        MIT
URL:            https://steamdeck-packages.steamos.cloud/archlinux-mirror/jupiter-main/os/x86_64

Source0:        steam-bootstrap.sh.in
Source1:        COPYING
Source2:        steam-bootstrap.pkg.sha256
Source3:        steam-bootstrap.rpmlintrc

BuildRequires:  gamescope-session-plus
BuildRequires:  curl
BuildRequires:  tar
BuildRequires:  zstd
Requires:       gamescope-session-plus
Requires:       curl
Requires:       tar
Requires:       zstd
ExclusiveArch:  x86_64

%description
This package installs an update script which downloads the Steam
"bootstrap_steam" archive hosted by the Nobora project and
extracts the bootstrap archive into /usr/share/gamescope-session-plus/.

The downloaded files are proprietary and are not shipped as part
of this package.

%prep
cp %{SOURCE0} .
cp %{SOURCE1} .
cp %{SOURCE2} .

%build
sed \
    -e 's,__VERSION__,%version,' \
    -e 's,__RELEASE__,%release,' \
    -e 's,__NAME__,%name,' \
    steam-bootstrap.sh.in > steam-bootstrap.sh

%install
mkdir -p %{buildroot}%{_libexecdir}/%{name}
install -m 0755 steam-bootstrap.sh %{buildroot}%{_libexecdir}/%{name}/steam-bootstrap.sh

mkdir -p %{buildroot}%{_datadir}/gamescope-session-plus
touch %{buildroot}%{_datadir}/gamescope-session-plus/bootstrap_steam.tar.gz

mkdir -p %{buildroot}%{_datadir}/%{name}
mv steam-bootstrap.pkg.sha256 %{buildroot}%{_datadir}/%{name}

mkdir -p %{buildroot}%{_datadir}/%{name}/state
touch %{buildroot}%{_datadir}/%{name}/state/installed-%{name}.sha256
mkdir -p %{buildroot}%{_datadir}/%{name}/update-messages
touch %{buildroot}%{_datadir}/%{name}/update-messages/%name-%version-%release-1

%posttrans
%{_libexecdir}/%{name}/steam-bootstrap.sh --no-fail || :

%files
%license COPYING
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/steam-bootstrap.sh

%dir %{_datadir}/%{name}
%{_datadir}/%{name}/steam-bootstrap.pkg.sha256

%dir %{_datadir}/%{name}/state
%dir %{_datadir}/%{name}/update-messages
%ghost %{_datadir}/%{name}/state/installed-%{name}.sha256
%ghost %{_datadir}/%{name}/update-messages/%name-%version-%release-1
%ghost %{_datadir}/gamescope-session-plus/bootstrap_steam.tar.gz

%changelog
openSUSE Build Service is sponsored by