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

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

invirt-build-release: handle amd64 and i386

  • Property svn:executable set to *
File size: 1.8 KB
RevLine 
[16]1#!/bin/bash
[1486]2svnuri="$(invirt-getconf svn.uri)"
[10]3
4set -e
[1671]5if  [ $# -eq 0 ] ; then
6        echo " usage: invirt-build-release package_name [package_name [...]]"
[10]7        exit 1
8fi
9
[1671]10for package; do
11    rm -rf build-release/$package
12    svn export $svnuri/trunk/packages/$package build-release/$package
13    cd build-release/$package
14   
15    eval  `perl '-F:\s+' -lane 'print  $F[0]."=".$F[1] if /^Version|^Source|^Distribution/' \
16        <(dpkg-parsechangelog)`
[1859]17    eval $(perl '-F:\s+' -lane 'print $F[0]."=".$F[1] if /^Binary|Architecture/' <"../${Source}_${Version}.dsc")
18
[1671]19    dpkg-buildpackage -us -uc -rfakeroot -S
20    cd ..
[1859]21    case $Architecture in
22      all)
23        sbuild -A -d hardy "${Source}_${Version}.dsc";;
24      any)
25        sbuild -d hardy-amd64 "${Source}_${Version}.dsc"
26        sbuild -d hardy-i386  "${Source}_${Version}.dsc";;
27      *)
28        echo "invirt-build-release: architecture '$Architecture' not 'all' or 'any'" >&2
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' ] \
44        || echo "$(basename $0): warning: Distribution is ${Distribution}, script expects unstable"
45    changesfile=`pwd`/${Source}_*${Version}*.changes
46    for i in $changesfile; do
47        reprepro-env include unstable $i
48        reprepro-env copy stable unstable \
49            $(perl '-F:\s+' -lane 'print $F[1]." " if /^Binary/' <$i)
50    done
51    reprepro-env copy stable unstable ${Source}
52   
53    cd ..
54    rm -rf build-release
[1172]55done
Note: See TracBrowser for help on using the repository browser.