Name: mkdocs
Version: 0.16.3
Release: 5%{?dist}
Summary: Python tool to create HTML documentation from markdown sources
License: BSD
URL: http://www.mkdocs.org/
Source0: https://github.com/%{name}/%{name}/archive/%{version}.tar.gz
#https://github.com/mkdocs/mkdocs/pull/687
Source1: mkdocs.1
BuildArch: noarch
BuildRequires: python3-setuptools
BuildRequires: python3-devel
BuildRequires: python3-tornado
BuildRequires: python3-PyYAML
BuildRequires: python3-markdown
BuildRequires: python3-jinja2
BuildRequires: python3-click
BuildRequires: livereload
BuildRequires: fontawesome-fonts
BuildRequires: fontawesome-fonts-web
BuildRequires: js-highlight
BuildRequires: mkdocs-bootstrap
BuildRequires: mkdocs-bootswatch
BuildRequires: mkdocs-cinder
BuildRequires: mkdocs-material
BuildRequires: js-jquery
BuildRequires: js-jquery1
# Force file requeriments to avoid broken sym links.
BuildRequires: /usr/share/fonts/fontawesome/FontAwesome.otf
BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.svg
BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.ttf
BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.woff
BuildRequires: /usr/share/javascript/highlight.js/highlight.pack.js
BuildRequires: /usr/share/javascript/jquery/1.12.4/jquery.min.js
BuildRequires: /usr/share/fonts/fontawesome/FontAwesome.otf
BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.svg
BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.ttf
BuildRequires: /usr/share/fonts/fontawesome/fontawesome-webfont.woff
BuildRequires: /usr/share/javascript/highlight.js/highlight.pack.js
BuildRequires: /usr/share/javascript/jquery/3.2.1/jquery.min.js
Requires: python3-tornado
Requires: python3-PyYAML
Requires: python3-markdown
Requires: python3-jinja2
Requires: python3-click
Requires: livereload
Requires: fontawesome-fonts
Requires: fontawesome-fonts-web
Requires: js-highlight
Requires: mkdocs-bootstrap
Requires: mkdocs-bootswatch
Requires: js-jquery
Requires: js-jquery1
Enhances: mkdocs-alabaster
Enhances: mkdocs-cinder
Enhances: mkdocs-material
Suggests: mkdocs-basic-theme
%package docs
Summary: Documentantion for %{name}
%description
MkDocs is a fast and simple way to create a website from source files written
in Markdown, and configured with a YAML configuration file, the documentation
can be hosted anywhere, even in free hosting services like Read the Docs and
GitHub Pages.
%description docs
Documentation for %{name}.
%prep
%setup -q -n %{name}-%{version}
rm -rf %{name}.egg.info
find %{_builddir}/%{name}-%{version} -name '*.py' \
-exec sed -i '1{\@^#!/usr/bin/env python@d}' {} \;
rm -rf mkdocs/themes/*/fonts/fontawesome-webfont.*
rm -rf mkdocs/themes/*/js/highlight.pack.js
sed -i 1d %{_builddir}/%{name}-%{version}/%{name}/utils/ghp_import.py
%build
%py3_build
%install
%py3_install
mkdir -p %{buildroot}/%{_mandir}/man1
install -p -m 0644 %{SOURCE1} %{buildroot}/%{_mandir}/man1/
themes="mkdocs readthedocs"
for theme in $themes
do
mkdir -p %{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/
ln -sf %{_datadir}/fonts/fontawesome/FontAwesome.otf \
%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/
ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.svg \
%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/
ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.ttf \
%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/
ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.woff \
%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/fonts/
ln -sf %{_datadir}/javascript/highlight.js/highlight.pack.js \
%{buildroot}/%{python3_sitelib}/%{name}/themes/$theme/js/
done
ln -sf %{_datadir}/javascript/jquery/latest/jquery.min.js \
%{buildroot}/%{python3_sitelib}/%{name}/themes/readthedocs/js/jquery-2.1.1.min.js
ln -sf %{_datadir}/javascript/jquery/1/jquery.min.js \
%{buildroot}/%{python3_sitelib}/%{name}/themes/mkdocs/js/jquery-1.10.2.min.js
# Build docs with self and verify all works fine.
PATH=%{buildroot}%{_bindir}:$PATH
which mkdocs
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
touch mkdocs.yml
mkdocs build
%check
# Verify if docs build fine with this version available.
# This help to check if all symlinks work fine.
PATH=%{buildroot}%{_bindir}:$PATH
which mkdocs
test_themes="cinder material readthedocs amelia cerulean cosmo \
cyborg flatly journal readable simplex slate spacelab united yeti \
bootstrap"
mkdocs new testing
pushd testing
for theme in $test_themes
do
mkdocs build --theme $theme
done
popd
%files
%doc README.md
%license LICENSE
%{_bindir}/*
%{_mandir}/man1/*
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info
%files docs
%license LICENSE
%doc site/*
%changelog
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Oct 13 2017 williamjmorenor@gmail.com - 0.16.3-4
- Force BuildRequeriments to specific files to avoid
broken symlinks in the user system, this should catch
missing files to specific themes
* Fri Oct 06 2017 williamjmorenor@gmail.com - 0.16.3-3
- Build docs with self to check for broken symlinks
See: https://bugzilla.redhat.com/show_bug.cgi?id=1497654
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Jun 06 2017 William Moreno <williamjmorenor@gmail.com> - 0.16.3-1
- Update to 0.16.3 upstream release
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jan 20 2017 William Moreno <williamjmorenor@gmail.com> - 0.16.1-2
- Bootstrapping 0.16.1 in F25
* Thu Jan 12 2017 William Moreno <williamjmorenor@gmail.com> - 0.16.1-1
- Update to v0.16.1
* Tue Dec 20 2016 Miro Hrončok <mhroncok@redhat.com> - 0.15.3-7
- Build the docs with self (was disabled for bootstrapping)
* Tue Dec 20 2016 Miro Hrončok <mhroncok@redhat.com> - 0.15.3-6
- Change so it will use the available version of jquery1
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.15.3-5
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.3-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Fri Jun 03 2016 William Moreno <williamjmorenor@gmail.com> - 0.15.3-3
- Unbundle jquery libs
* Fri Apr 08 2016 William Moreno <williamjmorenor@gmail.com> - 0.15.3-2
- Updates requires
- List avaiables themes as enhances
* Fri Apr 08 2016 William Moreno <williamjmorenor@gmail.com> - 0.15.3-1
- Update to v0.15.3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Nov 15 2015 William Moreno <williamjmorenor@gmail.com> - 0.14.0-8
- fedoraproject.org/wiki/FAD_Python_3_Porting_2015
- disable test
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.0-7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Fri Jul 31 2015 Fedora <williamjmorenor@gmail.com>
- 0.14.0-6
- Update Python macros
* Mon Jul 27 2015 William Moreno Reyes <williamjmorenor at gmail.com>
- 0.14.0-5
- Initial import of #1230963
- Fix BuildRequires