diff --git a/ansible-core.spec b/ansible-core.spec index 317219b..6a1310d 100644 --- a/ansible-core.spec +++ b/ansible-core.spec @@ -130,7 +130,10 @@ sed '/^mock$/d' test/lib/ansible_test/_data/requirements/units.txt > ${temp} %pyproject_wheel +# Build manpages +make PYTHON=%{python3} docs +# Build shell completions ( cd bin for shell in bash fish; do @@ -194,17 +197,17 @@ mkdir -p %{buildroot}%{_datadir}/ansible/plugins/ for location in $DATADIR_LOCATIONS ; do mkdir %{buildroot}"$location" done -mkdir -p %{buildroot}/etc/ansible/ -mkdir -p %{buildroot}/etc/ansible/roles/ +mkdir -p %{buildroot}%{_sysconfdir}/ansible/ +mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/ cp examples/hosts %{buildroot}/etc/ansible/ cp examples/ansible.cfg %{buildroot}/etc/ansible/ mkdir -p %{buildroot}/%{_mandir}/man1 cp -v docs/man/man1/*.1 %{buildroot}/%{_mandir}/man1/ -# no need to ship zero length files -find %{buildroot}/%{python3_sitelib} -name .git_keep -exec rm -f {} \; -find %{buildroot}/%{python3_sitelib} -name .travis.yml -exec rm -f {} \; +# These files are needed for the unit tests, so we don't remove them in %prep +find %{buildroot}/%{python3_sitelib} -name .travis.yml -type f -delete + %check %if %{with tests} @@ -212,6 +215,7 @@ ln -s /usr/bin/pytest-3 bin/pytest make PYTHON=%{python3} tests-py3 %endif + %files %license COPYING licenses/{Apache-License,MIT-license,PSF-license,simplified_bsd}.txt %doc README.rst changelogs/CHANGELOG-v2.13.rst