Re-add macro compat cruft for RHEL, comment upstream spec

This commit is contained in:
Adam Williamson 2017-02-15 12:14:52 -08:00
parent 0493bbd086
commit e07edee0e0
1 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,10 @@
# ** IMPORTANT NOTE **
# This spec is also tracked in productmd upstream git:
# https://github.com/release-engineering/productmd
# Please synchronize changes to it with upstream, and be aware that
# the spec is used for builds on pure RHEL (i.e. without EPEL packages
# or macros).
# Enable Python 3 builds for Fedora + EPEL >5
# NOTE: do **NOT** change 'epel' to 'rhel' here, as this spec is also
# used to do RHEL builds without EPEL
@ -9,6 +16,15 @@
%bcond_with python3
%endif
# Compatibility with RHEL. These macros have been added to EPEL but
# not yet to RHEL proper.
# https://bugzilla.redhat.com/show_bug.cgi?id=1307190
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}}
%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}}
Name: python-productmd
Version: 1.4
Release: 3%{?dist}
@ -76,6 +92,10 @@ and installation media.
%{__python3} ./setup.py test
%endif
# this must go after all 'License:' tags
# Implemented in EPEL, but not in RHEL
%{!?_licensedir:%global license %doc}
%files
%license LICENSE
%doc AUTHORS
@ -91,6 +111,9 @@ and installation media.
%endif
%changelog
* Wed Feb 15 2017 Adam Williamson <awilliam@redhat.com>
- Restore compatibility cruft for pure-RHEL builds
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild