File soltys.spec of Package soltys
#
# spec file for package soltys
#
# Copyright (c) 2022 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: soltys
URL: http://www.scummvm.org/games
Version: 1.0
Release: 0
Summary: Soltys Adventure Game
License: SUSE-Freeware
Group: Amusements/Games/Other
Source0: https://downloads.scummvm.org/frs/extras/Soltys/soltys-en-v1.0.zip
Source1: https://downloads.scummvm.org/frs/extras/Soltys/soltys-pl-v1.0.zip
Source2: https://downloads.scummvm.org/frs/extras/Soltys/soltys-es-v1.0.zip
Source7: %name
Source8: %name.desktop
Source9: %name.png
Source10: info
BuildRequires: fdupes
BuildRequires: unzip
BuildRequires: update-desktop-files
Requires: scummvm
Recommends: xmessage
BuildArch: noarch
%description
Soltys Adventure Game, Copyright (c) 1995, L.K. AVALON
%prep
mkdir -p en es pl
unzip -d en %_sourcedir/%{name}-en-v%{version}.zip
unzip -d es %_sourcedir/%{name}-es-v%{version}.zip
unzip -d pl %_sourcedir/%{name}-pl-v%{version}.zip
%build
%install
mkdir -p %{buildroot}%{_bindir}
install -m 755 %{_sourcedir}/%{name} %{buildroot}/%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}/{en,es,pl}
install -m 644 en/vol.* %{buildroot}%{_datadir}/%{name}/en
install -m 644 es/%{name}-es-v1-0/vol.* %{buildroot}%{_datadir}/%{name}/es
install -m 644 pl/vol.* %{buildroot}%{_datadir}/%{name}/pl
mv en/license.txt license-en.txt
mv es/%{name}-es-v1-0/license.txt license-es.txt
mv es/%{name}-es-v1-0/licencia.txt .
mv pl/license.txt license-pl.txt
install -m 644 $RPM_SOURCE_DIR/info %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}/%{_datadir}/pixmaps/
install -m 644 %{_sourcedir}/%name.png %{buildroot}/%{_datadir}/pixmaps
%suse_update_desktop_file -i %name Game X-SuSE-AdventureGame
%fdupes -s %{buildroot}
%files
%defattr(-,root,root)
%license license-*.txt licencia.txt
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%name.desktop
%{_datadir}/pixmaps/%name.png
%changelog