epel-release/epel-release.spec
2024-10-24 17:41:41 +03:00

97 lines
3.1 KiB
RPMSpec

## START: Set by rpmautospec
## (rpmautospec version 0.7.2)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 2;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
Name: epel-release
Version: 10
Release: %autorelease
Summary: Extra Packages for Enterprise Linux repository configuration
# Most things in this package are not considered copyrightable. If that were
# true for everything in the package, the license identifier would be
# LicenseRef-Not-Copyrightable. However, the exception is the crb script,
# which is GPL-2.0-only. Per advice from Fedora Legal, we should use
# GPL-2.0-only as the license identifier for the package in this scenario.
# https://bugzilla.redhat.com/show_bug.cgi?id=2302438
License: GPL-2.0-only
BuildArch: noarch
URL: https://epel.io
# keys
Source10: https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-%{version}
# repo configs
Source20: epel.repo
Source21: epel-testing.repo
# preset policy
Source30: 90-epel.preset
# Add epel crb script
Source31: crb
# epel crb script is licensed GPL-2.0-only
Source32: GPL-2.0-only.txt
# This should only be installed on Enterprise Linux with a matching major version
Requires: (redhat-release with system-release(releasever) = %{version})
# crb needs config-manager to run
# But only recommend it, incase people do not need crb
Recommends: dnf-command(config-manager)
%description
This package contains the Extra Packages for Enterprise Linux (EPEL) repository
configuration and GPG key.
%prep
%setup -q -c -T
# Add epel crb script license
install -pm 644 %{SOURCE32} .
%install
# keys
install -Dp -m 0644 -t %{buildroot}%{_sysconfdir}/pki/rpm-gpg %{S:10}
# repo configs
install -Dp -m 0644 -t %{buildroot}%{_sysconfdir}/yum.repos.d %{S:20} %{S:21}
# preset policy
install -Dp -m 0644 -t %{buildroot}%{_prefix}/lib/systemd/system-preset %{S:30}
# Add epel crb script
install -D -pm744 -t %{buildroot}%{_bindir} %{SOURCE31}
%post
# Doing a check to see if crb is enabled is as hard and resource intense as enabling or disabling crb.
# So we will say crb is recommended, without first checking. But only on the initial install.
if [ "$1" -eq 1 ] ; then
echo "Many EPEL packages require the CodeReady Builder (CRB) repository."
echo "It is recommended that you run %{_bindir}/crb enable to enable the CRB repository."
fi
%files
%license GPL-2.0-only.txt
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-EPEL-%{version}
%config(noreplace) %{_sysconfdir}/yum.repos.d/epel.repo
%config(noreplace) %{_sysconfdir}/yum.repos.d/epel-testing.repo
%{_prefix}/lib/systemd/system-preset/90-epel.preset
%{_bindir}/crb
%changelog
## START: Generated by rpmautospec
* Tue Oct 08 2024 Troy Dawson <tdawson@redhat.com> - 10-2
- Add epel crb script Add license file for script, since this repo is
upstream
* Fri Aug 16 2024 Carl George <carlwgeorge@fedoraproject.org> - 10-1
- Initial package for EPEL 10
## END: Generated by rpmautospec