- Timestamp:
- Dec 24, 2008, 2:12:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/technical/common/build/svn_build_prepare.sh
r730 r731 13 13 # needs force parameter for tar.bz2 creation 14 14 15 # when building debian packages, which files from the "debian" 16 # directory are required in addition to the package description 17 # and changelog 18 DEBFILES="control rules" 15 16 filesize() 17 { 18 stat --format='%s' $* 19 } 20 21 md5() 22 { 23 md5sum $* | cut -f 1 -d ' ' 24 } 25 26 export LANG=C 19 27 20 28 BUILDUSER=$USER … … 109 117 printf "done\n" 110 118 fi 119 111 120 # just make sure, that the Changes file exists 112 121 touch Changes 113 122 114 123 # if "SOURCES" file exist, create tar file on the fly 115 124 if [ -r "SOURCES" ]; then … … 162 171 # if there is a directory named "debian", prepare the 163 172 # necessary files to build a debian package on OpenSUSE build service 164 165 173 if [ -d debian ]; then 166 LANG=C;export LANG 167 # replace version number in the description file 168 sed -e "s/^Version:.*/Version: $VERSION-1/ig" -e "/^Files:/,$ d" debian/${PACKAGE} >${BUILDTEMP}/src/${PACKAGE}/${PACKAGE}.dsc 169 # update the file list in the description file 170 (echo "Files: "; echo " 0 0 ${PACKAGE}-${VERSION}.tar.bz2"; echo " 0 0 ${PACKAGE}_${VERSION}-1.diff.gz") >>${BUILDTEMP}/src/${PACKAGE}/${PACKAGE}.dsc 174 171 175 # create a changelog file 172 176 (echo "${PACKAGE} (${VERSION}-1) unstable; urgency=low" … … 176 180 echo -n " -- dass IT GmbH <info@dass-it.de> "; date +"%a, %e %b %Y %X %z" 177 181 echo 178 )>${BUILDTEMP}/src/${PACKAGE}/debian.changelog 179 # copy files from "debian" directory into the package directory, renaming 180 # them accordingly 181 for f in $DEBFILES 182 do 183 [ -r "debian/$f" ] && cp "debian/$f" ${BUILDTEMP}/src/${PACKAGE}/debian.$f 184 done 185 fi 182 )>debian/changelog 183 184 tar cvzf ${BUILDTEMP}/src/${PACKAGE}/${PACKAGE}_${VERSION}.orig.tar.gz --files-from SOURCES --exclude .svn --exclude "*~" 185 186 # create DSC file from template 187 # replace version number in the description file 188 sed -e "s/^Version:.*/Version: $VERSION-1/ig" -e "/^Files:/,$ d" debian/${PACKAGE}.dsc >${BUILDTEMP}/src/${PACKAGE}/${PACKAGE}_${VERSION}-1.dsc 189 190 # update the file list in the description file 191 files="${PACKAGE}_${VERSION}.orig.tar.gz" 192 echo "Files: " >> ${BUILDTEMP}/src/${PACKAGE}/${PACKAGE}_${VERSION}-1.dsc 193 for filename in $files; do 194 path=${BUILDTEMP}/src/${PACKAGE}/$filename 195 printf ' %s %s %s\n' `md5 $path` `filesize $path` $filename >> ${BUILDTEMP}/src/${PACKAGE}/${PACKAGE}_${VERSION}-1.dsc 196 done 197 198 fi 199 200 186 201 fi 187 202 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.