From aa0c9b5cfb3332f4b67a9ae4e070bbde26f3459d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 31 Jul 2015 10:44:51 +0000 Subject: [PATCH] fixed version number and rpm issues --- ax_init_standard_project.m4 | 14 ++++++-------- bootstrap.sh | 5 +---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index c94918f..2b8eaa6 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -22,21 +22,19 @@ m4_define(x_least, mrw_esyscmd_s([ # define version number from subversion's revision number: # it is taken modulo 256 due to a bug on Apple's MacOSX # add to x_minor if revision number is > 256 -m4_define(x_minor_fixed, mrw_esyscmd_s([ +m4_define(x_minor_diff, mrw_esyscmd_s([ SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" for path in . .. ../..; do if svn info $path 2>&1 > /dev/null; then SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') break; - fi + fi; done # Mac does not support LEAST > 255 - echo $ECHO_N $((x_minor+$SVN_REVISION/256)) + echo $ECHO_N $(($SVN_REVISION/256)) ])) # setup version number -m4_define(x_version, mrw_esyscmd_s([ - echo $ECHO_N x_major.x_minor_fixed.x_least -])) +m4_define(x_version, [x_major.m4_eval(x_minor+x_minor_diff).x_least]) ## bugreport mail address is taken from in first line of AUTHORS m4_define(x_bugreport, mrw_esyscmd_s([ @@ -264,9 +262,9 @@ EOF # use this in configure.ac to support C++ libraries AC_DEFUN([AX_USE_LIBTOOL], [ # libtool versioning - LIB_MAJOR=m4_eval(x_major+x_minor_fixed) + LIB_MAJOR=m4_eval(x_major+x_minor+x_minor_diff) LIB_MINOR=x_least - LIB_LEAST=x_minor_fixed + LIB_LEAST=m4_eval(x_minor+x_minor_diff) LIB_VERSION="${LIB_MAJOR}:${LIB_MINOR}:${LIB_LEAST}" AM_LDFLAGS="-version-info ${LIB_VERSION}" AC_SUBST(AM_LDFLAGS) diff --git a/bootstrap.sh b/bootstrap.sh index 0d1d6d9..000ab21 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -741,11 +741,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: pkgconfig, redhat-lsb$( if testtag AX_USE_CPPUNIT; then echo -n ", cppunit-devel"; - fi; - if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then - echo -n ", qt5-qtwebkit-devel"; fi) -%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} +%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} ) $(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: mscgen"; fi) $(if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools, qt5-qtwebkit-devel"; fi) %else