# Copyright (c) 2019 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 https://bugs.opensuse.org/ Name: hearts Version: 1.8.10 Release: 1%{?dist} Summary: The card game License: MIT Group: Amusements/Games/Board/Card URL: https://github.com/Rescator7/Hearts %if !0%{?os2_version} Source: %{name}-%{version}.tar.xz https://github.com/Rescator7/Hearts %else %scm_source github http://github.com/TeLLie/%{name}-os2 %{version}-os2 %endif # URL: http://www.iconarchive.com/show/flatwoken-icons-by-alecive/Apps-Game-Cards-icon.html # License: CC-BY-SA-4.0 Source1: %{name}.svg %if !0%{?os2_version} Patch1: install.patch %endif BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Widgets) %if !0%{?os2_version} BuildRequires: pkgconfig(allegro-5) BuildRequires: pkgconfig(allegro_acodec-5) BuildRequires: pkgconfig(allegro_audio-5) BuildRequires: pkgconfig(allegro_memfile-5) %if 0%{?suse_version} > 1500 BuildRequires: rsvg-convert %else BuildRequires: rsvg-view %endif %endif %if !0%{?os2_version} Requires: libQt5Svg5 %else Requires: qt5-qtsvg %endif %description The overall objective is to be the player with the fewest points by the end of the game. The card game Hearts for QT 5.x and liballegro 5 (for sounds support) %prep %if !0%{?os2_version} %setup -q cat > ./data/%{name}.desktop <<-EOF %patch1 -p1 %else %scm_setup mkdir -p data %endif %if !0%{?os2_version} [Desktop Entry] Name=Hearts Name[fr]=La Dame de Pique Name[ru]= GenericName=Card Game Hearts GenericName[fr]=La Dame de Pique GenericName[ru]= Exec=%{name} Icon=%{name} Type=Application Categories=Game;CardGame; %endif cp %{SOURCE1} ./data/ %if !0%{?os2_version} rsvg-convert -h 48 -w 48 ./data/%{name}.svg -o ./data/%{name}.png %endif %build %if !0%{?os2_version} %qmake5 %make_jobs %else export QMAKE_SH=$SHELL export FAST_BUILD=1 LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" qmake-qt5 "CONFIG+=release" PREFIX=%{_prefix} make %{?_smp_mflags} %endif %clean rm -rf %{buildroot} %install %if !0%{?os2_version} %qmake5_install %else %make_install INSTALL_ROOT=%{buildroot} mkdir -p %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_datadir}/pixmaps cp -p %{name}.exe %{buildroot}%{_bindir}/ install -p -m 644 data/hearts.svg %{buildroot}%{_datadir}/pixmaps/ %endif %files %defattr(-,root,root,-) %doc Changelog README.md #/@unixroot/usr/bin %if !0%{?os2_version} %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %else %{_bindir}/%{name}.exe %{_datadir}/pixmaps/%{name}.svg %license LICENSE %endif %changelog * Sat Apr 23 2022 Elbert Pol - 1.8.10 -1 - Updated to latest version - Add source to own github - Change some files to make it build for OS2 * Tue Jan 26 2021 Elbert Pol - 1.8.7 - 1 - Updated to latest version * Mon Jan 18 2021 Elbert Pol - 1.8.4 - 1 - Updated to latest version * Fri Jan 15 2021 Elbert Pol - 1.8.3 - 1 - Update to latest version * Wed Jan 13 2021 Elbert Pol - 1.8.1 - 2 - add the right requires name for SVG qt5 * Mon Jan 11 2021 Elbert Pol - 1.8.1 - 1 - first rpm for OS2