Ignore:
Timestamp:
Jun 25, 2011, 7:54:31 PM (13 years ago)
Author:
joergs
Message:

bugfix: do not modify spec file, when building package from SPECSOURCES (instead of SOURCES)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dassbuild/trunk/usr/bin/dassbuild_prepare.sh

    r946 r951  
    3131
    3232[ -z "$BUILD_USES_SVN" ] && BUILD_USES_SVN="yes"
     33[ -z "$BUILD_MODIFIES_SPEC" ] && BUILD_MODIFIES_SPEC="yes"
    3334
    3435if [ -z "$1" ]; then
     
    4142    PACKAGE=`rpm -qp --qf "%{NAME}" $1`
    4243    VERSION=`rpm -qp --qf "%{VERSION}" $1`
     44    unset BUILD_MODIFIES_SPEC
    4345fi
    4446
     
    154156        mkdir -p ${BUILDTEMP}/src/${PACKAGE}
    155157        cp -av `cat SPECSOURCES` ${BUILDTEMP}/src/${PACKAGE}
     158
     159        # do not modify SPEC-file
     160        unset BUILD_MODIFIES_SPEC
    156161   
    157162    else
     
    165170
    166171    echo $SVN_BUILD_RELEASE
    167     if [ "$SVN_BUILD_RELEASE" ]; then
    168         # Release will be overwritten bei OpenSUSE build service,
    169         # therefore we add SVN_BUILD_RELEASE to Version
    170         #sed "s/^Release:.*/Release: $SVN_BUILD_RELEASE/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    171         #sed -r "s/^(Version:\s*\S*)/\1.$SVN_BUILD_RELEASE/ig"  $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    172         sed -i "s/^Version:.*/Version: $VERSION/ig" ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    173     fi
    174 
    175     if [ "$SOURCE_ARCHIVE" ]; then
    176         sed -i "s/^Source:.*/Source: $SOURCE_ARCHIVE/ig" ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     172    if [ "$BUILD_MODIFIES_SPEC" = "yes" ]; then
     173        if [ "$SVN_BUILD_RELEASE" ]; then
     174            # Release will be overwritten bei OpenSUSE build service,
     175            # therefore we add SVN_BUILD_RELEASE to Version
     176            #sed "s/^Release:.*/Release: $SVN_BUILD_RELEASE/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     177            #sed -r "s/^(Version:\s*\S*)/\1.$SVN_BUILD_RELEASE/ig"  $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     178            sed -i "s/^Version:.*/Version: $VERSION/ig" ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     179        fi
     180
     181        if [ "$SOURCE_ARCHIVE" ]; then
     182            sed -i "s/^Source:.*/Source: $SOURCE_ARCHIVE/ig" ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     183        fi
    177184    fi
    178185
Note: See TracChangeset for help on using the changeset viewer.