71 lines
1.9 KiB
Django/Jinja
71 lines
1.9 KiB
Django/Jinja
%if 0%{?rhel}
|
|
%global rdo 1
|
|
%global rrcdir %{_prefix}/lib/rpm/redhat
|
|
%if 0%{?rhel} < 8
|
|
%global _rpmmacrodir %{_rpmconfigdir}/macros.d
|
|
%endif
|
|
%endif
|
|
Name: openstack-macros
|
|
Version: 2023.1.0
|
|
Release: 0
|
|
Summary: OpenStack Packaging - RPM Macros
|
|
License: {{ license('Apache-2.0') }}
|
|
Group: Development/Libraries/Python
|
|
URL: https://wiki.openstack.org/wiki/Rpm-packaging
|
|
Source1: macros.openstack-common
|
|
Source2: macros.openstack-suse
|
|
Source3: macros.openstack-rdo
|
|
Source4: macros.openstack-fedora
|
|
# the singlespec macros are a copy of https://github.com/openSUSE/python-rpm-macros
|
|
Source5: macros.openstack-singlespec
|
|
Source6: gpgverify
|
|
BuildArch: noarch
|
|
%if 0%{?rdo}
|
|
Obsoletes: rdo-rpm-macros <= 1-3
|
|
# Fake NVR to avoid dealing with epochs
|
|
# just bump release field
|
|
Provides: rdo-rpm-macros = 1-4
|
|
%endif
|
|
|
|
%description
|
|
This package provides OpenStack RPM macros. You need it to build OpenStack
|
|
packages.
|
|
|
|
%prep
|
|
|
|
%build
|
|
|
|
%install
|
|
install -D -m644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.openstack-common
|
|
install -D -m644 %{SOURCE5} %{buildroot}%{_rpmmacrodir}/macros.openstack-singlespec
|
|
%if 0%{?suse_version}
|
|
install -D -m644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.openstack-suse
|
|
%endif
|
|
%if 0%{?rdo}
|
|
install -D -m644 %{SOURCE3} %{buildroot}%{_rpmmacrodir}/macros.openstack-rdo
|
|
%if 0%{?rhel} < 9
|
|
install -D -m 755 %{SOURCE6} %{buildroot}%{rrcdir}/gpgverify
|
|
%endif
|
|
%endif
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
install -D -m644 %{SOURCE4} %{buildroot}%{_rpmmacrodir}/macros.openstack-fedora
|
|
%endif
|
|
|
|
%files
|
|
%{_rpmmacrodir}/macros.openstack-common
|
|
%{_rpmmacrodir}/macros.openstack-singlespec
|
|
%if 0%{?suse_version}
|
|
%{_rpmmacrodir}/macros.openstack-suse
|
|
%endif
|
|
%if 0%{?rdo}
|
|
%{_rpmmacrodir}/macros.openstack-rdo
|
|
%if 0%{?rhel} < 9
|
|
%{rrcdir}/gpgverify
|
|
%endif
|
|
%endif
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
%{_rpmmacrodir}/macros.openstack-fedora
|
|
%endif
|
|
|
|
%changelog
|