File goPage.spec of Package goPage

#
# spec file for package goPage
#
# Copyright (c) 2018 ZAN DoYe
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://github.com/kandu/goPage/issues
#

Name:           goPage
Version:        0.5.0
Release:        0
Summary:        rmp manager
License:        LGPL-2.1
Group:          Productivity/Other
URL:            https://github.com/kandu/goPage
Source:         gopage_0.5.0.orig.tar.gz

%if 0%{?fedora_version} >= 27 || 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700

BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-linguist
BuildRequires:  gdb

%if 0%{?rhel_version} >= 700
BuildRequires:  gcc-c++
%endif

Requires:       qt5

%else

BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-linguist
BuildRequires:  gdb

Requires:       libqt5-x11
%endif

%if %{undefined centos_version} && %{undefined rhel_version}
Suggests:       okular
Suggests:       evince
%endif


%description
goPage is a rmp manager. It opens target page when clicking on 引得市 characherters.  It can also import dicts or rmp files.
For more infomation: 引得市 http://www.mebag.com/index/


%if 0%{?fedora_version} >= 27 || 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700
%global debug_package %{nil}
%endif
%prep
%setup -q -n goPage-0.5.0

%build
cd src
qmake-qt5 debug=n PREFIX=/usr SYSCONFDIR=/etc LUPDATE=lupdate-qt5 LRELEASE=lrelease-qt5
make %{?_smp_mflags}

%install
cd src
make INSTALL_ROOT=%{buildroot} install

%files
%defattr(-,root,root)
%dir %{_datadir}/applications
%dir %{_datadir}/icons
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/256x256
%dir %{_datadir}/icons/hicolor/256x256/apps
%doc
%if 0%{?fedora_version} >= 27 || 0%{?centos_version} >= 700 || 0%{?rhel_version} >= 700
%{_prefix}/bin/goPage
%{_sysconfdir}/goPage/reader.cfg
%{_datadir}/applications/goPage.desktop
%{_datadir}/icons/hicolor/256x256/apps/goPage.png
%else
%{_prefix}/bin/goPage
%{_sysconfdir}/goPage/
%{_sysconfdir}/goPage/reader.cfg
%{_datadir}/applications/goPage.desktop
%{_datadir}/icons/hicolor/256x256/apps/goPage.png
%endif

%changelog
openSUSE Build Service is sponsored by