Changeset 726 for trunk/technical


Ignore:
Timestamp:
Oct 2, 2008, 6:52:33 PM (16 years ago)
Author:
joergs
Message:

bugfix: more changes for checking for existing tar.bz2

File:
1 edited

Legend:

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

    r724 r726  
    99#   1   build directory already up-to-date. Nothing to do.
    1010# 255   error
     11
     12# TODO:
     13#   needs force parameter for tar.bz2 creation
    1114
    1215BUILDUSER=$USER
     
    4952    fi
    5053else
    51     cp -a $SPECFILE ${BUILDTEMP}/src/${PACKAGE}
    52    
    5354    # uses Subversion (svn) to generate more information for the RPM
    5455    if [ "$BUILD_USES_SVN" = "yes" ]; then
     
    7980            fi
    8081        fi
     82
    8183        if [ "$SVN_BUILD_RELEASE" ]; then
    8284            # Release will be overwritten bei OpenSUSE build service,
     
    8486            VERSION_ORIG=$VERSION
    8587            VERSION=$VERSION.$SVN_BUILD_RELEASE
    86             #sed "s/^Release:.*/Release: $SVN_BUILD_RELEASE/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    87             #sed -r "s/^(Version:\s*\S*)/\1.$SVN_BUILD_RELEASE/ig"  $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    88             sed "s/^Version:.*/Version: $VERSION/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    8988        fi
    9089        echo "SVN_BUILD_RELEASE: $SVN_BUILD_RELEASE"
     
    9392        # changelog header
    9493        DATE=`unset LANG; date +"%a %b %d %Y"`
    95         echo -e "* $DATE -\n" > Changes
     94        echo -e "* $DATE svn_build\n" > Changes
    9695        echo "- Subversion status:" >> Changes
    9796        # additional infos for the Changes file (see if everything is checked in)
     
    103102        cat ChangeLog >> Changes
    104103       
    105         # if there is no changelog section in the spec file,
    106         # also append the Changes there
    107         if ! grep -q -i "%changelog" $SPECFILE ; then
    108             # paste "Changes" into SPEC file.
    109             echo "%changelog" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    110             # without trailing *, except for the initial
    111             echo -n "*" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    112             cat Changes | sed 's/\(^[\*]\+\)//g' >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    113         fi
    114104        printf "done\n"
    115105    fi
     
    142132        exit 255
    143133    fi
     134
     135   
     136    echo $SVN_BUILD_RELEASE
     137    if [ "$SVN_BUILD_RELEASE" ]; then
     138        # Release will be overwritten bei OpenSUSE build service,
     139        # therefore we add SVN_BUILD_RELEASE to Version
     140        #sed "s/^Release:.*/Release: $SVN_BUILD_RELEASE/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     141        #sed -r "s/^(Version:\s*\S*)/\1.$SVN_BUILD_RELEASE/ig"  $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     142        sed "s/^Version:.*/Version: $VERSION/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     143    else
     144        cp -a $SPECFILE ${BUILDTEMP}/src/${PACKAGE}
     145    fi
     146
     147    # if there is no changelog section in the spec file,
     148    # also append the Changes there
     149    if ! grep -q -i "%changelog" $SPECFILE ; then
     150        # paste "Changes" into SPEC file.
     151        echo "%changelog" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     152        # without trailing *, except for the initial
     153        echo -n "*" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     154        cat Changes | sed 's/\(^[\*]\+\)//g' >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     155    fi
     156
    144157fi
Note: See TracChangeset for help on using the changeset viewer.