Blob Blame History Raw
#global snapdate 20160321
#global snaphash 91e6c2eb715903924080e47f5e14c04159f7b43c

Name:           qupzilla
Version:        2.2.6
Release:        1%{?dist}
Summary:        Modern web browser

# Files in src/lib/opensearch and src/lib/3rdparty are GPLv2+
# Files in src/plugins/MouseGestures/3rdparty are BSD (2 clause)
License:        GPLv3+ and BSD
URL:            http://www.qupzilla.com/
Source0:        https://github.com/QupZilla/%{name}/%{?snaphash:archive}%{!?snaphash:releases/download}/%{?snaphash}%{!?snaphash:v%{version}}/QupZilla-%{?snaphash}%{!?snaphash:%{version}}.tar.%{?snaphash:gz}%{!?snaphash:xz}

# reenable native scrollbars by default (upstream disabled them in 2.1.2)
Patch0:         QupZilla-2.2.0-native-scrollbars.patch
# unconditionally enable the QTBUG-65223 workaround: The check for qVersion()
# starting with "5.10." does not work on F26/F27 because we ship only
# QtWebEngine 5.10.x, on Qt 5.9.x.
Patch1:         falkon-3.0.0-qtbug-65223-workaround.patch

# handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches
%{?qt5_qtwebengine_arches:ExclusiveArch: %{qt5_qtwebengine_arches}}

BuildRequires:  desktop-file-utils
BuildRequires:  libappstream-glib
BuildRequires:  xcb-util-devel
BuildRequires:  openssl-devel
BuildRequires:  qt5-linguist >= 5.9
BuildRequires:  qt5-qtbase-devel >= 5.9
BuildRequires:  qt5-qtwebengine-devel >= 5.9
BuildRequires:  qt5-qtx11extras-devel >= 5.9
BuildRequires:  qtsingleapplication-qt5-devel

# require the correct minimum versions of Qt, symbol versioning does not work
%{?_qt5_version:Requires: qt5-qtbase%{?_isa} >= %(echo %{_qt5_version} | cut -d. -f-2)}
%global qtwebengine_version %(pkg-config --modversion Qt5WebEngine 2>/dev/null || echo 5.9)
Requires:       qt5-qtwebengine%{?_isa} >= %(echo %{qtwebengine_version} | cut -d. -f-2)

# directory ownership
Requires:       hicolor-icon-theme

%global __provides_exclude_from ^%{_libdir}/qupzilla/.*$

%package gnome-keyring
Summary: gnome-keyring plugin for %{name}
BuildRequires:  pkgconfig(gnome-keyring-1)
Requires: %{name}%{?_isa} = %{version}-%{release}
%description gnome-keyring
%{summary}.

%package kwallet
Summary: kwallet plugin for %{name}
BuildRequires:  kf5-kwallet-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%description kwallet
%{summary}.


%description
QupZilla is a modern web browser based on QtWebEngine (which is itself based on
the Chromium core, i.e., Blink) and the Qt framework. It is designed to be
lightweight and fast and offers advanced functions such as
- an integrated advertisement blocker,
- a search engine manager,
- a SSL certificate manager,
- speed dial
- theming support, and
- seamless integration into your desktop environment.


%prep
%setup -qn %{?snaphash:qupzilla-%{snaphash}}%{!?snaphash:QupZilla-%{version}}
%patch0 -p1 -b .native-scrollbars
%patch1 -p1 -b .qtbug-65223-workaround

# unbundle qtsingleapplication
rm -fr src/lib/3rdparty/qtsingleapplication
ln -s %{_qt5_headerdir}/QtSolutions src/lib/3rdparty/qtsingleapplication
sed -i 's,include.*qtsingleapplication.*,,' src/plugins.pri
sed -i 's,include.*qtsingleapplication.*,,' src/lib/lib.pro

%build
export QUPZILLA_PREFIX="%{_prefix}/"
export USE_LIBPATH="%{_libdir}"
export USE_WEBGL="true"
export DISABLE_UPDATES_CHECK="true"
export DISABLE_DBUS="false"
export PORTABLE_BUILD="false"
export GNOME_INTEGRATION="true"
export KDE_INTEGRATION="true"

