summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-package61
-rwxr-xr-xbin/updatebuildmain2
2 files changed, 36 insertions, 27 deletions
diff --git a/bin/build-package b/bin/build-package
index 3a891b6..f1c24de 100755
--- a/bin/build-package
+++ b/bin/build-package
@@ -126,23 +126,27 @@ clear_pkgdist() {
if [ "x$EXTRA_ARCHS_ONLY" = "x" ]; then
for l_ARCH in amd64 i386; do
- mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.changes"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.upload"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.build"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.dsc"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_*.tar.gz"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/*.deb"
+ [ "x$SKIP_ARCH" != "x$l_ARCH" ] && {
+ mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH"
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/dupload.conf"
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_"*.changes
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_"*.upload
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_"*.build
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_"*.dsc
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/$PROJECT_"*.tar.gz
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/"*.deb
+ }
done
fi
for l_EXTRA_ARCH in $EXTRA_ARCHS; do
mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.changes"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.upload"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.build"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.dsc"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_*.tar.gz"
- rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/*.deb"
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/dupload.conf"
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_"*.changes
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_"*.upload
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_"*.build
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_"*.dsc
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/$PROJECT_"*.tar.gz
+ rm -f "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH/"*.deb
done
done
}
@@ -170,11 +174,16 @@ build_packages() {
git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/"
cd "$TEMP_DIR/$PROJECT"
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 native packages for our repos
test -f debian/source/format && cat debian/source/format | egrep '^3.0.*\(quilt\)$' >/dev/null && {
echo "3.0 (native)" > debian/source/format
- }
+ }
+
+ # for Ubuntu version is the codename of the distribution release
+ VERSION=$l_CODENAME
+
# translate the version name for Debian releases
[ "x$l_CODENAME" = "xsid" ] && VERSION=unstable
[ "x$l_CODENAME" = "xwheezy" ] && VERSION=testing
@@ -195,10 +204,10 @@ build_packages() {
[ "x$USE_SUDO" != "xyes" ] && {
[ "x$EXTRA_ARCHS_ONLY" = "x" ] && {
- cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && {
+ [ "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" 0<&-
}
- cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && {
+ [ "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 0<&-
}
}
@@ -211,10 +220,10 @@ build_packages() {
}
[ "x$USE_SUDO" = "xyes" ] && {
[ "x$EXTRA_ARCHS_ONLY" = "x" ] && {
- cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && {
+ [ "x$SKIP_ARCH" != "xamd64" ] && cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && {
sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 OTHERMIRROR="$OTHERMIRROR" $PDEBUILD --auto-debsign --debsign-k $GPG_KEY --buildresult $PKGDIST/$l_DIST/$l_CODENAME/amd64 0<&-
}
- cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && {
+ [ "x$SKIP_ARCH" != "xi386" ] && cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && {
sudo 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 0<&-
}
}
@@ -234,7 +243,6 @@ build_packages() {
upload_packages() {
# dupload the new packages to the reprepro repository
- cd "$PKGDIST"
cat "$PROJECT_DIR/BUILDS_FOR" | egrep -v '(^$|^#.*$)' | while read line; do
l_DIST=$(echo ${line/: /:} | cut -d":" -f1 | tr [:upper:] [:lower:])
l_CODENAMES=${CODENAMES:-$(echo ${line/: /:} | cut -d":" -f2- | tr [:upper:] [:lower:])}
@@ -245,20 +253,21 @@ upload_packages() {
test -z $CODENAMES || echo $line | grep $CODENAMES || break
if [ "x$EXTRA_ARCHS_ONLY" = "x" ]; then
- for l_ARCH in amd64 i386; do
- cd "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH"
- ls "$PROJECT_*.changes" &>/dev/null && dupload -c ~/.dupload.conf.$PREFIX --to $PREFIX-$l_DIST-$l_CODENAME "$PROJECT_*.changes"
- cd -
+ for l_ARCH in amd64 i386; do
+ [ "x$SKIP_ARCH" != "x$l_ARCH" ] && {
+ cd "$PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH"
+ test -f ./dupload.conf || ln -s ~/.dupload.conf.$PREFIX ./dupload.conf
+ ls $PROJECT_*.changes &>/dev/null && dupload -c --to $PREFIX-$l_DIST-$l_CODENAME $PROJECT_*.changes 0<&-
+ }
done
fi
for l_EXTRA_ARCH in $EXTRA_ARCHS; do
cd "$PKGDIST/$l_DIST/$l_CODENAME/$l_EXTRA_ARCH"
- ls "$PROJECT_*.changes" &>/dev/null && dupload -c ~/.dupload.conf.$PREFIX --to $PREFIX-$l_DIST-$l_CODENAME "$PROJECT_*.changes"
- cd -
+ test -f ./dupload.conf || ln -s ~/.dupload.conf.$PREFIX ./dupload.conf
+ ls $PROJECT_*.changes &>/dev/null && dupload -c --to $PREFIX-$l_DIST-$l_CODENAME $PROJECT_*.changes 0<&-
done
done
done
- cd -
return 0
}
diff --git a/bin/updatebuildmain b/bin/updatebuildmain
index f4abe4e..54c3544 100755
--- a/bin/updatebuildmain
+++ b/bin/updatebuildmain
@@ -20,7 +20,7 @@
set -e
GITPROJECT=$(basename $(pwd))
-REF=$1
+REF=${1-HEAD}
# we need to be within a working copy (base folder) and we need a <REF>!!!
test -z $1 || test -d ./.git || {