Blame SPECS/lua-rpm-macros.spec

ebfe65
%if 0%{?el8}
ebfe65
# RHEL8's lua-devel ships macros.lua and lua.attr
ebfe65
# skip shipping lua-rpm-macros so we don't conflict
ebfe65
%bcond_with rpm_macros
ebfe65
%else
ebfe65
%bcond_without rpm_macros
ebfe65
%endif
ebfe65
ebfe65
# Versions of lua-devel where the macros were removed
ebfe65
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
ebfe65
%global lua_conflict 5.4.0-7
ebfe65
%endif
ebfe65
# TODO add new versions if this gets backported
ebfe65
ebfe65
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
ebfe65
# requires RPM >= 4.16
ebfe65
%bcond_without requires_generator
ebfe65
%else
ebfe65
%bcond_with requires_generator
ebfe65
%endif
ebfe65
ebfe65
Name:           lua-rpm-macros
ebfe65
Version:        1
ebfe65
Release:        6%{?dist}
ebfe65
Summary:        The common Lua RPM macros
ebfe65
ebfe65
License:        MIT
ebfe65
ebfe65
# Macros:
ebfe65
Source101:      macros.lua
ebfe65
Source102:      macros.lua-srpm       
ebfe65
ebfe65
# RPM requires generator
ebfe65
Source103:      lua.attr
ebfe65
ebfe65
# license text
ebfe65
Source200:      LICENSE
ebfe65
ebfe65
BuildArch:      noarch
ebfe65
ebfe65
# for lua_libdir and lua_pkgdir
ebfe65
Requires:       lua-srpm-macros = %{version}-%{release}
ebfe65
ebfe65
# files were moved from here
ebfe65
%{?lua_conflict:Conflicts: lua-devel < %{lua_conflict}}
ebfe65
ebfe65
%description
ebfe65
This package contains Lua RPM macros.
ebfe65
ebfe65
You should not need to install this package manually as lua-devel requires it.
ebfe65
ebfe65
ebfe65
%package -n lua-srpm-macros
ebfe65
Summary:        RPM macros for building Lua source packages
ebfe65
ebfe65
# For directory structure
ebfe65
Requires:       rpm
ebfe65
ebfe65
%description -n lua-srpm-macros
ebfe65
RPM macros for building Lua source packages.
ebfe65
ebfe65
ebfe65
%prep
ebfe65
%autosetup -c -T
ebfe65
cp -a %{sources} .
ebfe65
%if %{without rpm_macros}
ebfe65
rm macros.lua
ebfe65
%endif
ebfe65
ebfe65
ebfe65
%build
ebfe65
ebfe65
ebfe65
%install
ebfe65
mkdir -p %{buildroot}%{rpmmacrodir}
ebfe65
install -pm 644 macros.* %{buildroot}%{rpmmacrodir}/
ebfe65
%if %{with requires_generator}
ebfe65
install -Dpm 0644 lua.attr %{buildroot}/%{_fileattrsdir}/lua.attr
ebfe65
%endif
ebfe65
ebfe65
ebfe65
%if %{with rpm_macros}
ebfe65
%files
ebfe65
%license LICENSE
ebfe65
%if %{with requires_generator}
ebfe65
%{_fileattrsdir}/lua.attr
ebfe65
%endif
ebfe65
%{rpmmacrodir}/macros.lua
ebfe65
%endif
ebfe65
ebfe65
%files -n lua-srpm-macros
ebfe65
%license LICENSE
ebfe65
%{rpmmacrodir}/macros.lua-srpm
ebfe65
ebfe65
ebfe65
%changelog
ebfe65
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1-6
ebfe65
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
ebfe65
  Related: rhbz#1991688
ebfe65
ebfe65
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1-5
ebfe65
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
ebfe65
ebfe65
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1-4
ebfe65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ebfe65
ebfe65
* Tue Sep 01 2020 Miro HronĨok <mhroncok@redhat.com> - 1-3
ebfe65
- Modify several conditionals to support RHEL 9+ and drop ancient Fedora 17
ebfe65
- Add explicit conflict with older lua-devel
ebfe65
- Require rpm, not redhat-rpm-config
ebfe65
ebfe65
* Mon Aug 31 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 1-2
ebfe65
- Also move lua.attr requires generator
ebfe65
ebfe65
* Fri Aug 28 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 1-1
ebfe65
- Initial package