File qupzilla-qt5.spec of Package qupzilla

# spec file for package qupzilla
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012-2014 Mariusz Fik <>
# 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

%define qt5_build 1

%if !0%{?qt5_build}
Name:           qupzilla
Name:           qupzilla-qt5
Version:        1.6.6
Release:        0
Summary:        A very fast open source browser based on WebKit core
License:        GPL-3.0+
Group:          Productivity/Networking/Web/Browsers
Patch0:         qupzilla-gdb-workaround.patch
BuildRequires:  fdupes
%if !0%{?qt5_build}
BuildRequires:  libkde4-devel
BuildRequires:  pkgconfig(gnome-keyring-1)
BuildRequires:  pkgconfig(hunspell)
%if 0%{?qt5_build}
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Script)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Widgets)
%if 0%{?suse_version} > 1310
BuildRequires:  libQt5Gui-private-headers-devel
BuildRequires:  libqt5-qtbase-private-headers-devel
BuildRequires:  libqt5-qttools-devel
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5WebKitWidgets)
BuildRequires:  pkgconfig(QtCore) >= 4.7
BuildRequires:  pkgconfig(QtGui) >= 4.7
BuildRequires:  pkgconfig(QtNetwork) >= 4.7
BuildRequires:  pkgconfig(QtWebKit)
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(openssl)
%if 0%{?qt5_build}
Conflicts:      qupzilla
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

QupZilla is modern web browser based on WebKit core and Qt Framework.
WebKit guarante fast browsing and Qt availability on all major platforms.

%if !0%{?qt5_build}
%package kwallet
Summary:        Kwallet plugin for qupzilla
Group:          Productivity/Networking/Web/Browsers
Requires:       %{name} = %{version}

%description kwallet
Kwallet plugin for QupZilla browser which allows to store passwords in kwallet.

%package gnome-keyring
Summary:        Gnome keyring plugin for qupzilla
Group:          Productivity/Networking/Web/Browsers
Requires:       %{name} = %{version}

%description gnome-keyring
Gnome keyring plugin for QupZilla browser which allows to store passwords in 
gnome keyring.

%setup -q -n QupZilla-%{version}
%patch0 -p1
# remove BUILDTIME usage from build
sed '/static const QString BUILDTIME/d' -i src/lib/app/qupzilla.h
sed '/QupZilla::BUILDTIME/d' -i src/lib/other/aboutdialog.cpp
sed '/QupZilla::BUILDTIME/d' -i src/lib/app/commandlineoptions.cpp
sed '/QupZilla::BUILDTIME/d' -i src/lib/app/qupzilla.cpp
sed '/QupZilla::BUILDTIME/d' -i src/lib/network/schemehandlers/qupzillaschemehandler.cpp

export USE_WEBGL=true
%if !0%{?qt5_build}
# It enables better kde integration, it's also needed for kwallet plugin.
# It enables gnome keyring support
# It sets proper LIBPATH.
export USE_LIBPATH=%{_libdir}
%if !0%{?qt5_build}
# Debug config is needed for -debuginfo and -debugsource packages.
qmake CONFIG+=debug
make %{?_smp_mflags}

make INSTALL_ROOT=%{buildroot} install
# FIXME: split library into separate package and build also -devel with ???
rm -vf %{buildroot}%{_libdir}/
# We don't need a test plugin which does nothing.
rm -vf %{buildroot}%{_libdir}/qupzilla/
# End
%suse_update_desktop_file qupzilla
%fdupes -s %{buildroot}%{_datadir}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%dir %{_libdir}/qupzilla
%dir %{_datadir}/qupzilla
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions

%if !0%{?qt5_build}
%files kwallet

%files gnome-keyring

openSUSE Build Service is sponsored by