Name: chessx Version: 1.5.6 Release: 1%{?dist} Summary: Chess Database and PGN viewer # Various parts of code are annotated with different licenses: # - GNU General Public License (dep/scid/code/src/*) # - GNU General Public License v2.0 or later (src/*) # - GNU General Public License, Version 2 (COPYING and License.txt) # - GNU General Public License, Version 3 (src/gui/messagedialog.cpp) # - GNU Lesser General Public License, Version 2.1 (src/gui/qled.*) # - Expat License (dep/scid/code/src/bytebuf.h) # - BSD 3-clause "New" or "Revised" License (src/database/downloadmanager.*) # - LGPL (v2.1 or v3) (src/gui/textedit.*) # In the License field below only the minimal effective license set is # documented. License: GPLv2 and GPLv3 URL: https://sourceforge.net/projects/chessx/ %if !0%{?os2_version} Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz %else %scm_source github http://github.com/Tellie/chessx-os2 master-os2 %endif %if !0%{?os2_version} # https://github.com/Isarhamster/chessx/commit/975db069e4e6834a52cc75fbb402ca3c2c87f200 Patch001: 001-qmake-install-support-for-linux-bsd.patch # https://github.com/Isarhamster/chessx/commit/c26ab900b525c5bce794734b2852bc445c2753d7 Patch002: 002-add-metainfo-file.patch # https://github.com/Isarhamster/chessx/pull/61 Patch003: 003-fix-icons-installation.patch # (downstream patch) Patch004: 004-wayland-workaround.patch # https://github.com/Isarhamster/chessx/pull/63 Patch005: 005-use-pkg-config.patch %endif # Requires Qt >= 5.7 as per INSTALL %global min_qt_version 5.7.0 BuildRequires: gcc-c++ BuildRequires: qt5-qtbase-devel >= %{min_qt_version} BuildRequires: qt5-linguist >= %{min_qt_version} BuildRequires: pkgconfig(Qt5Svg) >= %{min_qt_version} BuildRequires: pkgconfig(Qt5Multimedia) >= %{min_qt_version} BuildRequires: pkgconfig(zlib) %if !0%{?os2_version} BuildRequires: pkgconfig(quazip1-qt5) BuildRequires: desktop-file-utils BuildRequires: libappstream-glib %endif # Bundles part of scid 1.0 (https://sourceforge.net/projects/scid/) Provides: bundled(scid) = 1.0 %description ChessX is a free and open source chess database application for Linux, Mac OS X and Windows. %prep %if !0%{?os2_version} %autosetup -p1 -n %{name}-%{version} %else %scm_setup %endif # Ensure bundled quazip code is not used %if !0%{?os2_version} rm -rf src/quazip %endif %build export QMAKE_SH=$SHELL export FAST_BUILD=1 LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" %qmake_qt5 -r CONFIG+=link_pkgconfig %if !0%{?os2_version} %make_build %else make %{?_smp_mflags} %endif %install %make_install INSTALL_ROOT=%{buildroot} mkdir -p %{buildroot}%{_bindir} install -m0755 release/chessx.exe %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/%{name} cp -r data/* %{buildroot}%{_datadir}/%{name}/ cp i18n/*.qm %{buildroot}%{_datadir}/%{name}/lang/ mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps cp data/images/%{name}.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png %check # Make sure the .metainfo.xml file passes validation %if !0%{?os2_version} appstream-util validate-relax --nonet \ %{buildroot}%{_metainfodir}/io.sourceforge.ChessX.metainfo.xml %endif %files %license COPYING Changelog %if !0%{?os2_version} %{_bindir}/chessx %{_datadir}/applications/chessx.desktop %else %{_bindir}/chessx.exe %{_datadir}/%{name} %{_datadir}/icons/hicolor/128x128/apps/chessx.png %{_datadir}/icons/hicolor/*/apps/%{name}.* %endif %if !0%{?os2_version} %{_metainfodir}/io.sourceforge.ChessX.metainfo.xml %endif %changelog * Sun Oct 17 2021 Elbert Pol - 1.5.6-1 - First rpm for OS2