diff options
author | B Stack <bgstack15@gmail.com> | 2019-01-23 15:54:49 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-01-23 15:54:49 +0000 |
commit | 35402c1e6d6e51ca4ae5283c2be3a9e4b68f3778 (patch) | |
tree | 48d2cefce15bb3e9438ad229575d88eb0769c639 | |
parent | Merge branch 'freefilesync-bump' into 'master' (diff) | |
parent | add rpm spec for bgstack15-stackrpms repo (diff) | |
download | stackrpms-35402c1e6d6e51ca4ae5283c2be3a9e4b68f3778.tar.gz stackrpms-35402c1e6d6e51ca4ae5283c2be3a9e4b68f3778.tar.bz2 stackrpms-35402c1e6d6e51ca4ae5283c2be3a9e4b68f3778.zip |
Merge branch 'stackrpms-bump' into 'master'
add rpm spec for bgstack15-stackrpms repo
See merge request bgstack15/stackrpms!30
-rw-r--r-- | stackrpms/bgstack15-stackrpms.spec | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/stackrpms/bgstack15-stackrpms.spec b/stackrpms/bgstack15-stackrpms.spec new file mode 100644 index 0000000..b458691 --- /dev/null +++ b/stackrpms/bgstack15-stackrpms.spec @@ -0,0 +1,69 @@ +Name: bgstack15-stackrpms +Version: 1.0.0 +Release: 1 +Summary: bgstack15-stackrpms repository configuration + +Group: System Environment/Base +License: CC-BY-SA 4.0 + +URL: https://copr.fedorainfracloud.org/coprs/bgstack15/stackrpms/ +Source0: https://copr-be.cloud.fedoraproject.org/results/bgstack15/stackrpms/pubkey.gpg +Source1: https://copr.fedorainfracloud.org/coprs/bgstack15/stackrpms/repo/epel-7/bgstack15-stackrpms-epel-7.repo + +BuildArch: noarch + +%description +This package contains the bgstack15-stackrpms repository +GPG key as well as configuration for yum/dnf. + +%prep +%setup -q -c -T +install -pm 644 %{SOURCE0} . +install -pm 644 %{SOURCE1} . +mv $( basename %{SOURCE1} ) bgstack15-stackrpms.repo +sed -i -r -e '/^baseurl/s/epel-[0-9]+/epel-\$releasever/;' %{SOURCE1} + +%build + + +%install +rm -rf $RPM_BUILD_ROOT + +#GPG Key +install -Dpm 644 %{SOURCE0} \ + $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-bgstack15-stackrpms + +# yum +install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d +install -pm 644 bgstack15-stackrpms.repo $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +{ +if grep -qi fedora /etc/*release ; +then + # configure for fedora + sed -i -r -e '/^baseurl/s:epel-:fedora-:;' /etc/yum.repos.d/bgstack15-stackrpms.repo +else + # configure for el + static_releasever="$( grep -i version /etc/*release | head -n1 | tr -dc '[0-9\.]' | awk -F '.' '{print $1}' )" + test -z "${static_releasever}" && static_releasever=7 + sed -i -r -e "/^baseurl/s:.releasever:${static_releasever}:;" /etc/yum.repos.d/bgstack15-stackrpms.repo +fi + +} 1>/dev/null 2>&1 +true + +%files +%defattr(-,root,root,-) +%config(noreplace) /etc/yum.repos.d/* +/etc/pki/rpm-gpg/* + +%changelog +* Wed Jan 23 2019 B Stack <bgstack15@gmail.com> - 1.0.0-1 +- Fork to adapt for stackrpms + +* Mon Oct 02 2017 Kevin Fenzi <kevin@scrye.com> - 7-11 +- Add Conflicts on fedora-release to prevent people from installing on Fedora systems. Fixes bug #1497702 |