From 5ca2983aeacca42e0272f6b49cfe00977983ceb8 Mon Sep 17 00:00:00 2001 From: chedi toueiti Date: Jul 20 2020 13:56:41 +0000 Subject: initial commit --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..08ef9db --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.tar.gz +*.tar.bz2 +results_* +*.src.rpm +*.swp diff --git a/python-sphinx_ansible_theme.spec b/python-sphinx_ansible_theme.spec new file mode 100644 index 0000000..6f2d828 --- /dev/null +++ b/python-sphinx_ansible_theme.spec @@ -0,0 +1,79 @@ +%global srcname sphinx_ansible_theme + +Name: python-%{srcname} +Version: 0.3.1 +Release: 1%{?dist} +Summary: A reusable Ansible Sphinx Theme + +License: MIT and BSD +URL: https://github.com/ansible-community/%{srcname} +Source: %{pypi_source} +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-sphinx_rtd_theme +BuildRequires: python3-sphinx-notfound-page +BuildRequires: python3-setuptools_scm_git_archive + +# docs requirements +BuildRequires: python3-sphinx + +%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-%{srcname}-doc +Summary: %summary +%description -n python-%{srcname}-doc +Documentation for sphinx_ansible_theme + +%package -n python3-%{srcname} +Summary: %summary +Requires: python3-sphinx +Requires: fontawesome-fonts +Requires: fontawesome-fonts-web +Recommends: python-%{srcname}-doc +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} %{_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 +pushd %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts +rm -f FontAwesome.otf +rm -f fontawesome-webfont.* +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 . +popd + +%files -n python3-%{srcname} +%doc README.rst +%license LICENSE +%{python3_sitelib}/%{srcname}* + +%files -n python-%{srcname}-doc +%doc html +%license LICENSE + +%changelog +* Sat Jul 18 2020 Chedi Toueiti - 0.3.1-1 +- initial commit diff --git a/sources b/sources new file mode 100644 index 0000000..30a0a0d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (sphinx_ansible_theme-0.3.1.tar.gz) = 81efe4392a4ec1786943e7c23b97e28a20f001bd40d74335719b677478486e34e5fa0fc52cadd437358c4e74120ab8dc06cbe28ebbd93519a65e14bf1534a04c