| 1 | Name: chessx
|
|---|
| 2 | Version: 1.5.6
|
|---|
| 3 | Release: 1%{?dist}
|
|---|
| 4 | Summary: Chess Database and PGN viewer
|
|---|
| 5 |
|
|---|
| 6 | # Various parts of code are annotated with different licenses:
|
|---|
| 7 | # - GNU General Public License (dep/scid/code/src/*)
|
|---|
| 8 | # - GNU General Public License v2.0 or later (src/*)
|
|---|
| 9 | # - GNU General Public License, Version 2 (COPYING and License.txt)
|
|---|
| 10 | # - GNU General Public License, Version 3 (src/gui/messagedialog.cpp)
|
|---|
| 11 | # - GNU Lesser General Public License, Version 2.1 (src/gui/qled.*)
|
|---|
| 12 | # - Expat License (dep/scid/code/src/bytebuf.h)
|
|---|
| 13 | # - BSD 3-clause "New" or "Revised" License (src/database/downloadmanager.*)
|
|---|
| 14 | # - LGPL (v2.1 or v3) (src/gui/textedit.*)
|
|---|
| 15 | # In the License field below only the minimal effective license set is
|
|---|
| 16 | # documented.
|
|---|
| 17 | License: GPLv2 and GPLv3
|
|---|
| 18 | URL: https://sourceforge.net/projects/chessx/
|
|---|
| 19 | %if !0%{?os2_version}
|
|---|
| 20 | Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
|
|---|
| 21 | %else
|
|---|
| 22 | %scm_source github http://github.com/Tellie/chessx-os2 master-os2
|
|---|
| 23 | %endif
|
|---|
| 24 |
|
|---|
| 25 | %if !0%{?os2_version}
|
|---|
| 26 | # https://github.com/Isarhamster/chessx/commit/975db069e4e6834a52cc75fbb402ca3c2c87f200
|
|---|
| 27 | Patch001: 001-qmake-install-support-for-linux-bsd.patch
|
|---|
| 28 | # https://github.com/Isarhamster/chessx/commit/c26ab900b525c5bce794734b2852bc445c2753d7
|
|---|
| 29 | Patch002: 002-add-metainfo-file.patch
|
|---|
| 30 | # https://github.com/Isarhamster/chessx/pull/61
|
|---|
| 31 | Patch003: 003-fix-icons-installation.patch
|
|---|
| 32 | # (downstream patch)
|
|---|
| 33 | Patch004: 004-wayland-workaround.patch
|
|---|
| 34 | # https://github.com/Isarhamster/chessx/pull/63
|
|---|
| 35 | Patch005: 005-use-pkg-config.patch
|
|---|
| 36 | %endif
|
|---|
| 37 |
|
|---|
| 38 | # Requires Qt >= 5.7 as per INSTALL
|
|---|
| 39 | %global min_qt_version 5.7.0
|
|---|
| 40 |
|
|---|
| 41 | BuildRequires: gcc-c++
|
|---|
| 42 | BuildRequires: qt5-qtbase-devel >= %{min_qt_version}
|
|---|
| 43 | BuildRequires: qt5-linguist >= %{min_qt_version}
|
|---|
| 44 | BuildRequires: pkgconfig(Qt5Svg) >= %{min_qt_version}
|
|---|
| 45 | BuildRequires: pkgconfig(Qt5Multimedia) >= %{min_qt_version}
|
|---|
| 46 | BuildRequires: pkgconfig(zlib)
|
|---|
| 47 | %if !0%{?os2_version}
|
|---|
| 48 | BuildRequires: pkgconfig(quazip1-qt5)
|
|---|
| 49 | BuildRequires: desktop-file-utils
|
|---|
| 50 | BuildRequires: libappstream-glib
|
|---|
| 51 | %endif
|
|---|
| 52 |
|
|---|
| 53 | # Bundles part of scid 1.0 (https://sourceforge.net/projects/scid/)
|
|---|
| 54 | Provides: bundled(scid) = 1.0
|
|---|
| 55 |
|
|---|
| 56 | %description
|
|---|
| 57 | ChessX is a free and open source chess database application for Linux, Mac OS X
|
|---|
| 58 | and Windows.
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | %prep
|
|---|
| 62 | %if !0%{?os2_version}
|
|---|
| 63 | %autosetup -p1 -n %{name}-%{version}
|
|---|
| 64 | %else
|
|---|
| 65 | %scm_setup
|
|---|
| 66 | %endif
|
|---|
| 67 |
|
|---|
| 68 | # Ensure bundled quazip code is not used
|
|---|
| 69 | %if !0%{?os2_version}
|
|---|
| 70 | rm -rf src/quazip
|
|---|
| 71 | %endif
|
|---|
| 72 |
|
|---|
| 73 | %build
|
|---|
| 74 | export QMAKE_SH=$SHELL
|
|---|
| 75 | export FAST_BUILD=1
|
|---|
| 76 | LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 77 |
|
|---|
| 78 | %qmake_qt5 -r CONFIG+=link_pkgconfig
|
|---|
| 79 | %if !0%{?os2_version}
|
|---|
| 80 | %make_build
|
|---|
| 81 | %else
|
|---|
| 82 | make %{?_smp_mflags}
|
|---|
| 83 | %endif
|
|---|
| 84 |
|
|---|
| 85 | %install
|
|---|
| 86 | %make_install INSTALL_ROOT=%{buildroot}
|
|---|
| 87 | mkdir -p %{buildroot}%{_bindir}
|
|---|
| 88 | install -m0755 release/chessx.exe %{buildroot}%{_bindir}
|
|---|
| 89 | mkdir -p %{buildroot}%{_datadir}/%{name}
|
|---|
| 90 | cp -r data/* %{buildroot}%{_datadir}/%{name}/
|
|---|
| 91 | cp i18n/*.qm %{buildroot}%{_datadir}/%{name}/lang/
|
|---|
| 92 |
|
|---|
| 93 | mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
|
|---|
| 94 | cp data/images/%{name}.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
|
|---|
| 95 |
|
|---|
| 96 | %check
|
|---|
| 97 | # Make sure the .metainfo.xml file passes validation
|
|---|
| 98 | %if !0%{?os2_version}
|
|---|
| 99 | appstream-util validate-relax --nonet \
|
|---|
| 100 | %{buildroot}%{_metainfodir}/io.sourceforge.ChessX.metainfo.xml
|
|---|
| 101 | %endif
|
|---|
| 102 |
|
|---|
| 103 | %files
|
|---|
| 104 | %license COPYING Changelog
|
|---|
| 105 | %if !0%{?os2_version}
|
|---|
| 106 | %{_bindir}/chessx
|
|---|
| 107 | %{_datadir}/applications/chessx.desktop
|
|---|
| 108 | %else
|
|---|
| 109 | %{_bindir}/chessx.exe
|
|---|
| 110 | %{_datadir}/%{name}
|
|---|
| 111 | %{_datadir}/icons/hicolor/128x128/apps/chessx.png
|
|---|
| 112 | %{_datadir}/icons/hicolor/*/apps/%{name}.*
|
|---|
| 113 | %endif
|
|---|
| 114 | %if !0%{?os2_version}
|
|---|
| 115 | %{_metainfodir}/io.sourceforge.ChessX.metainfo.xml
|
|---|
| 116 | %endif
|
|---|
| 117 |
|
|---|
| 118 | %changelog
|
|---|
| 119 | * Sun Oct 17 2021 Elbert Pol <elbert.pol@gmail.com> - 1.5.6-1
|
|---|
| 120 | - First rpm for OS2
|
|---|
| 121 |
|
|---|