Blame SPECS/centos-release-nfv.spec

14cb86
Summary: Config to enable the repository for the NFV SIG
14cb86
Name: centos-release-nfv
14cb86
Version: 1
d0c51a
Release: 3%{?dist}
14cb86
License: GPLv2
14cb86
Group: System Environment/Base
14cb86
URL: http://wiki.centos.org/SpecialInterestGroup/NFV
14cb86
Source0: RPM-GPG-KEY-CentOS-SIG-NFV
14cb86
Source1: CentOS-NFV-OpenvSwitch.repo
f7cfaf
Source2: CentOS-NFV-extras.repo
14cb86
14cb86
BuildArch: noarch
14cb86
14cb86
%description
14cb86
yum configs for repositories as delivered by CentOS NFV SIG.
14cb86
14cb86
%package common
14cb86
Summary: Common package to contain NFV SIG
14cb86
14cb86
Requires: centos-release
d0c51a
Requires: /etc/os-release
14cb86
14cb86
%description common
14cb86
Common files for repositories as delivered by CentOS NFV SIG.
14cb86
14cb86
%package openvswitch
14cb86
Summary: Common release file to establish shared metadata for CentOS NFV SIG
14cb86
d0c51a
Requires: %{name}-common = %{version}-%{release}
14cb86
14cb86
%description openvswitch
14cb86
yum configs for repositories as delivered by CentOS NFV SIG.
14cb86
f7cfaf
%package extras
f7cfaf
Summary: Release file to establish repo config for NFV network extras repo
f7cfaf
d0c51a
Requires: %{name}-common = %{version}-%{release}
f7cfaf
f7cfaf
%description extras
f7cfaf
yum configs for repositories as delivered by CentOS NFV SIG.
f7cfaf
14cb86
%prep
14cb86
%setup -q -n %{name} -T -c
14cb86
14cb86
%install
14cb86
# gpg key
14cb86
install -p -d %{buildroot}%{_sysconfdir}/pki/rpm-gpg
14cb86
install -m 644 %{SOURCE0} %{buildroot}%{_sysconfdir}/pki/rpm-gpg
14cb86
# openvswitch repo
14cb86
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-NFV-OpenvSwitch.repo
f7cfaf
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/yum.repos.d/CentOS-NFV-extras.repo
14cb86
d0c51a
%post common
d0c51a
if [ -f /etc/os-release ]; then
d0c51a
    source /etc/os-release
d0c51a
fi
d0c51a
if [[ $ID == 'centos' && $NAME == *'Stream' ]] || [ $ID != 'centos' ]; then
d0c51a
    echo "8-stream" > /etc/dnf/vars/nfvsigdist
d0c51a
else
d0c51a
    echo "8" > /etc/dnf/vars/nfvsigdist
d0c51a
fi
d0c51a
d0c51a
%postun common
d0c51a
if [ $1 -eq 0 ] ; then
d0c51a
    rm -f /etc/dnf/vars/nfvsigdist
d0c51a
fi
d0c51a
14cb86
%files common
14cb86
%defattr(-,root,root)
14cb86
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV
14cb86
14cb86
%files openvswitch
14cb86
%defattr(-,root,root)
14cb86
%config(noreplace) %{_sysconfdir}/yum.repos.d/CentOS-NFV-OpenvSwitch.repo
14cb86
f7cfaf
%files extras
f7cfaf
%defattr(-,root,root)
f7cfaf
%config(noreplace) %{_sysconfdir}/yum.repos.d/CentOS-NFV-extras.repo
f7cfaf
14cb86
%changelog
d0c51a
* Thu Apr 15 2021 Alfredo Moralejo <amoralej@redhat.com> - 1-3
d0c51a
- Use different repos for CentOS Linux 8 and CentOS Stream 8
d0c51a
f7cfaf
* Wed Sep 30 2020 Alfredo Moralejo <amoralej@redhat.com> - 1-2
f7cfaf
- Added centos-release-nfv-extras subpackage
f7cfaf
14cb86
* Thu Sep 10 2020 Yatin Karel <ykarel@redhat.com> - 1-1
14cb86
- Initial release rpm NFV SIG
14cb86