source: spec/trunk/SPECS/chessx.spec@ 1808

Last change on this file since 1808 was 1787, checked in by tellie, 4 years ago

spec: chessx: Release version 1.5.6-1.

File size: 3.6 KB
Line 
1Name: chessx
2Version: 1.5.6
3Release: 1%{?dist}
4Summary: 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.
17License: GPLv2 and GPLv3
18URL: https://sourceforge.net/projects/chessx/
19%if !0%{?os2_version}
20Source0: 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
27Patch001: 001-qmake-install-support-for-linux-bsd.patch
28# https://github.com/Isarhamster/chessx/commit/c26ab900b525c5bce794734b2852bc445c2753d7
29Patch002: 002-add-metainfo-file.patch
30# https://github.com/Isarhamster/chessx/pull/61
31Patch003: 003-fix-icons-installation.patch
32# (downstream patch)
33Patch004: 004-wayland-workaround.patch
34# https://github.com/Isarhamster/chessx/pull/63
35Patch005: 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
41BuildRequires: gcc-c++
42BuildRequires: qt5-qtbase-devel >= %{min_qt_version}
43BuildRequires: qt5-linguist >= %{min_qt_version}
44BuildRequires: pkgconfig(Qt5Svg) >= %{min_qt_version}
45BuildRequires: pkgconfig(Qt5Multimedia) >= %{min_qt_version}
46BuildRequires: pkgconfig(zlib)
47%if !0%{?os2_version}
48BuildRequires: pkgconfig(quazip1-qt5)
49BuildRequires: desktop-file-utils
50BuildRequires: libappstream-glib
51%endif
52
53# Bundles part of scid 1.0 (https://sourceforge.net/projects/scid/)
54Provides: bundled(scid) = 1.0
55
56%description
57ChessX is a free and open source chess database application for Linux, Mac OS X
58and 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}
70rm -rf src/quazip
71%endif
72
73%build
74export QMAKE_SH=$SHELL
75export FAST_BUILD=1
76LDFLAGS="-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
82make %{?_smp_mflags}
83%endif
84
85%install
86%make_install INSTALL_ROOT=%{buildroot}
87mkdir -p %{buildroot}%{_bindir}
88install -m0755 release/chessx.exe %{buildroot}%{_bindir}
89mkdir -p %{buildroot}%{_datadir}/%{name}
90cp -r data/* %{buildroot}%{_datadir}/%{name}/
91cp i18n/*.qm %{buildroot}%{_datadir}/%{name}/lang/
92
93mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
94cp 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}
99appstream-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
Note: See TracBrowser for help on using the repository browser.