From 9faa44c5fc452a1e7c92aa9dd6ea0a838f061af690da644143ef250349e8a34b Mon Sep 17 00:00:00 2001 From: Yan Gao Date: Mon, 29 Nov 2021 10:30:04 +0000 Subject: [PATCH] Accepting request 933774 from home:dimstar:Factory - Inject package version differently into the build system (boo#1193087): + Drop libqb-configure-package-version.patch + copy the package version into .tarball-version (if it does not exist and we would happen to use a tarball to build). OBS-URL: https://build.opensuse.org/request/show/933774 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/libqb?expand=0&rev=102 --- libqb-configure-package-version.patch | 24 ------------------------ libqb.changes | 9 +++++++++ libqb.spec | 5 +++-- 3 files changed, 12 insertions(+), 26 deletions(-) delete mode 100644 libqb-configure-package-version.patch diff --git a/libqb-configure-package-version.patch b/libqb-configure-package-version.patch deleted file mode 100644 index 2e839fc..0000000 --- a/libqb-configure-package-version.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index a4dc7c0..e0a5c92 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -26,6 +26,19 @@ AC_CANONICAL_HOST - AC_PROG_LIBTOOL - AC_LANG([C]) - -+ -+if test $PACKAGE_VERSION = "UNKNOWN"; then -+ # The current directory name make a reasonable default -+ # Most generated archives will include the hash or tag -+ BASE=`basename $PWD` -+ PACKAGE_VERSION=`echo $BASE | sed s:.*[[Ll]]ibqb-::` -+ AC_MSG_RESULT(directory based hash: $PACKAGE_VERSION) -+ -+ AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION) -+ AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$PACKAGE_VERSION", Current libqb version) -+ AC_SUBST(PACKAGE_VERSION) -+fi -+ - dnl Fix default variables - "prefix" variable if not specified - if test "$prefix" = "NONE"; then - prefix="/usr" diff --git a/libqb.changes b/libqb.changes index 2d3bc66..614d26f 100644 --- a/libqb.changes +++ b/libqb.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Nov 25 15:05:06 UTC 2021 - Dominique Leuenberger + +- Inject package version differently into the build system + (boo#1193087): + + Drop libqb-configure-package-version.patch + + copy the package version into .tarball-version (if it does not + exist and we would happen to use a tarball to build). + ------------------------------------------------------------------- Tue Nov 16 08:42:20 UTC 2021 - Yan Gao diff --git a/libqb.spec b/libqb.spec index d1830fd..e828234 100644 --- a/libqb.spec +++ b/libqb.spec @@ -29,7 +29,6 @@ Group: Development/Libraries/C and C++ URL: https://github.com/ClusterLabs/libqb Source0: %{name}-%{version}.tar.xz Source1: baselibs.conf -Patch1: libqb-configure-package-version.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf @@ -76,9 +75,11 @@ features. It provides logging, tracing, IPC, and polling. %prep %setup -q -n %{name}-%{version} -%patch1 -p1 %build +if [ ! -f .tarball-version ]; then + echo %{VERSION} > .tarball-version +fi ./autogen.sh %configure \ %if %{with testsrpm}