Add CENTOS/RHEL support (drop fedora-release dependancy as template builder will install it anyway and here it only make harder to support non-fedora builds)

(cherry picked from commit 08bfc8bbac)
This commit is contained in:
Frederic Pierret (Epitre) 2017-09-07 16:38:13 +02:00 committed by Marek Marczykowski-Górecki
parent 26e70123aa
commit 162d5b1e59
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -112,7 +112,6 @@ Group: Qubes
Vendor: Invisible Things Lab Vendor: Invisible Things Lab
License: GPL License: GPL
URL: http://www.qubes-os.org URL: http://www.qubes-os.org
Requires: fedora-release
%if %{fedora} < 22 %if %{fedora} < 22
Requires: yum-plugin-post-transaction-actions Requires: yum-plugin-post-transaction-actions
%endif %endif
@ -154,6 +153,9 @@ Requires: python3-dnf-plugins-qubes-hooks
%else %else
Requires: python2-dnf-plugins-qubes-hooks Requires: python2-dnf-plugins-qubes-hooks
%endif %endif
%if 0%{?rhel} >= 7
Requires: python34-dnf-plugins-qubes-hooks
%endif
Obsoletes: qubes-core-vm-kernel-placeholder <= 1.0 Obsoletes: qubes-core-vm-kernel-placeholder <= 1.0
Obsoletes: qubes-upgrade-vm < 3.2 Obsoletes: qubes-upgrade-vm < 3.2
BuildRequires: xen-devel BuildRequires: xen-devel
@ -171,6 +173,7 @@ DNF plugin for Qubes specific post-installation actions:
* notify dom0 that updates were installed * notify dom0 that updates were installed
* refresh applications shortcut list * refresh applications shortcut list
%if 0%{fedora} >= 23
%package -n python3-dnf-plugins-qubes-hooks %package -n python3-dnf-plugins-qubes-hooks
Summary: DNF plugin for Qubes specific post-installation actions Summary: DNF plugin for Qubes specific post-installation actions
BuildRequires: python3-devel BuildRequires: python3-devel
@ -180,6 +183,19 @@ BuildRequires: python3-devel
DNF plugin for Qubes specific post-installation actions: DNF plugin for Qubes specific post-installation actions:
* notify dom0 that updates were installed * notify dom0 that updates were installed
* refresh applications shortcut list * refresh applications shortcut list
%endif
%if 0%{?rhel} >= 7
%package -n python34-dnf-plugins-qubes-hooks
Summary: DNF plugin for Qubes specific post-installation actions
BuildRequires: python34-devel
%{?python_provide:%python_provide python34-dnf-plugins-qubes-hooks}
%description -n python34-dnf-plugins-qubes-hooks
DNF plugin for Qubes specific post-installation actions:
* notify dom0 that updates were installed
* refresh applications shortcut list
%endif
%define _builddir %(pwd) %define _builddir %(pwd)
@ -531,8 +547,15 @@ rm -f %{name}-%{version}
%files -n python2-dnf-plugins-qubes-hooks %files -n python2-dnf-plugins-qubes-hooks
%{python2_sitelib}/dnf-plugins/* %{python2_sitelib}/dnf-plugins/*
%if 0%{fedora} >= 23
%files -n python3-dnf-plugins-qubes-hooks %files -n python3-dnf-plugins-qubes-hooks
%{python3_sitelib}/dnf-plugins/* %{python3_sitelib}/dnf-plugins/*
%endif
%if 0%{?rhel} >= 7
%files -n python34-dnf-plugins-qubes-hooks
%{python3_sitelib}/dnf-plugins/*
%endif
%package sysvinit %package sysvinit
Summary: Qubes unit files for SysV init style or upstart Summary: Qubes unit files for SysV init style or upstart