source: trunk/packages/invirt-dev/invirt-build-release @ 2006

Last change on this file since 2006 was 1863, checked in by price, 16 years ago

invirt-build-release: factor out distribution

  • Property svn:executable set to *
File size: 1.8 KB
RevLine 
[16]1#!/bin/bash
[1863]2distribution=hardy
[1486]3svnuri="$(invirt-getconf svn.uri)"
[10]4
5set -e
[1671]6if  [ $# -eq 0 ] ; then
7        echo " usage: invirt-build-release package_name [package_name [...]]"
[10]8        exit 1
9fi
10
[1671]11for package; do
12    rm -rf build-release/$package
13    svn export $svnuri/trunk/packages/$package build-release/$package
14    cd build-release/$package
15   
[1860]16    eval $(perl -ne 'print if s/^(Version|Source|Distribution): /\1=/' \
17             <(dpkg-parsechangelog))
[1671]18    dpkg-buildpackage -us -uc -rfakeroot -S
19    cd ..
[1860]20    eval $(perl -ne 'print if s/^(Architecture): /\1=/' ${Source}_${Version}.dsc)
[1859]21    case $Architecture in
22      all)
[1863]23        sbuild -d $distribution --arch-all   ${Source}_${Version}.dsc;;
[1859]24      any)
[1863]25        sbuild -d $distribution --arch amd64 ${Source}_${Version}.dsc
26        sbuild -d $distribution --arch i386  ${Source}_${Version}.dsc;;
[1859]27      *)
[1860]28        echo "invirt-build-release: arch '$Architecture' unimplemented" >&2
[1859]29        exit 1
30    esac
31
[1671]32    if ! svn ls $svnuri/package_tags/$Source >/dev/null 2>&1; then
33        svn mkdir $svnuri/package_tags/$Source \
34            -m "Create package tags directory"
35    fi
36    if ! svn ls $svnuri/package_tags/$Source/$Version >/dev/null 2>&1; then
37        svn cp $svnuri/trunk/packages/$package $svnuri/package_tags/$Source/$Version \
38            -m "Tag $Version of $Source"
39    else
40        echo "$(basename $0): tag already exists, not making again"
41    fi
42   
43    [ $Distribution = 'unstable' ] \
[1860]44        || echo "$(basename $0): warning: Distribution is $Distribution, script expects unstable"
[1671]45    changesfile=`pwd`/${Source}_*${Version}*.changes
46    for i in $changesfile; do
47        reprepro-env include unstable $i
[1860]48        reprepro-env copy stable unstable $(sed -ne 's/^Binary: //p' $i)
[1671]49    done
[1860]50    reprepro-env copy stable unstable $Source
[1671]51   
52    cd ..
[1860]53    rm -rf build-release/$package
[1172]54done
Note: See TracBrowser for help on using the repository browser.