diff options
author | X2Go Admin Account <x2go-admin@japsand.x2go.org> | 2013-11-28 08:48:00 +0100 |
---|---|---|
committer | X2Go Admin Account <x2go-admin@japsand.x2go.org> | 2013-11-28 08:48:00 +0100 |
commit | e9ed6ea1577b8d3ead5301ee208816a54b92794e (patch) | |
tree | 072c63e15e22c3ac94717b4e03299ac05ae77a30 /bin/build-package | |
parent | ca2930e9da19a9dcc8df8c98ab3b97b07d250608 (diff) | |
parent | 88e9aff58cc70500493798fd9223287ce6ae73e0 (diff) | |
download | buildscripts-e9ed6ea1577b8d3ead5301ee208816a54b92794e.tar.gz buildscripts-e9ed6ea1577b8d3ead5301ee208816a54b92794e.tar.bz2 buildscripts-e9ed6ea1577b8d3ead5301ee208816a54b92794e.zip |
Merge branch 'master' of git://code.x2go.org/buildscripts
Conflicts (resolved by Mike Gabriel):
bin/build-package
Diffstat (limited to 'bin/build-package')
-rwxr-xr-x | bin/build-package | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/bin/build-package b/bin/build-package index 1ccd3db..4d73daf 100755 --- a/bin/build-package +++ b/bin/build-package @@ -103,13 +103,19 @@ prepare_workspace() { cd "$PROJECT_DIR" && git reset --hard git checkout --force $CHECKOUT || git checkout --force -b $CHECKOUT git pull origin $CHECKOUT + git fetch origin upstream:upstream || true + git fetch origin pristine-tar:pristine-tar || true # and again, get the $CHECKOUT refspec in pure state git reset --hard + git clean -df else cd "$(dirname $PROJECT_DIR)" git clone git://$GIT_HOSTNAME/$PROJECT_PATH.git cd "$PROJECT" git checkout --force $CHECKOUT || git checkout --force -b $CHECKOUT; + git fetch origin upstream:upstream + git fetch origin pristine-tar:pristine-tar || true + git clean -df fi cd "$PROJECT_DIR" @@ -188,9 +194,19 @@ build_packages() { git checkout $CHECKOUT || git checkout master find $PROJECT_DIR/../ -type f -maxdepth 0 -mindepth 0 | grep $PROJECT_*.orig.tar.gz &>/dev/null && cp $PROJECT_DIR/../$PROJECT_*.orig.tar.gz .. GITREV=$(gitrevno) - # we always build 1.0 source format packages for our repos + + # we always build native packages for our repos + SA_OPTION="" + + # we always build native packages for our repos + SA_OPTION="" test -f debian/source/format && cat debian/source/format | egrep '^3.0.*\(quilt\)$' >/dev/null && { - echo "1.0" > debian/source/format + git fetch origin upstream:upstream + UPSTREAM_VERSION=$(dpkg-parsechangelog | grep Version: | cut -d " " -f2 | sed -e 's/-.*//' -e 's/^.*://') + REVISION=$(dpkg-parsechangelog | grep Version: | cut -d " " -f2 | sed -e 's/.*-//') + git archive --prefix=${PROJECT}-${UPSTREAM_VERSION}/ -o ../${PROJECT}_${UPSTREAM_VERSION}.orig.tar.gz upstream/${UPSTREAM_VERSION} && { + SA_OPTION="--debbuildopts=-sa" + } || echo "1.0" > debian/source/format } # for Ubuntu version is the codename of the distribution release @@ -224,32 +240,32 @@ build_packages() { [ "x$USE_SUDO" != "xyes" ] && { [ "x$EXTRA_ARCHS_ONLY" = "x" ] && { [ "x$SKIP_ARCH" != "xamd64" ] && cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && { - DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/amd64" -- --allow-untrusted 0<&- + DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/amd64" -- --allow-untrusted $SA_OPTION 0<&- } [ "x$SKIP_ARCH" != "xi386" ] && cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && { - DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/i386" -- --binary-arch --allow-untrusted 0<&- + DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/i386" -- --binary-arch --allow-untrusted $SA_OPTION 0<&- } } for extra_arch in $EXTRA_ARCHS; do mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch" cat debian/control | egrep "Architecture.*(any|$extra_arch)" >/dev/null && { - DIST=$l_DIST CODENAME=$l_CODENAME ARCH=$extra_arch $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch" -- --binary-arch --allow-untrusted 0<&- + DIST=$l_DIST CODENAME=$l_CODENAME ARCH=$extra_arch $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch" -- --binary-arch --allow-untrusted $SA_OPTION 0<&- } done } [ "x$USE_SUDO" = "xyes" ] && { [ "x$EXTRA_ARCHS_ONLY" = "x" ] && { [ "x$SKIP_ARCH" != "xamd64" ] && cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && { - sudo GNUPGHOME=$GNUPGHOME DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult $PKGDIST/$l_DIST/$l_CODENAME/amd64 -- --allow-untrusted 0<&- + sudo GNUPGHOME=$GNUPGHOME DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult $PKGDIST/$l_DIST/$l_CODENAME/amd64 -- --allow-untrusted $SA_OPTION 0<&- } [ "x$SKIP_ARCH" != "xi386" ] && cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && { - sudo GNUPGHOME=$GNUPGHOME DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult $PKGDIST/$l_DIST/$l_CODENAME/i386 -- --binary-arch --allow-untrusted 0<&- + sudo GNUPGHOME=$GNUPGHOME DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult $PKGDIST/$l_DIST/$l_CODENAME/i386 -- --binary-arch --allow-untrusted $SA_OPTION 0<&- } } for extra_arch in $EXTRA_ARCHS; do mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch" cat debian/control | egrep "Architecture.*(any|$extra_arch)" >/dev/null && { - sudo GNUPGHOME=$GNUPGHOME DIST=$l_DIST CODENAME=$l_CODENAME ARCH=$extra_arch OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch" -- --binary-arch --allow-untrusted 0<&- + sudo GNUPGHOME=$GNUPGHOME DIST=$l_DIST CODENAME=$l_CODENAME ARCH=$extra_arch OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult "$PKGDIST/$l_DIST/$l_CODENAME/$extra_arch" -- --binary-arch --allow-untrusted $SA_OPTION 0<&- } done } |