Blob Blame History Raw
Name:           mkdocs
Version:        0.15.3
Release:        4%{?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:  js-jquery
BuildRequires:  js-jquery1

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}
BuildRequires:  mkdocs

%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.

MkDocs is Python powered, this package is built with Python 3.

%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.11.2/jquery.min.js \
%{buildroot}/%{python3_sitelib}/%{name}/themes/mkdocs/js/jquery-1.10.2.min.js


export LC_ALL=C.UTF-8
export LANG=C.UTF-8
touch mkdocs.yml
mkdocs build

%check
#%{__python3} setup.py test

%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
* 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