]>
Commit | Line | Data |
---|---|---|
fa863c6e JP |
1 | %define qtver 5.7.1 |
2 | Summary: A keyboard-driven, vim-like browser based on PyQt5 | |
3 | Name: qutebrowser | |
e83f2d2d JP |
4 | Version: 1.5.2 |
5 | Release: 1 | |
fa863c6e JP |
6 | License: GPL v3+ |
7 | Group: X11/Applications/Networking | |
8 | Source0: https://github.com/qutebrowser/qutebrowser/archive/v%{version}.tar.gz | |
e83f2d2d | 9 | # Source0-md5: 0a8780a4c670b574547dc3980d459022 |
fa863c6e JP |
10 | URL: https://www.qutebrowser.org/ |
11 | BuildRequires: asciidoc | |
12 | BuildRequires: python3 >= 3.6 | |
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} | |
19 | Requires: Qt5WebEngine >= %{qtver} | |
20 | Requires: bash | |
21 | Requires: hicolor-icon-theme | |
22 | Requires: python3 >= 3.6 | |
23 | Requires: python3-PyQt5 >= 5.7.0 | |
24 | Requires: python3-PyYAML | |
25 | Requires: python3-attrs | |
26 | Requires: python3-jinja2 | |
27 | Requires: python3-pyPEG2 | |
28 | Requires: 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 | ||
38 | %prep | |
39 | %setup -q | |
40 | ||
41 | grep -r '#!.*env bash' -l . | xargs %{__sed} -i -e '1 s,#!.*env bash.*,#!/bin/bash,' | |
42 | grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},' | |
43 | ||
44 | %build | |
45 | %py3_build | |
d4bfccd1 JP |
46 | |
47 | %{__python3} scripts/asciidoc2html.py | |
fa863c6e JP |
48 | |
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %py3_install | |
53 | ||
54 | %{__make} -f misc/Makefile install PYTHON=/bin/true DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %post | |
60 | %update_desktop_database_post | |
61 | %update_icon_cache hicolor | |
62 | ||
63 | %postun | |
64 | %update_desktop_database_postun | |
65 | %update_icon_cache hicolor | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc README.asciidoc | |
70 | %attr(755,root,root) %{_bindir}/qutebrowser | |
71 | %{py3_sitescriptdir}/qutebrowser | |
72 | %{py3_sitescriptdir}/qutebrowser-%{version}-py*.egg-info | |
73 | %{_desktopdir}/qutebrowser.desktop | |
74 | %{_iconsdir}/hicolor/*x*/apps/qutebrowser.png | |
75 | %{_iconsdir}/hicolor/scalable/apps/qutebrowser.svg | |
76 | %{_mandir}/man1/qutebrowser.1* | |
77 | %{_datadir}/metainfo/qutebrowser.appdata.xml | |
78 | %dir %{_datadir}/qutebrowser | |
79 | %dir %{_datadir}/qutebrowser/scripts | |
80 | %{_datadir}/qutebrowser/scripts/*.js | |
81 | %attr(755,root,root) %{_datadir}/qutebrowser/scripts/*.py | |
82 | %attr(755,root,root) %{_datadir}/qutebrowser/scripts/*.sh | |
83 | %dir %{_datadir}/qutebrowser/userscripts | |
84 | %attr(755,root,root) %{_datadir}/qutebrowser/userscripts/* |