Changeset 726 for trunk/technical/common
- Timestamp:
- Oct 2, 2008, 6:52:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/technical/common/build/svn_build_prepare.sh
r724 r726 9 9 # 1 build directory already up-to-date. Nothing to do. 10 10 # 255 error 11 12 # TODO: 13 # needs force parameter for tar.bz2 creation 11 14 12 15 BUILDUSER=$USER … … 49 52 fi 50 53 else 51 cp -a $SPECFILE ${BUILDTEMP}/src/${PACKAGE}52 53 54 # uses Subversion (svn) to generate more information for the RPM 54 55 if [ "$BUILD_USES_SVN" = "yes" ]; then … … 79 80 fi 80 81 fi 82 81 83 if [ "$SVN_BUILD_RELEASE" ]; then 82 84 # Release will be overwritten bei OpenSUSE build service, … … 84 86 VERSION_ORIG=$VERSION 85 87 VERSION=$VERSION.$SVN_BUILD_RELEASE 86 #sed "s/^Release:.*/Release: $SVN_BUILD_RELEASE/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE87 #sed -r "s/^(Version:\s*\S*)/\1.$SVN_BUILD_RELEASE/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE88 sed "s/^Version:.*/Version: $VERSION/ig" $SPECFILE > ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE89 88 fi 90 89 echo "SVN_BUILD_RELEASE: $SVN_BUILD_RELEASE" … … 93 92 # changelog header 94 93 DATE=`unset LANG; date +"%a %b %d %Y"` 95 echo -e "* $DATE -\n" > Changes94 echo -e "* $DATE svn_build\n" > Changes 96 95 echo "- Subversion status:" >> Changes 97 96 # additional infos for the Changes file (see if everything is checked in) … … 103 102 cat ChangeLog >> Changes 104 103 105 # if there is no changelog section in the spec file,106 # also append the Changes there107 if ! grep -q -i "%changelog" $SPECFILE ; then108 # paste "Changes" into SPEC file.109 echo "%changelog" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE110 # without trailing *, except for the initial111 echo -n "*" >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE112 cat Changes | sed 's/\(^[\*]\+\)//g' >> ${BUILDTEMP}/src/${PACKAGE}/$SPECFILE113 fi114 104 printf "done\n" 115 105 fi … … 142 132 exit 255 143 133 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 144 157 fi
Note:
See TracChangeset
for help on using the changeset viewer.