From 6cabe42a9cb9e42819d85c9c03d1d1f68139aaf5 Mon Sep 17 00:00:00 2001 From: Hubert Kowalski Date: Thu, 30 Sep 2021 16:55:24 +0200 Subject: [PATCH] Changed building behavior so that package version is always present. When git repo is unavailable, version from source is taken in order to create name. Change-Id: Ifb4998eaafc7f2f85f488378a919f0734eb15939 --- cmake/GetGitRevisionDescription.cmake | 2 +- packaging/bcc-tools.spec | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmake/GetGitRevisionDescription.cmake b/cmake/GetGitRevisionDescription.cmake index 1bf02300..db40e847 100644 --- a/cmake/GetGitRevisionDescription.cmake +++ b/cmake/GetGitRevisionDescription.cmake @@ -79,7 +79,7 @@ function(git_describe _var) endif() get_git_head_revision(refspec hash) if(NOT GIT_FOUND) - set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) + set(${_var} "_GIT_NOTFOUND" PARENT_SCOPE) return() endif() if(NOT hash) diff --git a/packaging/bcc-tools.spec b/packaging/bcc-tools.spec index a8fddf52..fa67587c 100644 --- a/packaging/bcc-tools.spec +++ b/packaging/bcc-tools.spec @@ -53,9 +53,8 @@ This package provides example codes and documents. %setup -q -n bcc-tools-%{version} %build - -cmake -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_CPP_EXAMPLES=ON . - +#DREVISION - number which will be put at back of the package name if repo isn't available +cmake -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_CPP_EXAMPLES=ON -DREVISION="%{version}" . make %{?jobs:-j%jobs} %install -- 2.34.1