fnux / rpms / qutebrowser

Forked from rpms/qutebrowser 6 years ago
Clone

Blame qutebrowser.spec

5b4e4f6
%global srcname qutebrowser
5b4e4f6
5b4e4f6
Name:		%{srcname}
Timothée Floure e7643e8
Version:	1.0.4
Timothée Floure e7643e8
Release:	1%{?dist}
Timothée Floure 5f013f2
Summary:	A keyboard-driven, vim-like browser based on PyQt5 and QtWebEngine
5b4e4f6
5b4e4f6
License:	GPLv3
5b4e4f6
URL:		http://www.qutebrowser.org
Timothée Floure e7643e8
Source0:	https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz
5b4e4f6
BuildArch:	noarch
5b4e4f6
BuildRequires:	python3-devel
5b4e4f6
BuildRequires:	asciidoc
5b4e4f6
BuildRequires:	desktop-file-utils
e571f61
Requires:	qt5-qtbase
e6ac386
Requires:	qt5-qtdeclarative
5b4e4f6
Requires:	python3-setuptools
5b4e4f6
Requires:	python3-qt5
Timothée Floure 5f013f2
Requires:	python3-qt5-webengine
5b4e4f6
Requires:	python3-jinja2
5b4e4f6
Requires:	python3-pygments
5b4e4f6
Requires:	python3-PyYAML
5b4e4f6
Requires:	python3-pyPEG2
Timothée Floure 5f013f2
Requires:	python3-attrs
Timothée Floure ce02c23
Requires:	((qt5-qtwebengine and python3-qt5-webengine) or (qt5-qtwebkit and python3-qt5-webkit))
Timothée Floure ce02c23
Recommends:	(qt5-qtwebengine and python3-qt5-webengine)
Timothée Floure ce02c23
Recommends:	(qt5-qtwebkit and python3-qt5-webkit)
6894ac9
Recommends:	python3-cssutils
30dec69
30dec69
5b4e4f6
%description
5b4e4f6
qutebrowser is a keyboard-focused browser with a minimal GUI. It’s based on
Timothée Floure 5f013f2
Python, PyQt5 and QtWebEngine and free software, licensed under the GPL.
5b4e4f6
It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl.
5b4e4f6
5b4e4f6
5b4e4f6
%prep
e571f61
%autosetup -n %{srcname}-%{version}
5b4e4f6
5b4e4f6
5b4e4f6
%build
5b4e4f6
# Compile the man page
5b4e4f6
a2x -f manpage doc/qutebrowser.1.asciidoc
5b4e4f6
74034ca
# Find all *.py files and if their first line is exactly '#!/usr/bin/env python3'
74034ca
# then replace it with '#!/usr/bin/python3' (if it's the 1st line).
74034ca
find . -type f -iname "*.py" -exec sed -i '1s_^#!/usr/bin/env python3$_#!/usr/bin/python3_' {} +
5b4e4f6
5b4e4f6
%py3_build
5b4e4f6
5b4e4f6
5b4e4f6
%install
5b4e4f6
%py3_install
5b4e4f6
5b4e4f6
# install .desktop file
5b4e4f6
desktop-file-install \
5b4e4f6
	--add-category="Network" \
5b4e4f6
	--delete-original \
5b4e4f6
	--dir=%{buildroot}%{_datadir}/applications \
Timothée Floure 5f013f2
	misc/%{srcname}.desktop
5b4e4f6
5b4e4f6
# Install man page
5b4e4f6
install -Dm644 doc/%{srcname}.1 -t %{buildroot}%{_mandir}/man1
5b4e4f6
5b4e4f6
# Install icons
5b4e4f6
install -Dm644 icons/qutebrowser.svg \
5b4e4f6
	-t "%{buildroot}%{_datadir}/icons/hicolor/scalable/apps"
5b4e4f6
for i in 16 24 32 48 64 128 256 512; do
5b4e4f6
	install -Dm644 "icons/qutebrowser-${i}x${i}.png" \
5b4e4f6
		"%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/qutebrowser.png"
5b4e4f6
done
5b4e4f6
5b4e4f6
# Set __main__.py as executable
5b4e4f6
chmod 755 %{buildroot}%{python3_sitelib}/%{srcname}/__main__.py
5b4e4f6
5b4e4f6
# Remove zero-length files:
5b4e4f6
# https://fedoraproject.org/wiki/Packaging_tricks#Zero_length_files
5b4e4f6
find %{buildroot} -size 0 -delete
5b4e4f6
5b4e4f6
5b4e4f6
%post
5b4e4f6
# Update the icon cache:
5b4e4f6
# http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
5b4e4f6
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
5b4e4f6
5b4e4f6
# Update the desktop database:
5b4e4f6
# http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#desktop-database
5b4e4f6
/usr/bin/update-desktop-database &> /dev/null || :
5b4e4f6
5b4e4f6
5b4e4f6
%postun
5b4e4f6
# http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
5b4e4f6
if [ $1 -eq 0 ] ; then
5b4e4f6
	/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
5b4e4f6
	/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
