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

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

invirt-build-release: separate distribution, architecture

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