ab48673 Simplify spec file and remove unused code

Authored and Committed by spetros 2 years ago
    Simplify spec file and remove unused code
    
    Remove unused and redundant macros
    
    Replace ansible_collection_build_install with separate _build _install
    It is required to build in the %%build stage and install in the %%install
    for proper RPM build process
    
    's|$RPM_BUILD_ROOT|%%{buildroot}|g' for consistency
    
    Set BuildRequires: ansible-packaging on Fedora
    
    Ddefine BuildRequires and bcond_with_ansible separately for clarity
    
    Remove %%_sourcedir for best practicies
    https://fedoraproject.org/wiki/Packaging:RPM_Source_Dir
    
    Resolve rpmlint issues
    mixed-use-of-spaces-and-tabs
    macro-in-comment
    
    Replace installbase with ansible_roles_dir
    
    Create symlinks for upstream naming on RHEL
    
    Define ansible_roles_dir the same way as ansible_collection_files
    
    Remove workaround for EPEL because we can build coll artifact from RHEL9
    
    Define helper macros on RHEL only
    
    Fedora must fail if macros provided by ansible-packager are not
    available
    
    Define whole %%{_pkglicensedir} and %%{_pkgdocdir} dirs in %%files
    
    Refactor generating files section
    
    Do not conditionalize sources, get vendored collections from galaxy
    
    Replace files copies in _pkgdocdir and _pkglicensedir with symlinks
    
    Remove old Obsoletes entry from 2018
    The -techpreview package got only into RHEL 7 Extras briefly. The change
    happened in RHEL 8 before GA, so there is no risk of anybody having the
    -techpreview subpackage in RHEL 8.
    
    Define python3-ruamel-yaml requirement in one line
    
    Add bundled Provides
    
    Fix processing %%license in format_item_for_files on EL7
    
        
file modified
+2 -0
file added
+563
file modified
+117 -174
file modified
+2 -0