5b4e4f6
fi
5b4e4f6
5b4e4f6
# http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#desktop-database
5b4e4f6
/usr/bin/update-desktop-database &> /dev/null || :
5b4e4f6
5b4e4f6
5b4e4f6
%posttrans
5b4e4f6
# http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
5b4e4f6
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
5b4e4f6
5b4e4f6
5b4e4f6
%files
Timothée Floure 5f013f2
%license LICENSE
Timothée Floure 4a049e3
%doc README.asciidoc doc/changelog.asciidoc qutebrowser/html/doc
5b4e4f6
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
5b4e4f6
%{python3_sitelib}/%{srcname}
5b4e4f6
%{_bindir}/%{srcname}
5b4e4f6
%{_datadir}/applications/%{srcname}.desktop
5b4e4f6
%{_mandir}/man1/%{srcname}.1*
5b4e4f6
%{_datadir}/icons/hicolor/scalable/apps/%{srcname}.svg
5b4e4f6
%{_datadir}/icons/hicolor/16x16/apps/%{srcname}.png
5b4e4f6
%{_datadir}/icons/hicolor/24x24/apps/%{srcname}.png
5b4e4f6
%{_datadir}/icons/hicolor/32x32/apps/%{srcname}.png
5b4e4f6
%{_datadir}/icons/hicolor/48x48/apps/%{srcname}.png
5b4e4f6
%{_datadir}/icons/hicolor/64x64/apps/%{srcname}.png
5b4e4f6
%{_datadir}/icons/hicolor/128x128/apps/%{srcname}.png
5b4e4f6
%{_datadir}/icons/hicolor/256x256/apps/%{srcname}.png
5b4e4f6
%{_datadir}/icons/hicolor/512x512/apps/%{srcname}.png
5b4e4f6
5b4e4f6
5b4e4f6
%changelog
Timothée Floure e7643e8
* Tue Nov 28 2017 Timothée Floure <timothee.floure@fnux.ch> - 1.0.4-1
Timothée Floure e7643e8
- Rebase to 1.0.4
Timothée Floure e7643e8
Timothée Floure ce02c23
* Tue Nov 14 2017 Timothée Floure <timothee.floure@fnux.ch> - 1.0.3-2
Timothée Floure ce02c23
- Fix typos in some (weak) Qt dependencies
Timothée Floure ce02c23
Timothée Floure 04bff56
* Tue Nov 07 2017 Timothée Floure <timothee.floure@fnux.ch> - 1.0.3-1
Timothée Floure 04bff56
- Rebase to 1.0.3
Timothée Floure 04bff56
- Fix dependency issue for architectures unsupported by qt5-qtwebengine
Timothée Floure 25e23b1
Timothée Floure 5f013f2
* Fri Oct 20 2017 Timothée Floure <timothee.floure@fnux.ch> - 1.0.2-1
Timothée Floure 5f013f2
- Rebase to 1.0.2
Timothée Floure 5f013f2
- Remove the deprecated Group tag
Timothée Floure 5f013f2
- Add the python3-attrs dependency
Timothée Floure 5f013f2
- Adapt the descriptions and dependencies to the QtWebEngine backend (new default)
Timothée Floure 5f013f2
- Doc tag: do not package the PKG-INFO file anymore
Timothée Floure 4a049e3
- Doc tag: package the full HTML documentation instead of sparse asciidoc files
Timothée Floure 5f013f2
5f1427f
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.1-2
5f1427f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5f1427f
e246892
* Tue Mar 14 2017 Tomas Orsava <torsava@redhat.com> - 0.10.1-1
e246892
- Rebased to 0.10.1
e246892
cf50d74
* Mon Feb 27 2017 Tomas Orsava <torsava@redhat.com> - 0.10.0-1
cf50d74
- Rebased to 0.10.0
cf50d74
- Updated Source URL
cf50d74
8303859
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-2
8303859
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8303859
8ed2f73
* Mon Jan 16 2017 Tomas Orsava <torsava@redhat.com> - 0.9.1-1
8ed2f73
- Rebased to 0.9.1
8ed2f73
e6ac386
* Mon Jan 02 2017 Tomas Orsava <torsava@redhat.com> - 0.9.0-1
e6ac386
- Rebased to 0.9.0
e6ac386
cca8144
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.8.4-2
cca8144
- Rebuild for Python 3.6
cca8144
915027a
* Fri Aug 05 2016 Tomas Orsava <torsava@redhat.com> - 0.8.2-1
915027a
- New upstream release 0.8.2
915027a
67b634d
* Thu Jul 28 2016 Tomas Orsava <torsava@redhat.com> - 0.8.1-1
67b634d
- Rebased onto a new upstream version
67b634d
49f3af4
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-2
49f3af4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
49f3af4
5f5494f
* Mon Jun 13 2016 Tomas Orsava <torsava@redhat.com> - 0.7.0-1
5f5494f
- Updated to a new version
5f5494f
- Removed soft dependency on `colorama` as it is no longer needed
5f5494f
e571f61
* Fri May 06 2016 Tomas Orsava <torsava@redhat.com> - 0.6.2-1
e571f61
- Updated to a new upstream version.
e571f61
- Remover patches specific to the version 0.6.1
e571f61
190c422
* Wed Apr 27 2016 Tomas Orsava <torsava@redhat.com> - 0.6.1-2
190c422
- Added 3 upstream patches from the mailing list to help with PyQT crashes
190c422
  until 0.6.2 comes out.
190c422
74034ca
* Tue Apr 12 2016 Tomas Orsava <torsava@redhat.com> - 0.6.1-1
6894ac9
- Updated to a new upstream version.
74034ca
- Simplified the sed command that replaces shebangs.
74034ca
- Fixed issue with python3-qt5-webkit not being provided by python-qt5 in f23.
6894ac9
Rex Dieter a4fcd9a
* Wed Mar 02 2016 Rex Dieter <rdieter@fedoraproject.org> 0.5.1-2
Rex Dieter a4fcd9a
- Requires: python3-qt5-webkit
Rex Dieter a4fcd9a
5b4e4f6
* Mon Feb 22 2016 Tomas Orsava <torsava@redhat.com> - 0.5.1-1
5b4e4f6
- Let there be package.
5b4e4f6