summaryrefslogtreecommitdiffstats
path: root/qupzilla.spec
blob: bbae8aa4b8c6e55bf7377cbf2a56ea5708ca1466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
#global snapdate 20160321
#global snaphash 91e6c2eb715903924080e47f5e14c04159f7b43c

Name:           qupzilla
Version:        2.1.2
Release:        4%{?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}

# fix FTBFS with OpenSSL 1.1 (patch by Bernhard Rosenkränzer (bero))
Patch0:         QupZilla-2.0.1-openssl11.patch

# reenable native scrollbars by default (upstream disabled them in 2.1.2)
Patch1:         QupZilla-2.1.2-native-scrollbars.patch

# require only QtWebEngine 5.8 for spell checking etc., not all of Qt 5.8
Patch2:         QupZilla-2.1.2-mixed-versions.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.7
BuildRequires:  qt5-qtbase-devel >= 5.7
BuildRequires:  qt5-qtwebengine-devel >= 5.7
BuildRequires:  qt5-qtx11extras-devel >= 5.7
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.7)
Requires:       qt5-qtwebengine%{?_isa} >= %(echo %{qtwebengine_version} | cut -d. -f-2)

%filter_provides_in %{_libdir}/qupzilla
%filter_setup

%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 .openssl11
%patch1 -p1 -b .native-scrollbars
%patch2 -p1 -b .mixed-versions

# 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/%{name}.desktop

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


%check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml


%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%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
%{_datadir}/applications/%{name}.desktop
%{_datadir}/appdata/%{name}.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
* 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