Version 0.5.0.
- Drop upstreamed -script patch. - Do not even link to fonts; modify the CSS to point to system fonts. - Remove all traces of html5shiv.
This commit is contained in:
parent
786bb93487
commit
d39884a9f6
|
@ -0,0 +1,58 @@
|
|||
--- package.json.orig 2020-06-17 09:58:25.000000000 -0600
|
||||
+++ package.json 2020-12-10 08:27:04.247691945 -0700
|
||||
@@ -16,7 +16,6 @@
|
||||
"css-loader": "^3.1.0",
|
||||
"file-loader": "^3.0.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
- "html5shiv": "^3.7.3",
|
||||
"imports-loader": "^0.8.0",
|
||||
"jquery": "^3.4.1",
|
||||
"lato-font": "^3.0.0",
|
||||
--- package-lock.json.orig 2020-06-17 09:58:25.000000000 -0600
|
||||
+++ package-lock.json 2020-12-10 08:27:28.658644927 -0700
|
||||
@@ -3614,12 +3614,6 @@
|
||||
"integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=",
|
||||
"dev": true
|
||||
},
|
||||
- "html5shiv": {
|
||||
- "version": "3.7.3",
|
||||
- "resolved": "https://registry.npmjs.org/html5shiv/-/html5shiv-3.7.3.tgz",
|
||||
- "integrity": "sha1-14qEo2e8uacQEA1XgCw4ewhGMdI=",
|
||||
- "dev": true
|
||||
- },
|
||||
"http-deceiver": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
|
||||
--- sphinx_rtd_theme/layout.html.orig 2020-06-17 09:58:25.000000000 -0600
|
||||
+++ sphinx_rtd_theme/layout.html 2020-12-10 08:28:12.607551700 -0700
|
||||
@@ -45,9 +45,6 @@
|
||||
|
||||
{# JAVASCRIPTS #}
|
||||
{%- block scripts %}
|
||||
- <!--[if lt IE 9]>
|
||||
- <script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
|
||||
- <![endif]-->
|
||||
{%- if not embedded %}
|
||||
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
|
||||
{% if sphinx_version >= "1.8.0" %}
|
||||
--- webpack.common.js.orig 2020-06-17 09:58:25.000000000 -0600
|
||||
+++ webpack.common.js 2020-12-10 08:26:44.191730575 -0700
|
||||
@@ -1,6 +1,5 @@
|
||||
const path = require("path");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
-const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
@@ -66,11 +65,5 @@ module.exports = {
|
||||
filename: "css/[name].css?[hash]",
|
||||
chunkFilename: "css/[name].css?[hash]"
|
||||
}),
|
||||
- new CopyPlugin([
|
||||
- {
|
||||
- from: 'node_modules/html5shiv/dist/*.min.js',
|
||||
- flatten: true,
|
||||
- to: path.resolve(__dirname,'sphinx_rtd_theme/static/js') },
|
||||
- ]),
|
||||
]
|
||||
};
|
|
@ -1,39 +0,0 @@
|
|||
Remove deprecated use of script_files
|
||||
|
||||
Fixes sphinx-doc/sphinx#6088
|
||||
|
||||
* Add script block
|
||||
* Fix build error
|
||||
|
||||
--- sphinx_rtd_theme/layout.html.orig 2019-02-12 12:37:47.000000000 -0700
|
||||
+++ sphinx_rtd_theme/layout.html 2019-08-06 09:02:26.103136905 -0600
|
||||
@@ -29,6 +29,7 @@
|
||||
{% endif %}
|
||||
|
||||
{# JAVASCRIPTS #}
|
||||
+ {%- block scripts %}
|
||||
<script type="text/javascript" src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>
|
||||
{%- if not embedded %}
|
||||
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
|
||||
@@ -62,6 +63,7 @@
|
||||
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
+ {%- endblock %}
|
||||
|
||||
{# CSS #}
|
||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||
--- sphinx_rtd_theme/search.html.orig 2019-02-12 12:37:47.000000000 -0700
|
||||
+++ sphinx_rtd_theme/search.html 2019-08-06 09:03:25.597117851 -0600
|
||||
@@ -9,7 +9,10 @@
|
||||
#}
|
||||
{%- extends "layout.html" %}
|
||||
{% set title = _('Search') %}
|
||||
-{% set script_files = script_files + ['_static/searchtools.js'] %}
|
||||
+{%- block scripts %}
|
||||
+ {{ super() }}
|
||||
+ <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
|
||||
+{%- endblock %}
|
||||
{% block footer %}
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
|
File diff suppressed because one or more lines are too long
|
@ -4,8 +4,8 @@
|
|||
%bcond_with bootstrap
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.4.3
|
||||
Release: 14%{?dist}
|
||||
Version: 0.5.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Sphinx theme for readthedocs.org
|
||||
|
||||
License: MIT
|
||||
|
@ -14,22 +14,26 @@ Source0: https://github.com/rtfd/%{srcname}/archive/%{version}/%{srcname}
|
|||
# The koji builders do not have network access, and this file is not included
|
||||
# in any Fedora package, so we retrieve it for offline use.
|
||||
Source1: https://docs.readthedocs.io/en/latest/objects.inv
|
||||
# Remove deprecated use of script_files. See:
|
||||
# - https://github.com/readthedocs/sphinx_rtd_theme/pull/728
|
||||
# - https://github.com/readthedocs/sphinx_rtd_theme/commit/a49a812c8821123091166fae1897d702cdc2d627
|
||||
Patch0: %{name}-script.patch
|
||||
# Remove all traces of html5shiv. We have no interest in supporting ancient
|
||||
# versions of Internet Explorer.
|
||||
Patch0: %{name}-html5shiv.patch
|
||||
# Unbundle fonts. Refer to local fonts instead.
|
||||
Patch1: %{name}-unbundle-fonts.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: font(fontawesome)
|
||||
BuildRequires: font(lato)
|
||||
BuildRequires: font(robotoslab)
|
||||
BuildRequires: make
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3dist(docutils)
|
||||
BuildRequires: python3dist(setuptools)
|
||||
BuildRequires: %{py3_dist docutils}
|
||||
BuildRequires: %{py3_dist readthedocs-sphinx-ext}
|
||||
BuildRequires: %{py3_dist setuptools}
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: python3dist(pytest)
|
||||
BuildRequires: python3dist(readthedocs-sphinx-ext)
|
||||
BuildRequires: python3dist(sphinx)
|
||||
BuildRequires: python3dist(sphinxcontrib-httpdomain)
|
||||
BuildRequires: %{py3_dist pytest}
|
||||
BuildRequires: %{py3_dist sphinx}
|
||||
BuildRequires: %{py3_dist sphinxcontrib-httpdomain}
|
||||
BuildRequires: python-sphinx-doc
|
||||
%endif
|
||||
|
||||
|
@ -41,13 +45,10 @@ of that site.
|
|||
|
||||
%package -n python3-%{srcname}
|
||||
Summary: Sphinx theme for readthedocs.org
|
||||
Requires: fontawesome-fonts-web
|
||||
Requires: font(fontawesome)
|
||||
Requires: font(lato)
|
||||
Requires: font(robotoslab)
|
||||
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
|
||||
%description -n python3-%{srcname}
|
||||
This is a prototype mobile-friendly sphinx theme for readthedocs.org.
|
||||
It's currently in development and includes some rtd variable checks that
|
||||
|
@ -57,7 +58,6 @@ of that site.
|
|||
%if %{without bootstrap}
|
||||
%package doc
|
||||
Summary: Documentation for the Sphinx theme for readthedocs.org
|
||||
Requires: fontawesome-fonts-web
|
||||
Requires: font(fontawesome)
|
||||
Requires: font(lato)
|
||||
Requires: font(robotoslab)
|
||||
|
@ -75,6 +75,14 @@ sed -e "s|\('https://docs\.readthedocs\.io/en/latest/', \)None|\1'%{SOURCE1}'|"
|
|||
-e "s|\('http://www\.sphinx-doc\.org/en/stable/', \)None|\1'%{_docdir}/python-sphinx-doc/html/objects.inv'|" \
|
||||
-i docs/conf.py
|
||||
|
||||
# We cannot build the Javascript from source at this time, due to many missing
|
||||
# dependencies. Convince the build script to skip building the Javascript and
|
||||
# go on to the python.
|
||||
mkdir -p build/lib/%{srcname}/static/js
|
||||
cp -p sphinx_rtd_theme/static/js/badge_only.js build/lib/%{srcname}/static/js
|
||||
cp -p sphinx_rtd_theme/static/js/theme.js build/lib/%{srcname}/static/js
|
||||
sed -i "/'build_py'/d" setup.py
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
|
@ -88,40 +96,21 @@ rst2html --no-datestamp README.rst README.html
|
|||
%install
|
||||
%py3_install
|
||||
|
||||
# Link to the required fonts and copy the parts not shipped by Fedora
|
||||
pushd %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts
|
||||
mkdir Lato RobotoSlab
|
||||
rm -f fontawesome-webfont.*
|
||||
ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.eot .
|
||||
ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.svg .
|
||||
ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.ttf .
|
||||
ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.woff .
|
||||
ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.woff2 .
|
||||
ln -s %{_datadir}/fonts/google-roboto-slab-fonts/RobotoSlab-Bold.ttf RobotoSlab/roboto-slab-v7-bold.ttf
|
||||
ln -s %{_datadir}/fonts/google-roboto-slab-fonts/RobotoSlab-Regular.ttf RobotoSlab/roboto-slab-v7-regular.ttf
|
||||
ln -s %{_datadir}/fonts/lato/Lato-Bold.ttf Lato/lato-bold.ttf
|
||||
ln -s %{_datadir}/fonts/lato/Lato-BoldItalic.ttf Lato/lato-bolditalic.ttf
|
||||
ln -s %{_datadir}/fonts/lato/Lato-Italic.ttf Lato/lato-italic.ttf
|
||||
ln -s %{_datadir}/fonts/lato/Lato-Regular.ttf Lato/lato-regular.ttf
|
||||
popd
|
||||
cp -p fonts/RobotoSlab/*.{eot,woff,woff2} \
|
||||
%{buildroot}%{python3_sitelib}/%{srcname}/static/fonts/RobotoSlab
|
||||
cp -p fonts/Lato/*.{eot,woff,woff2} \
|
||||
%{buildroot}%{python3_sitelib}/%{srcname}/static/fonts/Lato
|
||||
|
||||
%if %{without bootstrap}
|
||||
rm docs/build/html/.buildinfo
|
||||
rm -fr docs/build/html/_static/fonts
|
||||
cp -a %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts \
|
||||
docs/build/html/_static
|
||||
%endif
|
||||
|
||||
# Unbundle fonts
|
||||
rm -fr %{buildroot}%{python3_sitelib}/%{srcname}/static/css/fonts
|
||||
|
||||
%find_lang sphinx
|
||||
|
||||
%if %{without bootstrap}
|
||||
%check
|
||||
pytest
|
||||
%endif
|
||||
|
||||
%files -n python3-%{srcname}
|
||||
%files -n python3-%{srcname} -f sphinx.lang
|
||||
%doc README.html
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/%{srcname}*
|
||||
|
@ -133,6 +122,12 @@ pytest
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Dec 10 2020 Jerry James <loganjerry@gmail.com> - 0.5.0-1
|
||||
- Version 0.5.0
|
||||
- Drop upstreamed -script patch
|
||||
- Do not even link to fonts; modify the CSS to point to system fonts
|
||||
- Remove all traces of html5shiv
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.3-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
|
4
sources
4
sources
|
@ -1,2 +1,2 @@
|
|||
SHA512 (sphinx_rtd_theme-0.4.3.tar.gz) = 6e5d4d0c44ea8acdf382dd589a194be2777e4c4f66f27705eb32d0507cf71b9d289df860bc3d9845242629cd92d62154040f9063f1c05ff6f329e210e14a6a9a
|
||||
SHA512 (objects.inv) = 29b2885c23f0d9697f6fa88ded72d7d622a0807ea34f4fe04fefe3809dc44486333cdfade4dc5bc99d18ff50423f6291d63d704c5a74b1d755eb52fbbc617c08
|
||||
SHA512 (sphinx_rtd_theme-0.5.0.tar.gz) = e5d3f653649f10bcbb953fa18fe79f2b8663da205cc6c6d4ee702789b86de19ac525065b214e3e419e0a34feda35e54b3abd5e82b2a5e657821675125dc9dfdc
|
||||
SHA512 (objects.inv) = 2a6b9ccf97dccc43e448ab7744335dd3a7103de9505c17d809219aeab85177d910f91cb53909198f1f3b2676d4168f0784ab8235047603f11aa36c5488bd4c5c
|
||||
|
|
Loading…
Reference in New Issue