Skip to content

Instantly share code, notes, and snippets.

@jgrund
Created August 3, 2018 14:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jgrund/7fd8d8aa849a0ef57e11a980d8427dd2 to your computer and use it in GitHub Desktop.
Name: epel-release
Version: 7
Release: 11
Summary: Extra Packages for Enterprise Linux repository configuration
Group: System Environment/Base
License: GPLv2
# This is a EPEL maintained package which is specific to
# our distribution. Thus the source is only available from
# within this srpm.
URL: http://download.fedoraproject.org/pub/epel
Source0: http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
Source1: GPL
Source2: epel.repo
Source3: epel-testing.repo
# EPEL default preset policy (borrowed from fedora's 90-default.preset)
Source4: 90-epel.preset
BuildArch: noarch
Requires: redhat-release >= %{version}
# epel-release is only for enterprise linux, not fedora
Conflicts: fedora-release
%description
This package contains the Extra Packages for Enterprise Linux (EPEL) repository
GPG key as well as configuration for yum.
%prep
%setup -q -c -T
install -pm 644 %{SOURCE0} .
install -pm 644 %{SOURCE1} .
%build
%install
rm -rf $RPM_BUILD_ROOT
#GPG Key
install -Dpm 644 %{SOURCE0} \
$RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
# yum
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
install -pm 644 %{SOURCE2} %{SOURCE3} \
$RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
install -pm 644 -D %{SOURCE4} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-preset/90-epel.preset
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc GPL
%config(noreplace) /etc/yum.repos.d/*
/etc/pki/rpm-gpg/*
%{_prefix}/lib/systemd/system-preset/90-epel.preset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment