From 4b95e2a7b72b4eaf2d762bd1e630a928e66b7576 Mon Sep 17 00:00:00 2001 From: Elvin Sindrilaru Date: Wed, 18 Mar 2015 10:51:27 +0100 Subject: [PATCH] RPM: Exclude python byte compiling scripts from spec file Rather than specifying explicitly the scripts in __os_install_post which deal with stripping the files, we only exclude the ones related to python. The path to these scripts can be different depending on the OS. --- packaging/rhel/xrootd.spec.in | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packaging/rhel/xrootd.spec.in b/packaging/rhel/xrootd.spec.in index 43091814bc9..5d467bf27ec 100644 --- a/packaging/rhel/xrootd.spec.in +++ b/packaging/rhel/xrootd.spec.in @@ -15,13 +15,11 @@ %endif %endif -%global __os_install_post \ - /usr/lib/rpm/redhat/brp-compress \ - %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \ - /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ - /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ - /usr/lib/rpm/redhat/brp-java-repack-jars \ -%{nil} +# Remove default rpm python bytecompiling scripts +%global __os_install_post \ + %(echo '%{__os_install_post}' | \ + sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g \ + s!/usr/lib[^[:space:]]*/brp-python-hardlink[[:space:]].*$!!g') #------------------------------------------------------------------------------- # Package definitions