%{qmake_qt5} CONFIG+=QtSingleApplication

make %{?_smp_mflags}


%install
make install INSTALL_ROOT=%{buildroot}

# translations
%find_lang qt --with-qt
# manually handle remaining ones that are not namespaced
# that find_lang does not parse
for i in %{buildroot}%{_datadir}/%{name}/locale/*.qm ; do
  lang=$(basename $i .qm)
  if [ "$(echo ${lang} | cut -d_ -f1)" != "qt" ]; then
    file="$(echo ${i} | sed -e "s|^%{buildroot}||g")"
    echo "%lang(${lang}) $file" >> qt.lang
  fi
done

desktop-file-install \
    --add-mime-type="x-scheme-handler/http;x-scheme-handler/https;" \
    --dir=%{buildroot}%{_datadir}/applications \
    %{buildroot}/%{_datadir}/applications/org.qupzilla.QupZilla.desktop

# remove useless plugin
rm -fv %{buildroot}%{_libdir}/%{name}/libTestPlugin.so


%check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.qupzilla.QupZilla.appdata.xml


%ldconfig_scriptlets

%files -f qt.lang
%doc AUTHORS CHANGELOG FAQ README.md
%license COPYRIGHT LICENSE
%{_bindir}/qupzilla
%{_libdir}/libQupZilla.so.*
# We don't have a devel package
%exclude %{_libdir}/libQupZilla.so
%dir %{_libdir}/qupzilla/
# currently disabled upstream (due to the QtWebEngine port)
#%{_libdir}/qupzilla/libAccessKeysNavigation.so
%{_libdir}/qupzilla/libAutoScroll.so
%{_libdir}/qupzilla/libFlashCookieManager.so
%{_libdir}/qupzilla/libGreaseMonkey.so
%{_libdir}/qupzilla/libImageFinder.so
%{_libdir}/qupzilla/libMouseGestures.so
%{_libdir}/qupzilla/libPIM.so
%{_libdir}/qupzilla/libStatusBarIcons.so
%{_libdir}/qupzilla/libTabManager.so
%{_libdir}/qupzilla/libVerticalTabs.so
%{_datadir}/applications/org.qupzilla.QupZilla.desktop
%{_datadir}/metainfo/org.qupzilla.QupZilla.appdata.xml
%{_datadir}/bash-completion/
%{_datadir}/pixmaps/qupzilla.png
%{_datadir}/icons/hicolor/*/*/*
%dir %{_datadir}/qupzilla/
%dir %{_datadir}/qupzilla/locale/
%{_datadir}/qupzilla/themes/

%files gnome-keyring
%{_libdir}/qupzilla/libGnomeKeyringPasswords.so

%files kwallet
%{_libdir}/qupzilla/libKWalletPasswords.so


%changelog
* Thu Apr 12 2018 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.2.6-1
- update to 2.2.6 (last QupZilla release)
- new VerticalTabs plugin
- rebase qtbug-65223-workaround patch and fix typo in the bug ID
- port the Provides filter to the native RPM Provides filtering
- remove obsolete scriptlets, add ldconfig_scriptlets transitional macro for now
- add Requires: hicolor-icon-theme for directory ownership

* Thu Feb 01 2018 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.2.5-2
- unconditionally enable the QTBUG-65223 workaround so that it actually works

* Mon Jan 29 2018 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.2.5-1
- update to 2.2.5 (now requires Qt 5.9)

* Sat Dec 23 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.2.3-1
- update to 2.2.3 (bugfix release)
- appdata is now in /usr/share/metainfo

* Thu Dec 14 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.2.2-1
- update to 2.2.2 (bugfix release)

* Tue Nov 07 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.2.1-1
- update to 2.2.1 (bugfix release)
- drop appdata file name typo workaround, fixed upstream

* Mon Oct 16 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.2.0-1
- update to 2.2.0 (now requires Qt 5.8)
- drop openssl11 patch, fixed upstream
- rebase native-scrollbars patch
- drop obsolete mixed-versions patch (Qt 5.8 conditionals are gone)
- .desktop and appdata files renamed by upstream
- backport a typo fix in the appdata file name

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.1.2-5
- Rebuild due to bug in RPM (RHBZ #1468476)

* Sun Apr 16 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.1.2-4
- add versioned qt5-qtbase and qt5-qtwebengine Requires

* Sat Apr 15 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.1.2-3
- require only QtWebEngine 5.8 for spell checking etc., not all of Qt 5.8

* Fri Mar 31 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.1.2-2
- rebuild against Qt 5.8 to pick up spell checking from QtWebEngine 5.8

* Fri Mar 24 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.1.2-1
- update to 2.1.2 (bugfix release)
- reenable native scrollbars by default (upstream disabled them in 2.1.2)

* Mon Feb 20 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.1.1-1
- update to 2.1.1 (bugfix release)
- drop backported speeddial patch, already in 2.1.1

* Wed Feb 08 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.1.0-2
- backport upstream fix for adding/editing SpeedDial entries (#1419915)

* Sun Feb 05 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.1.0-1
- update to 2.1.0 (now requires Qt 5.7)
- drop upstreamed printing patch
- drop support for Fedora <= 24, Qt is too old there (5.6.x)

* Sat Dec 10 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.2-2
- rebuild against fixed Qt (moc) to fix KWallet support

* Sun Oct 30 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.2-1
- update to 2.0.2 (bugfix release)

* Fri Oct 28 2016 Than Ngo <than@redhat.com> - 2.0.1-9
- uses %%qt5_qtwebengine_arches

* Tue Oct 18 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.1-8
- fix FTBFS with OpenSSL 1.1 (patch by Bernhard Rosenkränzer (bero))

* Thu Sep 08 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.1-7
- printing patch: FilePrinter: do not pass margins to lpr, the PDF has margins
- printing patch: enable options handled by FilePrinter in the print dialog

* Tue Sep 06 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.1-6
- printing patch: adapt the FilePrinter from Okular to pass correct lpr args

* Tue Sep 06 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.1-5
- printing patch: use async QProcess API instead of QProcess::execute to run lpr

* Fri Aug 26 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.1-4
- printing patch: use the callback version of printToPdf instead of the file one

* Fri Aug 26 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.1-3
- printing patch: let lpr autoremove the file instead of QTemporaryFile

* Fri Jul 29 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.1-2
- add experimental printing support

* Sat Jun 11 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.1-1
- update to 2.0.1 (bugfix release)

* Thu Mar 31 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.0-1
- update to 2.0.0 (official release)
- remove unused BR pkgconfig(hunspell) (not used since the QtWebEngine switch)

* Sat Mar 26 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.10.20160321git91e6c2eb71590
- new snapshot with Greasemonkey improvements and minor bugfixes elsewhere

* Thu Feb 25 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.9.20160225gitff0a8898616e1
- new snapshot, fixes FTBFS (bad bash-completion path), some more UI tweaks

* Wed Feb 24 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.8.20160220git844f439526150
- new snapshot, updated for QtWebEngine 5.6.0 RC API changes, some UI tweaks

* Tue Feb 02 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.7.20160127git06b2414d801eb
- bump Release for official Rawhide build (#1298145)

* Wed Jan 27 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.6.20160127git06b2414d801eb
- new snapshot with some theming, high DPI and usability improvements
- add ExclusiveArch matching the one in qt5-qtwebengine (see #1298011)

* Wed Jan 27 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.5.20160125git3ab21c1c2c2cd
- new snapshot with some bugfixes and theming improvements

* Fri Jan 22 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.4.20160120git95f10443ef895
- new snapshot, adds image finder plugin
- drop my patches that were both upstreamed
- fix/update %%description to refer to QtWebEngine/Chromium/Blink, not WebKit

* Thu Jan 14 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.3.20160102git3e0583377d825
- fix crash from autosearch-optional patch

* Thu Jan 14 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.2.20160102git3e0583377d825
- default to NoProxy instead of HttpProxy so that the default just works
- make automatic searching from the address bar optional

* Fri Jan 08 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.9.99-0.1.20160102git3e0583377d825
- update to QtWebEngine-based git snapshot (from git master)
- BR Qt >= 5.6
- remove BR qt5-qtwebkit-devel and qt5-qtscript-devel
- add BR qt5-qtwebengine-devel and xcb-util-devel
- update file list: no AccessKeysNavigation plugin for now

* Wed Dec 16 2015 Rex Dieter <rdieter@fedoraproject.org> 1.8.9-3
- BR: qt5-linguist (instead of all of qt5-qttools-devel)

* Wed Dec 09 2015 Rex Dieter <rdieter@fedoraproject.org> 1.8.9-2
- -kwallet, -gnome-keyring subpkgs (#1285034)

* Mon Nov 30 2015 Rex Dieter <rdieter@fedoraproject.org> 1.8.9-1
- 1.8.9 (#1285034)

* Tue Nov 10 2015 Rex Dieter <rdieter@fedoraproject.org> - 1.8.8-2
- enable kwallet plugin (#1279972)
- track plugins closer
- filter plugin provides
- .spec cosmetics

* Sat Nov 07 2015 Rex Dieter <rdieter@fedoraproject.org> 1.8.8-1
- 1.8.8

* Mon Oct 12 2015 Rex Dieter <rdieter@fedoraproject.org> 1.8.7-2
- workaround qtwebkit-5.5.1 dropping QTWEBKIT_VERSION_CHECK macro (#1270602)
- revert use of %%make_install (qmake supports INSTALL_ROOT, not DESTDIR)
- %%check: appstream validation

* Sun Oct 11 2015 Raphael Groner <projects.rg@smart.ms> - 1.8.7-1
- new version

* Mon Oct 05 2015 Rex Dieter <rdieter@fedoraproject.org> 1.8.6-7
- qupzilla FTBFS (#1247953)

* Mon Jul 20 2015 Raphael Groner <projects.rg@smart.ms> - 1.8.6-6
- unbundle qtsingleapplication (rhbz#1091704)
- remove qt4 build (f20 went EOL)

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Apr 12 2015 Helio Chissini de Castro <helio@kde.org> - 1.8.6-4
- Remove some non legal icons from tarball.

* Wed Mar 11 2015 Helio Chissini de Castro <helio@kde.org> - 1.8.6-3
- Add missing build requires

* Wed Mar 11 2015 Helio Chissini de Castro <helio@kde.org> - 1.8.6-2
- Add missing build requires

* Wed Mar 11 2015 Helio Chissini de Castro <helio@kde.org> - 1.8.6-1
- New pustream version - Repackaged replacing invalid icons
- Make Qt5 as default
- Compile Qt4 only in Fedora 20 or less
- Remove invalid flags

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Feb 18 2014 Christoph Wickert <cwickert@fedoraproject.org> - 1.6.3-1
- Update to 1.6.3

* Fri Sep 27 2013 Christoph Wickert <cwickert@fedoraproject.org> - 1.4.4-1
- Update to 1.4.4

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun May 19 2013 Christoph Wickert <cwickert@fedoraproject.org> - 1.4.3-1
- Update to 1.4.3
- Include new bash-completion file

* Mon Apr 01 2013 Christoph Wickert <cwickert@fedoraproject.org> - 1.4.1-1
- Update to 1.4.1

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Oct 20 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.3.5-2
- Use new filter setup
- Build with --as-needed
- Preserve timestamps during install
- Add comment about license of the source files

* Sat Oct 06 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.3.5-1
- Update to 1.3.5
- Enable WebGL (USE_WEBGL)
- Enable geolocation and notifications API (USE_QTWEBKIT_2_2)
- Change icense tag to "GPLv3+ and BSD" (some plugins are BSD licensed)
- Add x-scheme-handlers so qupzilla can be set as default browser
- Filter out private requires and provides
- Include README.md in %%doc

* Mon Apr 30 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.2.0-1
- Initial package