%global srcname hrl-copr %global app_name the-honkers-railway-launcher %define install_dir %{_libdir}/%{app_name} %define icon_dir %{_datadir}/icons/hicolor/512x512/apps %define apps_dir %{_datadir}/applications %define app_id moe.launcher.%{app_name} %define build_output honkers-railway-launcher Name: the-honkers-railway-launcher Version: 1.5.4.rc3 Release: 1.git.1055.b5c9ec9%{?dist} License: GPLv3 Summary: The Honkers Railway launcher for Linux with automatic patching and telemetry disabling Url: https://github.com/retrozinndev/%{srcname} # Sources can be obtained by # git clone https://github.com/retrozinndev/%{srcname}.git # cd %{srcname} # tito build --tgz Source0: the-honkers-railway-launcher-git-1055.b5c9ec9.tar.gz BuildArch: x86_64 #-- APPLICATION DEPENDENCIES ---------------------------------------------------# Requires: git Requires: libcurl Requires: libadwaita Requires: gtk4 Requires: glibc #-- OPTIONAL DEPENDENCIES ------------------------------------------------------# Suggests: mangohud Suggests: gamescope Suggests: gamemode #-- BUILD DEPENDENCIES ---------------------------------------------------------# BuildRequires: rust BuildRequires: cargo BuildRequires: git BuildRequires: libcurl BuildRequires: libadwaita-devel BuildRequires: gtk4-devel BuildRequires: glibc BuildRequires: glib2 BuildRequires: glib2-devel BuildRequires: p7zip BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cairo-devel BuildRequires: gdk-pixbuf2-devel BuildRequires: pango-devel BuildRequires: rust-gdk4-devel %description The Honkers Railway launcher for Linux with automatic patching and telemetry disabling #-- PREP, BUILD & INSTALL -----------------------------------------------------# %prep %autosetup -n the-honkers-railway-launcher-git-1055.b5c9ec9 -p1 %build cargo build --release %install # copy binary mkdir -p %{buildroot}%{install_dir} cp -f target/release/%{build_output} %{buildroot}%{install_dir} # rename binary mv %{buildroot}%{install_dir}/%{build_output} %{buildroot}%{install_dir}/%{name} # copy icon mkdir -p %{buildroot}%{icon_dir} cp -f assets/images/%{app_id}.png %{buildroot}%{icon_dir} # copy desktop file mkdir -p %{buildroot}%{apps_dir} cp -f assets/%{name}.desktop %{buildroot}%{apps_dir} %post # create link of binary ln -sf %{install_dir}/%{name} %{_bindir}/%{name} # apply exec permision to binary chmod +x %{install_dir}/%{name} #-- FILES ---------------------------------------------------------------------# %files %doc README.md %license LICENSE %{install_dir}/* %{icon_dir}/%{app_id}.png %{apps_dir}/%{name}.desktop #-- CHANGELOG -----------------------------------------------------------------# %changelog