Group :: Networking/WWW
RPM: qutebrowser
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%global srcname qutebrowser
Name: %srcname
Version: 3.0.0
Release: alt1
Summary: A keyboard-driven, vim-like browser based on PyQt5 and QtWebEngine
License: GPLv3
Group: Networking/WWW
Packager: Ilya Mashkin <oddity at altlinux.ru>
Url: http://www.qutebrowser.org
Source0: %srcname-%version.tar
BuildArch: noarch
BuildRequires(pre): rpm-build-python3
BuildRequires: python3-devel
BuildRequires: asciidoc asciidoc-a2x
BuildRequires: desktop-file-utils python3-module-setuptools rpm-build-python3
BuildRequires: pyproject-build rpm-macros-python3 python3-module-PyQt5
BuildRequires: python3(setuptools)
BuildRequires: python3(wheel)
#Requires: qt5-qtbase
#Requires: qt5-qtdeclarative
#Requires: python3-module-setuptools
#Requires: python3-qt5
#Requires: python3-qt5-webengine
#Requires: python3-jinja2
#Requires: python3-pygments
#Requires: python3-PyYAML
#Requires: python3-pyPEG2
#Requires: python3-attrs
#Requires: qt5-qtwebengine qt5-qtwebkit python3-qt5-webkit python3-cssutils
Provides: python3(qutebrowser.extensions)
Provides: python3(qutebrowser.components.utils)
#add_python3_req_skip PyQt5.QtWebKit PyQt5.QtWebKitWidgets
%add_python3_req_skip PyQt5.QtWebEngineCore PyQt5.QtWebEngine PyQt5.QtWebEngineWidgets
%description
qutebrowser is a keyboard-focused browser with a minimal GUI. It's based on
Python, PyQt5 and QtWebEngine and free software, licensed under the GPL.
It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl.
%prep
%setup -n %srcname-%version
%build
# Compile the man page
a2x -f manpage doc/qutebrowser.1.asciidoc
# Find all *.py files and if their first line is exactly '#!/usr/bin/env python3'
# then replace it with '#!/usr/bin/python3' (if it's the 1st line).
find . -type f -iname "*.py" -exec sed -i '1s_^#!/usr/bin/env python3$_#!/usr/bin/python3_' {} +
%pyproject_build
#python3_build
%install
%pyproject_install
#python3_install
# install .desktop file
desktop-file-install \
--add-category="Network" \
--delete-original \
--dir=%buildroot%_datadir/applications \
misc/org.%srcname.%srcname.desktop
# Install man page
install -Dm644 doc/%srcname.1 -t %buildroot%_mandir/man1
# Install icons
install -Dm644 qutebrowser/icons/qutebrowser.svg \
-t "%buildroot%_datadir/icons/hicolor/scalable/apps"
for i in 16 24 32 48 64 128 256 512; do
install -Dm644 "qutebrowser/icons/qutebrowser-${i}x${i}.png" \
"%buildroot%_datadir/icons/hicolor/${i}x${i}/apps/qutebrowser.png"
done
# Set __main__.py as executable
chmod 755 %buildroot%python3_sitelibdir/%srcname/__main__.py
# Remove zero-length files:
# https://fedoraproject.org/wiki/Packaging_tricks#Zero_length_files
find %buildroot -size 0 -delete
%files
%doc README.asciidoc doc/changelog.asciidoc doc/img/*
%python3_sitelibdir/%srcname-%version.dist-info
%python3_sitelibdir/%srcname
%_bindir/%srcname
%_datadir/applications/org.%srcname.%srcname.desktop
%_man1dir/%srcname.1*
%_datadir/icons/hicolor/scalable/apps/%srcname.svg
%_datadir/icons/hicolor/16x16/apps/%srcname.png
%_datadir/icons/hicolor/24x24/apps/%srcname.png
%_datadir/icons/hicolor/32x32/apps/%srcname.png
%_datadir/icons/hicolor/48x48/apps/%srcname.png
%_datadir/icons/hicolor/64x64/apps/%srcname.png
%_datadir/icons/hicolor/128x128/apps/%srcname.png
%_datadir/icons/hicolor/256x256/apps/%srcname.png
%_datadir/icons/hicolor/512x512/apps/%srcname.png
%changelog
…
Full changelog you can see here
Name: %srcname
Version: 3.0.0
Release: alt1
Summary: A keyboard-driven, vim-like browser based on PyQt5 and QtWebEngine
License: GPLv3
Group: Networking/WWW
Packager: Ilya Mashkin <oddity at altlinux.ru>
Url: http://www.qutebrowser.org
Source0: %srcname-%version.tar
BuildArch: noarch
BuildRequires(pre): rpm-build-python3
BuildRequires: python3-devel
BuildRequires: asciidoc asciidoc-a2x
BuildRequires: desktop-file-utils python3-module-setuptools rpm-build-python3
BuildRequires: pyproject-build rpm-macros-python3 python3-module-PyQt5
BuildRequires: python3(setuptools)
BuildRequires: python3(wheel)
#Requires: qt5-qtbase
#Requires: qt5-qtdeclarative
#Requires: python3-module-setuptools
#Requires: python3-qt5
#Requires: python3-qt5-webengine
#Requires: python3-jinja2
#Requires: python3-pygments
#Requires: python3-PyYAML
#Requires: python3-pyPEG2
#Requires: python3-attrs
#Requires: qt5-qtwebengine qt5-qtwebkit python3-qt5-webkit python3-cssutils
Provides: python3(qutebrowser.extensions)
Provides: python3(qutebrowser.components.utils)
#add_python3_req_skip PyQt5.QtWebKit PyQt5.QtWebKitWidgets
%add_python3_req_skip PyQt5.QtWebEngineCore PyQt5.QtWebEngine PyQt5.QtWebEngineWidgets
%description
qutebrowser is a keyboard-focused browser with a minimal GUI. It's based on
Python, PyQt5 and QtWebEngine and free software, licensed under the GPL.
It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl.
%prep
%setup -n %srcname-%version
%build
# Compile the man page
a2x -f manpage doc/qutebrowser.1.asciidoc
# Find all *.py files and if their first line is exactly '#!/usr/bin/env python3'
# then replace it with '#!/usr/bin/python3' (if it's the 1st line).
find . -type f -iname "*.py" -exec sed -i '1s_^#!/usr/bin/env python3$_#!/usr/bin/python3_' {} +
%pyproject_build
#python3_build
%install
%pyproject_install
#python3_install
# install .desktop file
desktop-file-install \
--add-category="Network" \
--delete-original \
--dir=%buildroot%_datadir/applications \
misc/org.%srcname.%srcname.desktop
# Install man page
install -Dm644 doc/%srcname.1 -t %buildroot%_mandir/man1
# Install icons
install -Dm644 qutebrowser/icons/qutebrowser.svg \
-t "%buildroot%_datadir/icons/hicolor/scalable/apps"
for i in 16 24 32 48 64 128 256 512; do
install -Dm644 "qutebrowser/icons/qutebrowser-${i}x${i}.png" \
"%buildroot%_datadir/icons/hicolor/${i}x${i}/apps/qutebrowser.png"
done
# Set __main__.py as executable
chmod 755 %buildroot%python3_sitelibdir/%srcname/__main__.py
# Remove zero-length files:
# https://fedoraproject.org/wiki/Packaging_tricks#Zero_length_files
find %buildroot -size 0 -delete
%files
%doc README.asciidoc doc/changelog.asciidoc doc/img/*
%python3_sitelibdir/%srcname-%version.dist-info
%python3_sitelibdir/%srcname
%_bindir/%srcname
%_datadir/applications/org.%srcname.%srcname.desktop
%_man1dir/%srcname.1*
%_datadir/icons/hicolor/scalable/apps/%srcname.svg
%_datadir/icons/hicolor/16x16/apps/%srcname.png
%_datadir/icons/hicolor/24x24/apps/%srcname.png
%_datadir/icons/hicolor/32x32/apps/%srcname.png
%_datadir/icons/hicolor/48x48/apps/%srcname.png
%_datadir/icons/hicolor/64x64/apps/%srcname.png
%_datadir/icons/hicolor/128x128/apps/%srcname.png
%_datadir/icons/hicolor/256x256/apps/%srcname.png
%_datadir/icons/hicolor/512x512/apps/%srcname.png
%changelog
…
Full changelog you can see here