]>
Commit | Line | Data |
---|---|---|
d8ee1b3a | 1 | %define qtver 5.12 |
fa863c6e JP |
2 | Summary: A keyboard-driven, vim-like browser based on PyQt5 |
3 | Name: qutebrowser | |
2f66f9d3 JP |
4 | Version: 2.1.0 |
5 | Release: 1 | |
fa863c6e JP |
6 | License: GPL v3+ |
7 | Group: X11/Applications/Networking | |
2d81f36f | 8 | Source0: https://github.com/qutebrowser/qutebrowser/archive/v%{version}/%{name}-%{version}.tar.gz |
2f66f9d3 | 9 | # Source0-md5: bcd0d476152c9a5e6a2158a755ac309b |
fa863c6e JP |
10 | URL: https://www.qutebrowser.org/ |
11 | BuildRequires: asciidoc | |
d8ee1b3a | 12 | BuildRequires: python3 >= 1:3.6.1 |
fa863c6e JP |
13 | BuildRequires: python3-setuptools |
14 | BuildRequires: rpm-pythonprov | |
15 | BuildRequires: rpmbuild(macros) >= 1.714 | |
16 | Requires: Qt5Core >= %{qtver} | |
17 | Requires: Qt5OpenGL >= %{qtver} | |
18 | Requires: Qt5Sql >= %{qtver} | |
2ab089c2 | 19 | Requires: Qt5Sql-sqldriver-sqlite3 >= %{qtver} |
fa863c6e JP |
20 | Requires: Qt5WebEngine >= %{qtver} |
21 | Requires: bash | |
22 | Requires: hicolor-icon-theme | |
d8ee1b3a JP |
23 | Requires: python3 >= 1:3.6.1 |
24 | Requires: python3-PyQt5 >= 5.12.0 | |
66633249 | 25 | Requires: python3-PyQtWebEngine |
fa863c6e | 26 | Requires: python3-PyYAML |
fa863c6e | 27 | Requires: python3-jinja2 |
d8ee1b3a | 28 | Suggests: python3-pygments |
73c83a4c | 29 | BuildArch: noarch |
fa863c6e JP |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | qutebrowser is a keyboard-focused browser with a minimal GUI. It’s | |
34 | based on Python, PyQt5 and QtWebEngine and free software, licensed | |
35 | under the GPL. It was inspired by other browsers/addons like dwb and | |
36 | Vimperator/Pentadactyl. | |
37 | ||
2b91ed1b JP |
38 | %package userscripts |
39 | Summary: User scripts for qutebrowser | |
40 | Group: X11/Applications/Networking | |
41 | Requires: %{name} = %{version}-%{release} | |
42 | ||
43 | %description userscripts | |
44 | User scripts for qutebrowser. | |
45 | ||
fa863c6e JP |
46 | %prep |
47 | %setup -q | |
48 | ||
49 | grep -r '#!.*env bash' -l . | xargs %{__sed} -i -e '1 s,#!.*env bash.*,#!/bin/bash,' | |
50 | grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},' | |
c57333cf | 51 | grep -r '#!.*env node' -l . | xargs %{__sed} -i -e '1 s,#!.*env node.*,#!/usr/bin/node,' |
fa863c6e JP |
52 | |
53 | %build | |
54 | %py3_build | |
d4bfccd1 JP |
55 | |
56 | %{__python3} scripts/asciidoc2html.py | |
fa863c6e JP |
57 | |
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %py3_install | |
62 | ||
63 | %{__make} -f misc/Makefile install PYTHON=/bin/true DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} | |
64 | ||
65 | %clean | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %post | |
69 | %update_desktop_database_post | |
70 | %update_icon_cache hicolor | |
71 | ||
72 | %postun | |
73 | %update_desktop_database_postun | |
74 | %update_icon_cache hicolor | |
75 | ||
76 | %files | |
77 | %defattr(644,root,root,755) | |
78 | %doc README.asciidoc | |
79 | %attr(755,root,root) %{_bindir}/qutebrowser | |
80 | %{py3_sitescriptdir}/qutebrowser | |
81 | %{py3_sitescriptdir}/qutebrowser-%{version}-py*.egg-info | |
24f090dc | 82 | %{_desktopdir}/org.qutebrowser.qutebrowser.desktop |
fa863c6e JP |
83 | %{_iconsdir}/hicolor/*x*/apps/qutebrowser.png |
84 | %{_iconsdir}/hicolor/scalable/apps/qutebrowser.svg | |
85 | %{_mandir}/man1/qutebrowser.1* | |
fdaa2be6 | 86 | %{_datadir}/metainfo/org.qutebrowser.qutebrowser.appdata.xml |
fa863c6e JP |
87 | %dir %{_datadir}/qutebrowser |
88 | %dir %{_datadir}/qutebrowser/scripts | |
89 | %{_datadir}/qutebrowser/scripts/*.js | |
90 | %attr(755,root,root) %{_datadir}/qutebrowser/scripts/*.py | |
91 | %attr(755,root,root) %{_datadir}/qutebrowser/scripts/*.sh | |
2b91ed1b JP |
92 | |
93 | %files userscripts | |
94 | %defattr(644,root,root,755) | |
fa863c6e JP |
95 | %dir %{_datadir}/qutebrowser/userscripts |
96 | %attr(755,root,root) %{_datadir}/qutebrowser/userscripts/* |