%global srcname sphinx-ansible-theme
%global pkgname sphinx_ansible_theme
%global forgeurl https://github.com/ansible-community/%{pkgname}
Name: python-%{pkgname}
Version: 0.8.0
%forgemeta
Release: 1%{?dist}
Summary: A reusable Ansible Sphinx Theme
License: MIT and BSD
URL: %{forgeurl}
Source: %{pypi_source}
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(sphinx-rtd-theme)
BuildRequires: python3dist(sphinx-notfound-page)
BuildRequires: python3dist(setuptools-scm-git-archive)
# docs requirements
BuildRequires: python3dist(sphinx) >= 1.6
BuildRequires: python3dist(ansible-pygments)
%global _description %{expand:
A reusable Ansible Sphinx Theme. This theme is building on top
of RTD Theme and adds customization's needed for building projects
which are part of Ansible ecosystem}
%description %{_description}
%package -n python-%{pkgname}-doc
Summary: %summary
%description -n python-%{pkgname}-doc
Documentation for sphinx_ansible_theme
%package -n python3-%{pkgname}
Summary: %summary
Requires: python3dist(sphinx)
Requires: fontawesome-fonts
Requires: fontawesome-fonts-web
Recommends: python-%{pkgname}-doc
%{?python_provide:%python_provide python3-%{pkgname}}
%description -n python3-%{pkgname} %{_description}
%prep
%setup -q -n %{srcname}-%{version}
%build
%py3_build
# generate html docs
PYTHONPATH=. sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -vr html/.{doctrees,buildinfo}
%install
%py3_install
ln -s %{_datadir}/fonts/fontawesome/FontAwesome.otf .
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 .
%files -n python3-%{pkgname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pkgname}*
%files -n python-%{pkgname}-doc
%doc html
%license LICENSE
%changelog
* Thu Sep 30 2021 Chedi Toueiti <chedi.toueiti@gmail.com> - 0.8.0-1
- Update to version 0.8.0 (#1986617)
* Mon Aug 02 2021 Chedi Toueiti <chedi.toueiti@gmail.com> - 0.3.2-1
- Update to version 0.3.2
* Sat Jul 18 2020 Chedi Toueiti <chedi.toueiti@gmail.com> - 0.3.1-1
- initial commit