Changeset 731


Ignore:
Timestamp:
Dec 24, 2008, 2:12:10 AM (16 years ago)
Author:
joergs
Message:

adapted to new requirements from openSUSE build server

File:
1 edited

Legend:

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

    r730 r731  
    1313#   needs force parameter for tar.bz2 creation
    1414
    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
     16filesize()
     17{
     18        stat  --format='%s' $*
     19}
     20
     21md5()
     22{
     23        md5sum $* | cut -f 1 -d ' '
     24}
     25
     26export LANG=C
    1927
    2028BUILDUSER=$USER
     
    109117        printf "done\n"
    110118    fi
     119
    111120    # just make sure, that the Changes file exists
    112121    touch Changes
    113    
     122
    114123    # if "SOURCES" file exist, create tar file on the fly
    115124    if [ -r "SOURCES" ]; then
     
    162171    # if there is a directory named "debian", prepare the
    163172    # necessary files to build a debian package on OpenSUSE build service
    164 
    165173    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
    171175        # create a changelog file
    172176        (echo "${PACKAGE} (${VERSION}-1) unstable; urgency=low"
     
    176180        echo -n " -- dass IT GmbH <info@dass-it.de>  "; date +"%a, %e %b %Y %X %z"
    177181        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
    186201fi
    187202exit 0
Note: See TracChangeset for help on using the changeset viewer.