@ -1,28 +1,39 @@
%global owner goldendict
%global commit eaa8e8f270bee84fbb1f73702d0b65c3f9f89efa
%global commit 04d9dc43f67b102c7727228326c05eb82d87e4f2
Name: goldendict
Version: 1.5
Release: 0.16 .RC2%{?dist}
Release: 0.17 .RC2%{?dist}
Summary: A feature-rich dictionary lookup program
Group: Applications/System
License: GPLv3+
URL: http://goldendict.org
Source0: https://github.com/%{owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
Patch0: goldendict-system-qtsingleapp.patch
BuildRequires: qt-devel
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: cmake(Qt5XmlPatterns)
BuildRequires: cmake(Qt5Multimedia)
BuildRequires: cmake(Qt5X11Extras)
BuildRequires: cmake(Qt5Network)
BuildRequires: cmake(Qt5WebKit)
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5DBus)
BuildRequires: cmake(Qt5Help)
BuildRequires: cmake(Qt5Gui)
BuildRequires: cmake(Qt5Svg)
BuildRequires: cmake(Qt5Xml)
BuildRequires: libXtst-devel
BuildRequires: hunspell-devel
BuildRequires: libvorbis-devel
BuildRequires: desktop-file-utils
BuildRequires: phonon-devel
BuildRequires: qt-webkit-devel
BuildRequires: bzip2-devel
BuildRequires: lzo-devel
BuildRequires: libtiff-devel
BuildRequires: eb-devel
BuildRequires: qtsingleapplication-devel
BuildRequires: qtsingleapplication-qt5-devel
BuildRequires: libappstream-glib
%description
Goldendict is a feature-rich dictionary lookup program.
@ -40,17 +51,17 @@ BuildArch: noarch
Contain doc files of %{name}.
%prep
%setup -q -n %{name}-%{commit}
%patch0 -p0
%autosetup -n %{name}-%{commit} -p1
rm -r qtsingleapplication
sed -e '/qtsingleapplication.pri/d' -i %{name}.pro
%build
%qmake_qt4 PREFIX=%{_prefix} DISABLE_INTERNAL_PLAYER=1
make %{?_smp_mflags}
%qmake_qt5 PREFIX=%{_prefix} CONFIG+=qtsingleapplication CONFIG+=no_ffmpeg_player
%make_build
%install
make install INSTALL_ROOT=%{buildroot} INSTALL="install -p"
rm -rf %{buildroot}/ %{_datadir}/app-install
%make_install INSTALL_ROOT=%{buildroot}
rm -rf %{buildroot}%{_datadir}/app-install
desktop-file-install %{buildroot}%{_datadir}/applications/%{name}.desktop
# Register as an application to be visible in the software center
@ -60,8 +71,8 @@ desktop-file-install %{buildroot}%{_datadir}/applications/%{name}.desktop
#
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
#
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
cat > $RPM_BUILD_ROOT%{_datadir}/appdata /%{name}.appdata.xml <<EOF
mkdir -p %{buildroot}%{_datadir}/metainfo
cat > %{buildroot}%{_datadir}/metainfo /%{name}.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
<!--
@ -90,21 +101,27 @@ SentUpstream: 2014-09-18
</application>
EOF
%check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
%files
%doc LICENSE.txt
%dir %{_datadir}/goldendict/
%dir %{_datadir}/goldendict/locale/
%{_bindir}/goldendict
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/goldendict.desktop
%{_datadir}/pixmaps/goldendict.png
%{_datadir}/goldendict/locale/*.qm
%license LICENSE.txt
%doc README.md
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/metainfo/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%files docs
%dir %{_datadir}/goldendict/help
%{_datadir}/goldendict/help/*
%{_datadir}/%{name}/help
%changelog
* Mon Sep 24 2018 Vitaly Zaitsev <vitaly@easycoding.org> - 1.5-0.17.RC2
- Switched to Qt5 to fix major issues with HiDPI displays.
- Moved to latest snapshot to resolve issues with latest GCC compiler versions.
- Major SPEC cleanup.
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-0.16.RC2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild