27ddf1f609ecc4578c3b6ff90d90376b55e587e4
[packages/qutebrowser.git] / qutebrowser.spec
1 %define         qtver   5.7.1
2 Summary:        A keyboard-driven, vim-like browser based on PyQt5
3 Name:           qutebrowser
4 Version:        1.11.1
5 Release:        1
6 License:        GPL v3+
7 Group:          X11/Applications/Networking
8 Source0:        https://github.com/qutebrowser/qutebrowser/archive/v%{version}.tar.gz
9 # Source0-md5:  eca78bea85c1bdd9c5fd8b51877532a2
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:       Qt5Sql-sqldriver-sqlite3 >= %{qtver}
20 Requires:       Qt5WebEngine >= %{qtver}
21 Requires:       bash
22 Requires:       hicolor-icon-theme
23 Requires:       python3 >= 3.6
24 Requires:       python3-PyQt5 >= 5.7.0
25 Requires:       python3-PyQtWebEngine
26 Requires:       python3-PyYAML
27 Requires:       python3-attrs
28 Requires:       python3-jinja2
29 Requires:       python3-pyPEG2
30 Requires:       python3-pygments
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 qutebrowser is a keyboard-focused browser with a minimal GUI. It’s
36 based on Python, PyQt5 and QtWebEngine and free software, licensed
37 under the GPL. It was inspired by other browsers/addons like dwb and
38 Vimperator/Pentadactyl.
39
40 %package userscripts
41 Summary:        User scripts for qutebrowser
42 Group:          X11/Applications/Networking
43 Requires:       %{name} = %{version}-%{release}
44
45 %description userscripts
46 User scripts for qutebrowser.
47
48 %prep
49 %setup -q
50
51 grep -r '#!.*env bash' -l . | xargs %{__sed} -i -e '1 s,#!.*env bash.*,#!/bin/bash,'
52 grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},'
53 grep -r '#!.*env node' -l . | xargs %{__sed} -i -e '1 s,#!.*env node.*,#!/usr/bin/node,'
54
55 %build
56 %py3_build
57
58 %{__python3} scripts/asciidoc2html.py
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62
63 %py3_install
64
65 %{__make} -f misc/Makefile install PYTHON=/bin/true DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix}
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 %update_desktop_database_post
72 %update_icon_cache hicolor
73
74 %postun
75 %update_desktop_database_postun
76 %update_icon_cache hicolor
77
78 %files
79 %defattr(644,root,root,755)
80 %doc README.asciidoc
81 %attr(755,root,root) %{_bindir}/qutebrowser
82 %{py3_sitescriptdir}/qutebrowser
83 %{py3_sitescriptdir}/qutebrowser-%{version}-py*.egg-info
84 %{_desktopdir}/org.qutebrowser.qutebrowser.desktop
85 %{_iconsdir}/hicolor/*x*/apps/qutebrowser.png
86 %{_iconsdir}/hicolor/scalable/apps/qutebrowser.svg
87 %{_mandir}/man1/qutebrowser.1*
88 %{_datadir}/metainfo/org.qutebrowser.qutebrowser.appdata.xml
89 %dir %{_datadir}/qutebrowser
90 %dir %{_datadir}/qutebrowser/scripts
91 %{_datadir}/qutebrowser/scripts/*.js
92 %attr(755,root,root) %{_datadir}/qutebrowser/scripts/*.py
93 %attr(755,root,root) %{_datadir}/qutebrowser/scripts/*.sh
94
95 %files userscripts
96 %defattr(644,root,root,755)
97 %dir %{_datadir}/qutebrowser/userscripts
98 %attr(755,root,root) %{_datadir}/qutebrowser/userscripts/*
This page took 0.039476 seconds and 2 git commands to generate.