Blame SPECS/lua-rpm-macros.spec

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