File qpdfview-bzr.spec of Package qpdfview-bzr

#
# spec file for package qpdfview-bzr
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

%define         name_base qpdfview

Name:           %{name_base}-bzr
Version:        0
Release:        0
Summary:        Tabbed document viewer in Qt
License:        GPL-2.0+
Group:          Productivity/Office/Other
Url:            https://launchpad.net/qpdfview
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cups-devel
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(ddjvuapi)
BuildRequires:  pkgconfig(libspectre)
BuildRequires:  pkgconfig(zlib)
Recommends:     %{name}-lang = %{version}
%if 0%{?suse_version} > 1500
BuildRequires:  qt6-tools-linguist
BuildRequires:  qt6-base-devel
BuildRequires:  qt6-base-private-devel
BuildRequires:  qt6-svg-devel
BuildRequires:  pkgconfig(poppler-qt6)
Requires:       qt6-sql-sqlite
%else
BuildRequires:  libqt5-linguist
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(poppler-qt5)
Requires:       libqt5_sql_backend
%endif

%description
qpdfview uses Poppler for PDF support, libspectre for PS support,
DjVuLibre for DjVu support, CUPS for printing support and the Qt
toolkit for its interface.

Current features include:
* Outline, properties and thumbnail panes
* Scale, rotate and fit
* Fullscreen and presentation views
* Continuous and multiple-page layouts
* Search for text
* Configurable tool bars
* Configurable keyboard shortcuts
* Persistent per-file settings
* SyncTeX support
* Rudimentary annotation support
* Rudimentary form support
* Support for PostScript and DjVu documents

%lang_package

%prep
tar xmf %{_sourcedir}/%{name}-%{version}.tar.xz
%setup -q -T -D

%build
%if 0%{?suse_version} > 1500
%{_qt6_bindir}/lrelease translations/*.ts
%qmake6 PLUGIN_INSTALL_PATH=%{_libdir}/%{name_base} %{name_base}.pro
%else
%{_libqt5_bindir}/lrelease translations/*.ts
%qmake5 PLUGIN_INSTALL_PATH=%{_libdir}/%{name_base} %{name_base}.pro
%endif
make %{?_smp_mflags}

%install
%if 0%{?suse_version} > 1500
%qmake6_install
%else
%qmake5_install
%endif
%fdupes %{buildroot}
%find_lang %{name_base} --with-qt

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc CHANGES CONTRIBUTORS COPYING README TODO
%{_bindir}/%{name_base}
%dir %{_libdir}/%{name_base}/
%{_libdir}/%{name_base}/lib%{name_base}_*.so
%dir %{_datadir}/%{name_base}/
%dir %{_datadir}/metainfo/
%{_datadir}/metainfo/%{name_base}.appdata.xml
%{_datadir}/applications/%{name_base}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name_base}.*
%{_mandir}/man?/%{name_base}.?%{?ext_man}

%files lang -f %{name_base}.lang
%defattr(-,root,root)
%lang(ast) %{_datadir}/%{name_base}/%{name_base}_ast.qm
%lang(ber) %{_datadir}/%{name_base}/%{name_base}_ber.qm
%lang(nds) %{_datadir}/%{name_base}/%{name_base}_nds.qm
%lang(rue) %{_datadir}/%{name_base}/%{name_base}_rue.qm
%lang(zgh) %{_datadir}/%{name_base}/%{name_base}_zgh.qm
%doc %{_datadir}/%{name_base}/help*.html

%changelog
openSUSE Build Service is sponsored by