Changeset 946 for dassbuild


Ignore:
Timestamp:
Jun 17, 2011, 12:15:51 AM (14 years ago)
Author:
joergs
Message:

create $PACKAGES.changes instead of Changes. This is done, because this is supported by the openSUSE Build Service. Format have changed

File:
1 edited

Legend:

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

    r762 r946  
    112112        printf "adding subversion changelog: "
    113113        # changelog header
    114         DATE=`unset LANG; date +"%a %b %d %Y"`
    115         echo -e "* $DATE - svn_build\n" > Changes
     114        echo "-------------------------------------------------------------------" > Changes
     115        DATE=`unset LANG; date +"%a %b %d %T UTC %Y"`
     116        echo -e "$DATE - svn_build@localhost\n" >> Changes
    116117        echo "- Subversion status:" >> Changes
    117118        # additional infos for the Changes file (see if everything is checked in)
     
    121122        # requires connection to the subversion server
    122123        svn log -v . > ChangeLog.new && mv ChangeLog.new ChangeLog
    123         cat ChangeLog >> Changes
    124 
     124        # indent all svn revisions by "- ", to form a changelog entry,
     125        # changelog format uses * at the start of the line to determine new entry,
     126        #   therefore replace our * by -
     127        # % may be treated as a macro, there replaced by %%
     128        sed -r -e 's/^(r[0-9]+ \|)/- \1/' -e 's/(^[\*]+)/-/g' -e 's/%/%%/g'  ChangeLog >> Changes
     129        mv Changes $PACKAGE.changes
    125130        printf "done\n"
    126131    fi
    127 
    128     # just make sure, that the Changes file exists
    129     touch Changes
    130132
    131133    # if "SOURCES" file exist, create tar file on the fly
     
    159161
    160162    # copy orig SPEC-file (may be modified later)
    161     cp -a $SPECFILE ${BUILDTEMP}/src/${PACKAGE}
     163    cp -a $SPECFILE ${BUILDTEMP}/src/${PACKAGE}/
     164    test -r ${PACKAGE}.changes && cp -a ${PACKAGE}.changes ${BUILDTEMP}/src/${PACKAGE}/
    162165
    163166    echo $SVN_BUILD_RELEASE
     
    176179    # if there is no changelog section in the spec file,
    177180    # also append the Changes there
    178     if ! grep -q -i "%changelog" $SPECFILE ; then
    179         # paste "Changes" into SPEC file.
    180         echo "%changelog" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    181         # without trailing *, except for the initial
    182         echo -n "*" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    183         cat Changes | sed 's/\(^[\*]\+\)//g' >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
    184     fi
     181    # if ! grep -q -i "%changelog" $SPECFILE ; then
     182    #     # paste "Changes" into SPEC file.
     183    #     echo "%changelog" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     184    #     # without trailing *, except for the initial
     185    #     echo -n "*" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     186    #     cat Changes | sed 's/\(^[\*]\+\)//g' >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE
     187    # fi
    185188
    186189    # if there is a directory named "debian", prepare the
     
    213216    fi
    214217
    215 
    216218fi
    217219exit 0
Note: See TracChangeset for help on using the changeset viewer.