File texmaker.spec of Package texmaker

# spec file for package texmaker
# Copyright (c) 2016 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

Name:           texmaker
Version:        4.5
Release:        0
Summary:        Free cross-platform LaTeX editor
License:        GPL-2.0 and BSD-3-Clause
Group:          Productivity/Publishing/TeX/Frontends
# PATCH-FIX-UPSTREAM texmaker-correct-doc-location.patch -- Handle doc files in the spec file rather than placing them in %%{_datadir} during compilation
Patch1:         texmaker-correct-doc-location.patch
# PATCH-FIX-UPSTREAM texmaker-appdata.patch -- Install appstream metainfo file; patch sent upstream
Patch2:         texmaker-appdata.patch
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
%if 0%{?suse_version} == 1315
BuildRequires:  libQtWebKit-devel
BuildRequires:  libpoppler-qt4-devel >= 0.16
BuildRequires:  libqt4-devel >= 4.6.1
Requires:       libQtWebKit4 >= 4.6.1
BuildRequires:  libpoppler-qt5-devel
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Script)
BuildRequires:  pkgconfig(Qt5WebKit)
BuildRequires:  pkgconfig(Qt5WebKitWidgets)
BuildRequires:  pkgconfig(Qt5Xml)
Requires:       hunspell
Requires:       texlive-latex
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Texmaker is a free LaTeX editor, that integrates many tools
needed to develop documents with LaTeX, in just one application.
Texmaker runs on unix, macosx and windows systems and is released
under the GPL license .

%setup -q
%patch1 -p1
%patch2 -p1

%if 0%{?suse_version} == 1315


%if 0%{?suse_version} == 1315
qmake QMAKE_CXXFLAGS="%optflags -fvisibility=hidden -fvisibility-inlines-hidden" \
      METAINFODIR="%{_datadir}/appdata" -unix
qmake-qt5 QMAKE_CXXFLAGS="%optflags -fvisibility=hidden -fvisibility-inlines-hidden" \
          METAINFODIR="%{_datadir}/appdata" -unix
make %{?_smp_mflags}

make INSTALL_ROOT=%{buildroot} install
%fdupes %{buildroot}%{_datadir}/%{name}/

%doc utilities/AUTHORS utilities/COPYING utilities/CHANGELOG.txt
%dir %{_datadir}/appdata