From 42c245df8a9b58c035adca0cae7329841a300773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Budiseli=C4=87?= Date: Fri, 29 Jan 2021 14:48:55 +0100 Subject: [PATCH] Fix CentOS8 packaging (#87) --- release/rpm/community/memgraph.spec.in | 11 +++++++++++ release/rpm/enterprise/memgraph.spec.in | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/release/rpm/community/memgraph.spec.in b/release/rpm/community/memgraph.spec.in index 0199e61dc..5b23f794d 100644 --- a/release/rpm/community/memgraph.spec.in +++ b/release/rpm/community/memgraph.spec.in @@ -30,6 +30,7 @@ BuildRequires: systemd # This is needed to prevent Python compilation errors when building the RPM # package # https://github.com/scylladb/scylla/issues/2235 +%if 0%{?rhel} < 8 %global __os_install_post \ /usr/lib/rpm/redhat/brp-compress \ %{!?__debug_package:\ @@ -39,6 +40,16 @@ BuildRequires: systemd /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ %{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \ %{nil} +%else +%global __os_install_post \ + /usr/lib/rpm/brp-compress \ + %{!?__debug_package:\ + /usr/lib/rpm/brp-strip %{__strip} \ + /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \ + } \ + /usr/lib/rpm/brp-strip-static-archive %{__strip} \ +%{nil} +%endif %define _rpmdir %_topdir/RPMS %define _srcrpmdir %_topdir/SRPMS diff --git a/release/rpm/enterprise/memgraph.spec.in b/release/rpm/enterprise/memgraph.spec.in index 229289e0c..448f884ac 100644 --- a/release/rpm/enterprise/memgraph.spec.in +++ b/release/rpm/enterprise/memgraph.spec.in @@ -30,6 +30,7 @@ BuildRequires: systemd # This is needed to prevent Python compilation errors when building the RPM # package # https://github.com/scylladb/scylla/issues/2235 +%if 0%{?rhel} < 8 %global __os_install_post \ /usr/lib/rpm/redhat/brp-compress \ %{!?__debug_package:\ @@ -39,6 +40,16 @@ BuildRequires: systemd /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ %{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \ %{nil} +%else +%global __os_install_post \ + /usr/lib/rpm/brp-compress \ + %{!?__debug_package:\ + /usr/lib/rpm/brp-strip %{__strip} \ + /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \ + } \ + /usr/lib/rpm/brp-strip-static-archive %{__strip} \ +%{nil} +%endif %define _rpmdir %_topdir/RPMS %define _srcrpmdir %_topdir/SRPMS