Update RHEL7, RHEL8 and RHEL9 Makefile and SPEC file compatibility (#2256)

* Update RHEL7, RHEL8 and RHEL9 Makefile and SPEC file compatibility with /etc/redhat-release
This commit is contained in:
abraunegg 2022-12-08 05:38:38 +11:00 committed by GitHub
parent b2cea4b1dd
commit 44937abeb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -58,7 +58,7 @@ user_unit_files = contrib/systemd/onedrive.service
DOCFILES = README.md config LICENSE CHANGELOG.md docs/Docker.md docs/INSTALL.md docs/SharePoint-Shared-Libraries.md docs/USAGE.md docs/BusinessSharedFolders.md docs/advanced-usage.md docs/application-security.md
ifneq ("$(wildcard /etc/redhat-release)","")
RHEL = $(shell cat /etc/redhat-release | grep -E "(Red Hat Enterprise Linux Server|CentOS)" | wc -l)
RHEL = $(shell cat /etc/redhat-release | grep -E "(Red Hat Enterprise Linux|CentOS)" | wc -l)
RHEL_VERSION = $(shell rpm --eval "%{rhel}")
else
RHEL = 0

View file

@ -5,10 +5,10 @@
%global with_systemd 0
%endif
%if 0%{?rhel} == 7
%global rhel_7 1
%if 0%{?rhel} >= 7
%global rhel_unitdir 1
%else
%global rhel_7 0
%global rhel_unitdir 0
%endif
Name: onedrive
@ -65,7 +65,7 @@ make
%{_docdir}/%{name}
%{_bindir}/%{name}
%if 0%{?with_systemd}
%if 0%{?rhel_7}
%if 0%{?rhel_unitdir}
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}@.service
%else