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
This commit is contained in:
Yan Gao 2021-11-29 10:30:04 +00:00 committed by Git OBS Bridge
parent 0f3e33a207
commit 9faa44c5fc
3 changed files with 12 additions and 26 deletions

View File

@ -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"

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Nov 25 15:05:06 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>
- 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 <ygao@suse.com>

View File

@ -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}