LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File texmaker.spec of Package texmaker (Project home:alarrosa:branches:nowebkit)

#
# 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 http://bugs.opensuse.org/
#


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
Url:            http://www.xm1math.net/texmaker/
Source:         http://www.xm1math.net/texmaker/texmaker-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM texmaker-correct-doc-location.patch badshah400@gmail.com -- 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 badshah400@gmail.com -- 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
%else
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)
%endif
Requires:       hunspell
Requires:       texlive-latex
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
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 .

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

%build
%if 0%{?suse_version} == 1315
QTDIR=%{_libdir}/qt4
%else
QTDIR=%{_libdir}/qt5
%endif

PATH=$QTDIR/bin:$PATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH
export QTDIR PATH LD_LIBRARY_PATH DYLD_LIBRARY_PATH
PREFIX=%{_prefix}

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

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

%files
%defattr(-,root,root,-)
%doc utilities/AUTHORS utilities/COPYING utilities/CHANGELOG.txt
%{_bindir}/texmaker
%{_datadir}/applications/texmaker.desktop
%{_datadir}/pixmaps/texmaker.png
%{_datadir}/texmaker/
%dir %{_datadir}/appdata
%{_datadir}/appdata/%{name}.appdata.xml

%changelog