| 1 | Name: uchmviewer
|
|---|
| 2 | Version: 8.2
|
|---|
| 3 | Release: 1%{?dist}
|
|---|
| 4 | Summary: CHM viewer
|
|---|
| 5 |
|
|---|
| 6 | License: GPLv3+
|
|---|
| 7 | URL: http://www.kchmviewer.net/
|
|---|
| 8 | Provides: %{name}-qt = %{version}-%{release}
|
|---|
| 9 | Obsoletes: %{name}-qt < 7.3
|
|---|
| 10 |
|
|---|
| 11 | %if !0%{?os2_version}
|
|---|
| 12 | Source0: https://github.com/gyunaev/%{name}/archive/refs/tags/%{_tag}.tar.gz#/%{name}-%{_tag}.tar.gz
|
|---|
| 13 | %else
|
|---|
| 14 | %scm_source github https://github.com/u-235/uchmviewer master
|
|---|
| 15 | %endif
|
|---|
| 16 |
|
|---|
| 17 | BuildRequires: make
|
|---|
| 18 | BuildRequires: gcc-c++
|
|---|
| 19 | %if !0%{?os2_version}
|
|---|
| 20 | BuildRequires: chmlib-devel
|
|---|
| 21 | BuildRequires: desktop-file-utils
|
|---|
| 22 | %endif
|
|---|
| 23 | BuildRequires: gettext
|
|---|
| 24 | BuildRequires: qt5-qtbase-devel
|
|---|
| 25 | BuildRequires: libzip-devel
|
|---|
| 26 | BuildRequires: qt5-qtwebengine-devel
|
|---|
| 27 | ExclusiveArch: %{qt5_qtwebengine_arches}
|
|---|
| 28 |
|
|---|
| 29 | Requires: %{name}-common = %{version}-%{release}
|
|---|
| 30 |
|
|---|
| 31 | %description
|
|---|
| 32 | uchmViewer is a chm (MS HTML help file format) viewer.
|
|---|
| 33 |
|
|---|
| 34 | This package contains the Qt-only version.
|
|---|
| 35 |
|
|---|
| 36 | %package common
|
|---|
| 37 | Summary: Common data files for uchmViewer
|
|---|
| 38 | BuildArch: noarch
|
|---|
| 39 | %if !0%{?os2_version}
|
|---|
| 40 | Requires: hicolor-icon-theme
|
|---|
| 41 | %endif
|
|---|
| 42 | %description common
|
|---|
| 43 | Common data files for uchmViewer.
|
|---|
| 44 |
|
|---|
| 45 | %prep
|
|---|
| 46 | %if !0%{?os2_version}
|
|---|
| 47 | %autosetup -p1 -n %{name}-%{_tag}
|
|---|
| 48 | %else
|
|---|
| 49 | %scm_setup
|
|---|
| 50 | %endif
|
|---|
| 51 |
|
|---|
| 52 | %build
|
|---|
| 53 | export QMAKE_SH=$SHELL
|
|---|
| 54 | # do a fast qt build, as runmapsym and wmapsym is not needed here
|
|---|
| 55 | export FAST_BUILD=1
|
|---|
| 56 | LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 57 |
|
|---|
| 58 | # make the Qt-only version
|
|---|
| 59 | %qmake_qt5 "USE_WEBENGINE=1"
|
|---|
| 60 | %if !0%{?os2_version}
|
|---|
| 61 | %make_build
|
|---|
| 62 | %else
|
|---|
| 63 | make %{?_smp_mflags}
|
|---|
| 64 | %endif
|
|---|
| 65 |
|
|---|
| 66 | %install
|
|---|
| 67 | # install the Qt-only version
|
|---|
| 68 | mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 69 | cp -p bin/%{name}.exe $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 70 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/
|
|---|
| 71 | %if !0%{?os2_version}
|
|---|
| 72 | desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications packages/%{_appid}.desktop
|
|---|
| 73 | %endif
|
|---|
| 74 | install -Dpm 644 packages/%{name}.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
|
|---|
| 75 |
|
|---|
| 76 | %check
|
|---|
| 77 |
|
|---|
| 78 | %files
|
|---|
| 79 | %if !0%{?os2_version}
|
|---|
| 80 | %{_bindir}/uchmviewer
|
|---|
| 81 | %{_datadir}/applications/%{_appid}.desktop
|
|---|
| 82 | %else
|
|---|
| 83 | %{_bindir}/uchmviewer.exe
|
|---|
| 84 | %endif
|
|---|
| 85 |
|
|---|
| 86 | %files common
|
|---|
| 87 | %doc README.md ChangeLog INSTALL.md AUTHORS.md
|
|---|
| 88 | %license COPYING
|
|---|
| 89 | %{_datadir}/icons/hicolor/*/apps/uchmviewer.*
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 | %changelog
|
|---|
| 93 | * Thu Feb 24 2022 Elbert Pol <elbert.pol@gmail.com> - 8.2-1
|
|---|
| 94 | - Updated source to latest version
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|