summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/x2go-buildpackage109
-rw-r--r--build-package-for-reprepro.sh64
-rw-r--r--home/.dupload.conf40
-rwxr-xr-xhome/.pbuilder-hooks/D10_apt-update6
-rw-r--r--home/.pbuilderrc23
5 files changed, 178 insertions, 64 deletions
diff --git a/bin/x2go-buildpackage b/bin/x2go-buildpackage
new file mode 100755
index 0000000..07d5057
--- /dev/null
+++ b/bin/x2go-buildpackage
@@ -0,0 +1,109 @@
+#!/bin/bash
+
+# Copyright (C) 2010 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+#
+# This programme is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programme is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+set -e
+set -x
+
+test -z $1 && { echo usage: <x2go-git-project> [main|heuler]; exit -1; }
+
+PACKAGE=$1
+COMPONENT=${2-heuler}
+
+PACKAGE_DIR=$(pwd)/$PACKAGE
+DIST_SUPPORTED="debian ubuntu"
+PKGDIST="$(pwd)/../pkg-dist/$PACKAGE"
+
+# make sure our local working copy is up to date...
+test -d $PACKAGE_DIR/.git && { cd $PACKAGE_DIR && git reset --hard; git pull; } || git clone git://code.x2go.org/$PACKAGE.git
+cd $PACKAGE_DIR
+
+# by default we build for all current debian versions
+test -f BUILDS_FOR || cat > BUILDS_FOR <<EOF
+debian: sid wheezy squeeze lenny
+#ubuntu: lucid maverick natty
+EOF
+
+# pkgdist directory cleanup
+cat BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do
+ l_DIST=$(echo $line | cut -d":" -f1 | tr [A-Z] [a-z])
+ CODENAMES=$(echo $line | cut -d":" -f2- | tr [A-Z] [a#-z])
+ echo "$DIST_SUPPORTED" | grep $l_DIST >/dev/null && {
+ for l_CODENAME in $CODENAMES; do
+ mkdir -p $PKGDIST/$l_DIST/$l_CODENAME
+ rm -f $PKGDIST/$l_DIST/$l_CODENAME/$PACKAGE_*.changes
+ rm -f $PKGDIST/$l_DIST/$l_CODENAME/$PACKAGE_*.upload
+ rm -f $PKGDIST/$l_DIST/$l_CODENAME/$PACKAGE_*.build
+ rm -f $PKGDIST/$l_DIST/$l_CODENAME/$PACKAGE_*.dsc
+ rm -f $PKGDIST/$l_DIST/$l_CODENAME/$PACKAGE_*.tar.gz
+ rm -f $PKGDIST/$l_DIST/$l_CODENAME/$PACKAGE*.deb
+ done
+ }
+done
+
+
+# use pbuilder for building all variants of this package
+cat BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do
+ l_DIST=$(echo $line | cut -d":" -f1 | tr [A-Z] [a-z])
+ CODENAMES=$(echo $line | cut -d":" -f2- | tr [A-Z] [a#-z])
+ echo "$DIST_SUPPORTED" | grep $l_DIST >/dev/null && {
+ for l_CODENAME in $CODENAMES; do
+ TEMP_DIR="$(mktemp -d)"
+ git clone git://code.x2go.org/$PACKAGE.git $TEMP_DIR/
+ cd $TEMP_DIR/
+ # translate the version name for Debian releases
+ [ "x$l_CODENAME" = "xsid" ] && VERSION=unstable
+ [ "x$l_CODENAME" = "xwheezy" ] && VERSION=testing
+ [ "x$l_CODENAME" = "xsqueeze" ] && VERSION=stable
+ [ "x$l_CODENAME" = "xlenny" ] && VERSION=oldstable
+
+ # modify the section for non-main package builds
+ [ "x$COMPONENT" = "xmain" ] || {
+ mv debian/control debian/control.tmp
+ cat debian/control.tmp | sed "s#Section:[\ ]*\(.*\)#Section: $COMPONENT/\1#g" > debian/control
+ }
+
+ # modify changelog for this build
+ DEBEMAIL=git-admin@x2go.org DEBFULLNAME="X2go Git Administrator" dch --distribution $VERSION --force-distribution -l "+$l_CODENAME" "Auto-built $l_DIST $l_CODENAME package for packages.x2go.org repository."
+ cat debian/control | egrep 'Architecture.*(all|any|amd64)' >/dev/null && {
+ sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 pdebuild --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME
+ }
+ cat debian/control | egrep 'Architecture.*(any|i386)' >/dev/null && {
+ sudo DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 pdebuild --auto-debsign --debsign-k F4A7678C9C6B0B2B --buildresult $PKGDIST/$l_DIST/$l_CODENAME
+ }
+ cd -
+ rm -Rf $TEMP_DIR
+ done
+ echo
+ }
+ echo
+done
+
+# dupload the new packages to the reprepro repository
+cd $PKGDIST
+cat $PACKAGE_DIR/BUILDS_FOR | egrep -v '(^$|^#.*$)' | while read line; do
+ l_DIST=$(echo $line | cut -d":" -f1 | tr [A-Z] [a-z])
+ CODENAMES=$(echo $line | cut -d":" -f2- | tr [A-Z] [a-z])
+ for l_CODENAME in $CODENAMES; do
+ cd $PKGDIST/$l_DIST/$l_CODENAME
+ dupload --to x2go-$l_DIST-$l_CODENAME $PACKAGE_*.changes
+ cd -
+ done
+done
+cd -
+
diff --git a/build-package-for-reprepro.sh b/build-package-for-reprepro.sh
deleted file mode 100644
index 8ee97be..0000000
--- a/build-package-for-reprepro.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-
-# Copyright (C) 2010 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
-#
-# This programme is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This programme is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
-PACKAGE=$(basename `pwd`)
-
-$PKGDIST="$(pwd)/../pkg-dist/$PACKAGE"
-mkdir $PKGDIST
-
-rm -f $PKGDIST/$PACKAGE_*.changes
-rm -f $PKGDIST/$PACKAGE_*.upload
-rm -f $PKGDIST/$PACKAGE_*.build
-rm -f $PKGDIST/$PACKAGE_*.dsc
-rm -f $PKGDIST/$PACKAGE_*.tar.gz
-rm -f $PKGDIST/$PACKAGE*.deb
-
-TEMP_DIR="$(mktemp -d)"
-git clone git://code.x2go.org/$PACKAGE.git $TEMP_DIR/
-cd $TEMP_DIR/$PACKAGE
-
-BUILDS_FOR="""
-debian: sid wheezy squeeze
-ubuntu: lucid maverick natty
-"""
-
-for DIST_LIST in $BUILDS_FOR; do
- l_DIST=$(echo $DIST_LIST | cut -d":" -f1)
- CODENAMES=$(echo $DIST_LIST | cut -d":" -f2-)
- for l_CODENAME in $CODENAMES; do
- DIST=$l_DIST CODENAME=$l_CODENAME ARCH=amd64 pdebuild --buildresults $PKGDIST/$l_DIST/$l_CODENAME
- DIST=$l_DIST CODENAME=$l_CODENAME ARCH=i386 pdebuild --buildresults $PKGDIST/$l_DIST/$l_CODENAME
- done
-done
-cd -
-
-cd $PKGDIST
-for DIST_LIST in $BUILDS_FOR; do
- l_DIST=$(echo $DIST_LIST | cut -d":" -f1)
- CODENAMES=$(echo $DIST_LIST | cut -d":" -f2-)
- for l_CODENAME in $CODENAMES; do
- cd $PKGDIST/$l_DIST/$l_CODENAME
- dupload --to x2go-$l_DIST-$l_CODENAME $PACKAGE_*.dsc
- dupload --to x2go-$l_DIST-$l_CODENAME $PACKAGE_*.changes
- cd -
- done
-done
-cd -
-
-#rm -Rf $TEMP_DIR
diff --git a/home/.dupload.conf b/home/.dupload.conf
new file mode 100644
index 0000000..4eaba85
--- /dev/null
+++ b/home/.dupload.conf
@@ -0,0 +1,40 @@
+package config;
+
+### X2go/DEBIAN
+$cfg{"x2go-debian"} = {
+ fqdn => "code.x2go.org",
+ login => "x2go-admin",
+ method => "scpb",
+ incoming => "/srv/sites/x2go.org/packages/debian/incoming/_any_",
+ dinstall_runs => 1,
+};
+$cfg{"x2go-debian-sid"} = {
+ fqdn => "code.x2go.org",
+ login => "x2go-admin",
+ method => "scpb",
+ incoming => "/srv/sites/x2go.org/packages/debian/incoming/sid",
+ dinstall_runs => 1,
+};
+$cfg{"x2go-debian-wheezy"} = {
+ fqdn => "code.x2go.org",
+ login => "x2go-admin",
+ method => "scpb",
+ incoming => "/srv/sites/x2go.org/packages/debian/incoming/wheezy",
+ dinstall_runs => 1,
+};
+$cfg{"x2go-debian-squeeze"} = {
+ fqdn => "code.x2go.org",
+ login => "x2go-admin",
+ method => "scpb",
+ incoming => "/srv/sites/x2go.org/packages/debian/incoming/squeeze",
+ dinstall_runs => 1,
+};
+$cfg{"x2go-debian-lenny"} = {
+ fqdn => "code.x2go.org",
+ login => "x2go-admin",
+ method => "scpb",
+ incoming => "/srv/sites/x2go.org/packages/debian/incoming/lenny",
+ dinstall_runs => 1,
+};
+
+1;
diff --git a/home/.pbuilder-hooks/D10_apt-update b/home/.pbuilder-hooks/D10_apt-update
new file mode 100755
index 0000000..1dd04b8
--- /dev/null
+++ b/home/.pbuilder-hooks/D10_apt-update
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+echo Calling $0
+
+echo $OTHERMIRROR > /etc/apt/sources.list.d/other.list
+apt-get update
diff --git a/home/.pbuilderrc b/home/.pbuilderrc
new file mode 100644
index 0000000..f82191a
--- /dev/null
+++ b/home/.pbuilderrc
@@ -0,0 +1,23 @@
+#!/bin/bash
+DIST=${DIST-debian}
+CODENAME=${CODENAME-sid}
+ARCH=${ARCH-amd64}
+
+if [ "x$ARCH" = "xi386" ]; then
+ DEBBUILDOPTS="-B"
+fi
+
+if [ -n "${DIST}" ] && [ -n "${CODENAME}" ] && [ -n "${ARCH}" ]; then
+ if [ "x${DIST}" = "xubuntu" ]; then
+ MIRRORSITE="http://de.archive.ubuntu.com/ubuntu"
+ else
+ MIRRORSITE="http://ftp.de.debian.org/debian"
+ OTHERMIRROR="deb http://code.x2go.org/debian $CODENAME main"
+ fi
+ BASETGZ="`dirname $BASETGZ`/base-$DIST-$CODENAME-$ARCH.tgz"
+ DISTRIBUTION="$CODENAME"
+ BUILDRESULT="/var/cache/pbuilder/$DIST-$CODENAME-$ARCH/result/"
+ APTCACHE="/var/cache/pbuilder/$DIST-$CODENAME-$ARCH/aptcache/"
+fi
+
+export OTHERMIRROR