Blob Blame History Raw
Name:           mkdocs
Version:        0.14.0
Release:        8%{?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


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

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

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

for theme in mkdocs/themes/*
do 
mkdir -p %{buildroot}/%{python3_sitelib}/$theme/fonts/
ln -sf %{_datadir}/fonts/fontawesome/FontAwesome.otf \
%{buildroot}/%{python3_sitelib}/$theme/fonts/
ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.svg \
%{buildroot}/%{python3_sitelib}/$theme/fonts/
ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.ttf \
%{buildroot}/%{python3_sitelib}/$theme/fonts/
ln -sf %{_datadir}/fonts/fontawesome/fontawesome-webfont.woff \
%{buildroot}/%{python3_sitelib}/$theme/fonts/
ln -sf %{_datadir}/javascript/highlight.js/highlight.pack.js \
%{buildroot}/%{python3_sitelib}/$theme/js/
done

%check

%{__python3} setup.py test

%files
%doc README.md
%license LICENSE
%{_bindir}/*
%{_mandir}/man1/* 
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info

%changelog
* Sun Nov 15 2015 William Moreno <williamjmorenor@gmail.com> - 0.14.0-8
- fedoraproject.org/wiki/FAD_Python_3_Porting_2015 

* 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