|
|
c63388e |
Name: mkdocs
|
|
|
05876a3 |
Version: 1.1
|
|
|
05876a3 |
Release: 4%{?dist}
|
|
|
c63388e |
Summary: Python tool to create HTML documentation from markdown sources
|
|
|
c63388e |
|
|
|
05876a3 |
# The entire source code is BSD except mkdocs/utils/ghp_import.py
|
|
|
05876a3 |
# which is Tumbolia
|
|
|
05876a3 |
License: BSD and Tumbolia
|
|
|
c63388e |
URL: http://www.mkdocs.org/
|
|
|
05876a3 |
Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
c63388e |
|
|
|
c63388e |
BuildArch: noarch
|
|
|
c63388e |
|
|
|
c63388e |
BuildRequires: python3-devel
|
|
|
05876a3 |
BuildRequires: python3dist(setuptools)
|
|
|
05876a3 |
|
|
|
05876a3 |
BuildRequires: python3dist(click) >= 3.3
|
|
|
05876a3 |
BuildRequires: python3dist(jinja2) >= 2.10.1
|
|
|
05876a3 |
BuildRequires: python3dist(livereload) >= 2.5.1
|
|
|
05876a3 |
BuildRequires: python3dist(markdown) >= 3.2.1
|
|
|
05876a3 |
BuildRequires: python3dist(pyyaml) >= 3.10
|
|
|
05876a3 |
BuildRequires: python3dist(tornado) >= 5
|
|
|
05876a3 |
BuildRequires: python3dist(mdx-gh-links) >= 0.2
|
|
|
05876a3 |
BuildRequires: python3dist(nltk) >= 3.2.5
|
|
|
05876a3 |
BuildRequires: python3dist(lunr) = 0.5.6
|
|
|
05876a3 |
BuildRequires: /usr/bin/coverage
|
|
|
05876a3 |
|
|
|
05876a3 |
BuildRequires: js-jquery2
|
|
|
05876a3 |
BuildRequires: js-jquery1
|
|
|
c63388e |
BuildRequires: fontawesome-fonts
|
|
|
c63388e |
BuildRequires: fontawesome-fonts-web
|
|
|
05876a3 |
BuildRequires: lato-fonts
|
|
|
05876a3 |
BuildRequires: bootswatch-fonts
|
|
|
05876a3 |
BuildRequires: google-roboto-slab-fonts
|
|
|
c63388e |
|
|
|
05876a3 |
Recommends: mkdocs-bootstrap
|
|
|
05876a3 |
Recommends: mkdocs-bootswatch
|
|
|
05876a3 |
# the last version of mkdocs-basic-theme before being retired
|
|
|
05876a3 |
Obsoletes: mkdocs-basic-theme <= 1.0.1
|
|
|
c63388e |
|
|
|
05876a3 |
# runtime deps not auto generated
|
|
|
05876a3 |
Requires: python3dist(nltk) >= 3.2.5
|
|
|
05876a3 |
Requires: python3dist(mdx-gh-links) >= 0.2
|
|
|
c63388e |
|
|
|
05876a3 |
Requires: js-jquery2
|
|
|
05876a3 |
Requires: js-jquery1
|
|
|
05876a3 |
Requires: fontawesome-fonts
|
|
|
05876a3 |
Requires: fontawesome-fonts-web
|
|
|
05876a3 |
Requires: lato-fonts
|
|
|
05876a3 |
Requires: bootswatch-fonts
|
|
|
05876a3 |
Requires: google-roboto-slab-fonts
|
|
|
c63388e |
|
|
|
c63388e |
%description
|
|
|
c63388e |
MkDocs is a fast and simple way to create a website from source files written
|
|
|
c63388e |
in Markdown, and configured with a YAML configuration file, the documentation
|
|
|
c63388e |
can be hosted anywhere, even in free hosting services like Read the Docs and
|
|
|
c63388e |
GitHub Pages.
|
|
|
c63388e |
|
|
|
05876a3 |
%package docs
|
|
|
05876a3 |
Summary: Documentantion for %{name}
|
|
|
05876a3 |
Requires: %{name} == %{version}-%{release}
|
|
|
05876a3 |
|
|
|
c63388e |
%description docs
|
|
|
c63388e |
Documentation for %{name}.
|
|
|
c63388e |
|
|
|
c63388e |
%prep
|
|
|
05876a3 |
%autosetup -p1
|
|
|
c63388e |
|
|
|
c63388e |
rm -rf %{name}.egg.info
|
|
|
c63388e |
|
|
|
05876a3 |
find . -name '*.py' \
|
|
|
c63388e |
-exec sed -i '1{\@^#!/usr/bin/env python@d}' {} \;
|
|
|
c63388e |
|
|
|
c63388e |
sed -i 1d %{_builddir}/%{name}-%{version}/%{name}/utils/ghp_import.py
|
|
|
c63388e |
|
|
|
c63388e |
%build
|
|
|
c63388e |
%py3_build
|
|
|
c63388e |
|
|
|
c63388e |
%install
|
|
|
c63388e |
%py3_install
|
|
|
c63388e |
|
|
|
05876a3 |
# replace bundled fonts to symlink to ones under %%{_datadir}/fonts
|
|
|
05876a3 |
|
|
|
05876a3 |
# fonts not available under %%{_datadir}/fonts
|
|
|
05876a3 |
fonts_not_replaced="lato-bold.eot lato-bold.woff lato-bold.woff2
|
|
|
05876a3 |
lato-regular.eot lato-regular.woff2 lato-italic.eot lato-italic.woff
|
|
|
05876a3 |
lato-italic.woff2 lato-bolditalic.eot lato-bolditalic.woff2 roboto-slab.eot
|
|
|
05876a3 |
roboto-slab-v7-regular.woff2 roboto-slab-v7-bold.woff roboto-slab-v7-regular.eot
|
|
|
05876a3 |
roboto-slab-v7-bold.eot roboto-slab-v7-regular.woff roboto-slab-v7-bold.woff2"
|
|
|
05876a3 |
|
|
|
05876a3 |
for to_replace in $(find %{buildroot}/%{python3_sitelib}/%{name}/themes/*/fonts -type f); do
|
|
|
05876a3 |
font=$(basename $to_replace)
|
|
|
05876a3 |
if [ $font = roboto-slab-v7-regular.ttf ]; then
|
|
|
05876a3 |
font=RobotoSlab-Regular.ttf
|
|
|
05876a3 |
fi
|
|
|
05876a3 |
if [ $font = roboto-slab-v7-bold.ttf ]; then
|
|
|
05876a3 |
font=RobotoSlab-Bold.ttf
|
|
|
05876a3 |
fi
|
|
|
05876a3 |
target="$(find %{_datadir}/fonts -iname $font)"
|
|
|
05876a3 |
if [ -f "$target" ]; then
|
|
|
05876a3 |
realdir=$(dirname $to_replace |sed 's:%{buildroot}::')
|
|
|
05876a3 |
ln -vsf $(realpath --canonicalize-missing --relative-to=$realdir $target) \
|
|
|
05876a3 |
$to_replace
|
|
|
05876a3 |
else
|
|
|
05876a3 |
if echo $fonts_not_replaced|grep -q $font; then
|
|
|
05876a3 |
echo "Skip $to_replace"
|
|
|
05876a3 |
else
|
|
|
05876a3 |
echo target of $to_replace does not exist
|
|
|
05876a3 |
exit 1
|
|
|
05876a3 |
fi
|
|
|
05876a3 |
fi
|
|
|
c63388e |
done
|
|
|
c63388e |
|
|
|
05876a3 |
if [ -f %{buildroot}/%{python3_sitelib}/%{name}/themes/readthedocs/js/jquery-2.1.1.min.js ]; then
|
|
|
05876a3 |
ln -vsf $(realpath --canonicalize-missing --relative-to=%{python3_sitelib}/%{name}/themes/readthedocs/js %{_datadir}/javascript/jquery/2/jquery.min.js) \
|
|
|
05876a3 |
%{buildroot}/%{python3_sitelib}/%{name}/themes/readthedocs/js/jquery-2.1.1.min.js
|
|
|
05876a3 |
else
|
|
|
05876a3 |
echo %{buildroot}/%{python3_sitelib}/%{name}/themes/readthedocs/js/jquery-2.1.1.min.js is removed upstream
|
|
|
05876a3 |
exit 1
|
|
|
05876a3 |
fi
|
|
|
05876a3 |
|
|
|
05876a3 |
if [ -f %{buildroot}/%{python3_sitelib}/%{name}/themes/mkdocs/js/jquery-1.10.2.min.js ]; then
|
|
|
05876a3 |
ln -vsf $(realpath --canonicalize-missing --relative-to=%{python3_sitelib}/%{name}/themes/mkdocs/js %{_datadir}/javascript/jquery/1/jquery.min.js) \
|
|
|
05876a3 |
%{buildroot}/%{python3_sitelib}/%{name}/themes/mkdocs/js/jquery-1.10.2.min.js
|
|
|
05876a3 |
else
|
|
|
05876a3 |
echo %{buildroot}/%{python3_sitelib}/%{name}/themes/mkdocs/js/jquery-1.10.2.min.js is removed upstream
|
|
|
05876a3 |
exit 1
|
|
|
05876a3 |
fi
|
|
|
05876a3 |
|
|
|
05876a3 |
# Build docs
|
|
|
c63388e |
export LC_ALL=C.UTF-8
|
|
|
c63388e |
export LANG=C.UTF-8
|
|
|
c63388e |
touch mkdocs.yml
|
|
|
05876a3 |
PYTHONPATH=$PWD %{__python3} -m mkdocs build
|
|
|
c63388e |
|
|
|
c63388e |
%check
|
|
|
05876a3 |
# extract from tox.ini
|
|
|
05876a3 |
PYTHONPATH=$PWD coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest \
|
|
|
05876a3 |
discover -p '*tests.py' mkdocs
|
|
|
c63388e |
|
|
|
c63388e |
%files
|
|
|
c63388e |
%doc README.md
|
|
|
c63388e |
%license LICENSE
|
|
|
c63388e |
%{_bindir}/*
|
|
|
c63388e |
%{python3_sitelib}/%{name}
|
|
|
c63388e |
%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info
|
|
|
c63388e |
|
|
|
c63388e |
%files docs
|
|
|
c63388e |
%doc site/*
|
|
|
c63388e |
|
|
|
c63388e |
%changelog
|
|
|
05876a3 |
* Tue Mar 24 2020 Robin Lee <cheeselee@fedoraproject.org> - 1.1-4
|
|
|
05876a3 |
- Drop explicit lunr requirement
|
|
|
05876a3 |
- License specified to BSD and Tumbolia
|
|
|
05876a3 |
|
|
|
05876a3 |
* Mon Mar 23 2020 Robin Lee <cheeselee@fedoraproject.org> - 1.1-3
|
|
|
05876a3 |
- Add symlinks to the Roboto fonts.
|
|
|
05876a3 |
|
|
|
05876a3 |
* Sun Mar 8 2020 Robin Lee <cheeselee@fedoraproject.org> - 1.1-2
|
|
|
05876a3 |
- Requires python3dist(lunr) python3dist(nltk)
|
|
|
05876a3 |
- Obsoletes mkdocs-basic-theme
|
|
|
05876a3 |
|
|
|
05876a3 |
* Sun Mar 8 2020 Robin Lee <cheeselee@fedoraproject.org> - 1.1-1
|
|
|
05876a3 |
- Update to 1.1
|
|
|
05876a3 |
- Don't include the external manpage
|
|
|
05876a3 |
- Build docs subpackage with current source, so no bootstrap is required
|
|
|
05876a3 |
- Don't BR full paths
|
|
|
05876a3 |
- Recommends instead of Requires external themes
|
|
|
05876a3 |
|
|
|
c63388e |
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-10
|
|
|
c63388e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-9
|
|
|
c63388e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-8
|
|
|
c63388e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
c63388e |
|
|
|
c63388e |
* Mon Jul 09 2018 Miro Hrončok <mhroncok@redhat.com> - 0.16.3-7
|
|
|
c63388e |
- Rebuilt for Python 3.7
|
|
|
c63388e |
|
|
|
c63388e |
* Mon Jul 09 2018 Miro Hrončok <mhroncok@redhat.com> - 0.16.3-6
|
|
|
c63388e |
- Bootstrap for Python 3.7
|
|
|
c63388e |
- Add patch for Python 3.7 compatibility
|
|
|
c63388e |
|
|
|
c63388e |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-5
|
|
|
c63388e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Oct 13 2017 williamjmorenor@gmail.com - 0.16.3-4
|
|
|
c63388e |
- Force BuildRequeriments to specific files to avoid
|
|
|
c63388e |
broken symlinks in the user system, this should catch
|
|
|
c63388e |
missing files to specific themes
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Oct 06 2017 williamjmorenor@gmail.com - 0.16.3-3
|
|
|
c63388e |
- Build docs with self to check for broken symlinks
|
|
|
c63388e |
See: https://bugzilla.redhat.com/show_bug.cgi?id=1497654
|
|
|
c63388e |
|
|
|
c63388e |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-2
|
|
|
c63388e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
c63388e |
|
|
|
c63388e |
* Tue Jun 06 2017 William Moreno <williamjmorenor@gmail.com> - 0.16.3-1
|
|
|
c63388e |
- Update to 0.16.3 upstream release
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-3
|
|
|
c63388e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Jan 20 2017 William Moreno <williamjmorenor@gmail.com> - 0.16.1-2
|
|
|
c63388e |
- Bootstrapping 0.16.1 in F25
|
|
|
c63388e |
|
|
|
c63388e |
* Thu Jan 12 2017 William Moreno <williamjmorenor@gmail.com> - 0.16.1-1
|
|
|
c63388e |
- Update to v0.16.1
|
|
|
c63388e |
|
|
|
c63388e |
* Tue Dec 20 2016 Miro Hrončok <mhroncok@redhat.com> - 0.15.3-7
|
|
|
c63388e |
- Build the docs with self (was disabled for bootstrapping)
|
|
|
c63388e |
|
|
|
c63388e |
* Tue Dec 20 2016 Miro Hrončok <mhroncok@redhat.com> - 0.15.3-6
|
|
|
c63388e |
- Change so it will use the available version of jquery1
|
|
|
c63388e |
|
|
|
c63388e |
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.15.3-5
|
|
|
c63388e |
- Rebuild for Python 3.6
|
|
|
c63388e |
|
|
|
c63388e |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.3-4
|
|
|
c63388e |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Jun 03 2016 William Moreno <williamjmorenor@gmail.com> - 0.15.3-3
|
|
|
c63388e |
- Unbundle jquery libs
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Apr 08 2016 William Moreno <williamjmorenor@gmail.com> - 0.15.3-2
|
|
|
c63388e |
- Updates requires
|
|
|
c63388e |
- List avaiables themes as enhances
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Apr 08 2016 William Moreno <williamjmorenor@gmail.com> - 0.15.3-1
|
|
|
c63388e |
- Update to v0.15.3
|
|
|
c63388e |
|
|
|
c63388e |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-9
|
|
|
c63388e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
c63388e |
|
|
|
c63388e |
* Sun Nov 15 2015 William Moreno <williamjmorenor@gmail.com> - 0.14.0-8
|
|
|
c63388e |
- fedoraproject.org/wiki/FAD_Python_3_Porting_2015
|
|
|
c63388e |
- disable test
|
|
|
c63388e |
|
|
|
c63388e |
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.0-7
|
|
|
c63388e |
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
c63388e |
|
|
|
c63388e |
* Fri Jul 31 2015 Fedora <williamjmorenor@gmail.com>
|
|
|
c63388e |
- 0.14.0-6
|
|
|
c63388e |
- Update Python macros
|
|
|
c63388e |
|
|
|
c63388e |
* Mon Jul 27 2015 William Moreno Reyes <williamjmorenor at gmail.com>
|
|
|
c63388e |
- 0.14.0-5
|
|
|
c63388e |
- Initial import of #1230963
|
|
|
c63388e |
- Fix BuildRequires
|