Changeset 721 for trunk/technical/common


Ignore:
Timestamp:
Oct 2, 2008, 5:16:21 PM (16 years ago)
Author:
joergs
Message:

modify Version, instead of Release, because Release is set by openSUSE build service

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/technical/common/build/svn_build_prepare.sh

    r720 r721  
    99BUILDTEMP=$DEST_DIR/buildsrc/
    1010
     11[ -z "$BUILD_USES_SVN" ] && BUILD_USES_SVN="yes"
    1112
    1213if [ -z "$1" ]; then
     
    1718elif [ -r "$1" ]; then
    1819    # parameter is src.rpm file
    19         PACKAGE=`rpm -qp --qf "%{NAME}" $1`
    20         VERSION=`rpm -qp --qf "%{VERSION}" $1`
     20    PACKAGE=`rpm -qp --qf "%{NAME}" $1`
     21    VERSION=`rpm -qp --qf "%{VERSION}" $1`
    2122fi
    2223
     
    6162            SVN_BUILD_RELEASE=${SVN_BUILD_RELEASE}p
    6263        else # check if RPM has been build already
     64            # TODO: this chekc is broken for OpenSUSE build service,
     65            #       because version is changed later on
    6366            EXPECTED_DEST_RPM_FILENAME=${DEST_DIR}/${BUILD_DIST}/${PACKAGE}-${VERSION}-${SVN_BUILD_RELEASE}.*.rpm
    6467            if [ -f $EXPECTED_DEST_RPM_FILENAME ]; then
     
    7073        fi
    7174        if [ "$SVN_BUILD_RELEASE" ]; then
    72             sed "s/^Release:.*/Release: $SVN_BUILD_RELEASE/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     75            # Release will be overwritten bei OpenSUSE build service,
     76            # therefore we add SVN_BUILD_RELEASE to Version
     77            VERSION_ORIG=$VERSION
     78            VERSION=$VERSION.$SVN_BUILD_RELEASE
     79            #sed "s/^Release:.*/Release: $SVN_BUILD_RELEASE/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     80            #sed -r "s/^(Version:\s*\S*)/\1.$SVN_BUILD_RELEASE/ig"  $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     81            sed "s/^Version:.*/Version: $VERSION/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    7382        fi
    7483        echo "SVN_BUILD_RELEASE: $SVN_BUILD_RELEASE"
    7584       
     85        printf "adding subversion changelog: "
    7686        # changelog header
    7787        DATE=`unset LANG; date +"%a %b %d %Y"`
     
    95105            cat Changes | sed 's/\(^[\*]\+\)//g' >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    96106        fi
     107        printf "done\n"
    97108    fi
    98109    # just make sure, that the Changes file exist
Note: See TracChangeset for help on using the changeset viewer.