From 27e1488484af3289ff533c7f70b8cc627c2c0735 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 5 Jun 2008 10:57:28 +0000 Subject: [PATCH] 2008-06-05 12:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/bin/hb-func.sh + added get_hbverstat function to extract build status from hbver.h * harbour/make_rpmw32.sh * harbour/harbour.spec * harbour/make_rpmce.sh * moved -RC1 from version to releasen part - it resolves the problem with illegal character in version number --- harbour/ChangeLog | 10 ++++++++++ harbour/bin/hb-func.sh | 10 ++++++++++ harbour/harbour.spec | 4 ++-- harbour/make_rpmce.sh | 2 ++ harbour/make_rpmw32.sh | 2 ++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6388a1335a..4fd8d21408 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,16 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-06-05 12:57 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/bin/hb-func.sh + + added get_hbverstat function to extract build status from hbver.h + + * harbour/make_rpmw32.sh + * harbour/harbour.spec + * harbour/make_rpmce.sh + * moved -RC1 from version to releasen part - it resolves the problem + with illegal character in version number + 2008-06-05 12:53 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * source/pp/hbppgen.c * contrib/examples/pp/hbpp.c diff --git a/harbour/bin/hb-func.sh b/harbour/bin/hb-func.sh index 1be2a47836..1ef6d36753 100755 --- a/harbour/bin/hb-func.sh +++ b/harbour/bin/hb-func.sh @@ -51,6 +51,16 @@ get_hbver() echo -n "${MAJOR}.${MINOR}.${REVIS}" } +get_hbverstat() +{ + local FVER VERSTAT hb_rootdir + + hb_rootdir="${1-.}" + FVER="${hb_rootdir}/include/hbver.h" + VERSTAT=`sed -e '/HB_VER_STATUS/ !d' -e 's/[^\"]*\"\([^\"]*\).*/\1/g' "${FVER}"` + echo -n "${VERSTAT}" +} + get_solibname() { local name diff --git a/harbour/harbour.spec b/harbour/harbour.spec index 455f848940..247d463143 100644 --- a/harbour/harbour.spec +++ b/harbour/harbour.spec @@ -60,8 +60,8 @@ %define name harbour %define dname Harbour -%define version 1.0.0-RC1 -%define releasen 0 +%define version 1.0.0 +%define releasen RC1 %define hb_pref hb %define hb_arch export HB_ARCHITECTURE=linux %define hb_cc export HB_COMPILER=gcc diff --git a/harbour/make_rpmce.sh b/harbour/make_rpmce.sh index c13e5a77ed..424a012e86 100755 --- a/harbour/make_rpmce.sh +++ b/harbour/make_rpmce.sh @@ -49,6 +49,7 @@ get_rpmmacro() cd `dirname $0` . bin/hb-func.sh hb_ver=`get_hbver` +hb_verstat=`get_hbverstat` NEED_RPM="make gcc binutils bash cegcc-mingw32ce" @@ -104,6 +105,7 @@ then fi mv ${hb_filename} ${RPMDIR}/SOURCES/ sed -e "s/^%define version .*$/%define version ${hb_ver}/g" \ + -e "s/^%define releasen .*$/%define releasen ${hb_verstat}/g" \ harbour-ce-spec > ${RPMDIR}/SPECS/harbour-ce.spec if which rpmbuild &>/dev/null then diff --git a/harbour/make_rpmw32.sh b/harbour/make_rpmw32.sh index 54d1f4dae9..f0f0bfebf4 100755 --- a/harbour/make_rpmw32.sh +++ b/harbour/make_rpmw32.sh @@ -71,6 +71,7 @@ CCPATH="$MINGW_DIR/bin" cd `dirname $0` . bin/hb-func.sh hb_ver=`get_hbver` +hb_verstat=`get_hbverstat` NEED_RPM="make gcc binutils bash" @@ -126,6 +127,7 @@ then fi mv ${hb_filename} ${RPMDIR}/SOURCES/ sed -e "s|^%define version .*$|%define version ${hb_ver}|g" \ + -e "s|^%define releasen .*$|%define releasen ${hb_verstat}|g" \ -e "s|^%define hb_ccpath .*$|%define hb_ccpath ${CCPATH}|g" \ -e "s|^%define hb_ccpref .*$|%define hb_ccpref ${CCPREFIX}|g" \ harbour-w32-spec > ${RPMDIR}/SPECS/harbour-w32.spec