Blame SOURCES/ansible-packaging.inc

a0bc34
# Helper macros originally from macros.ansible by Igor Raits <ignatenkobrain>
a0bc34
# On RHEL, not available, so we must define those macros locally
a0bc34
# On Fedora, provided by ansible-packaging
a0bc34
# ansible-core is available on RHEL 8.6 and newer at buildtime.
a0bc34
a0bc34
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version}
a0bc34
a0bc34
# Untar and copy everything instead of galaxy-installing the built artifact when ansible is not available
a0bc34
%define ansible_collection_build() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .
a0bc34
%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}%{collection_name}; (cd %{buildroot}%{ansible_collection_files}%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz)
a0bc34
a0bc34
%define ansible_roles_dir %{_datadir}/ansible/roles
a0bc34
%define ansible_collections_dir %{_datadir}/ansible/collections/ansible_collections
a0bc34
a0bc34
%global ansible_collection_files %{ansible_collections_dir}/%{collection_namespace}/
a0bc34
a0bc34
# the python3 macro is not defined on rhel7 so define it here
a0bc34
%global python3 python3