Added scripts to build debian packages

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2006-11-28 23:24:06 +00:00
parent 709d7afa23
commit 670717736f
6 changed files with 106 additions and 11 deletions

View File

@ -88,11 +88,16 @@ def getTasks(config_env):
# Job("co-mdk2006.24","distrib/all/build-rpm", ["beast", "co-mdk2006", "mdk2006", "2.4"], env=config_env),
])
xavierTask = Task([
Job("xavier", "distrib/all/build-deb", ["xavier", "/work/chroot/dapper", "dapper"], env=config_env),
])
buildTasks = [ #jaguarTask,
pantherTask,
tigerTask,
beastTask1,
beastTask2,
xavierTask,
]
# Finalization. This is for things that must wait until all the
@ -121,7 +126,8 @@ def usage():
print " skipdocs Don't rebuild the docs"
print " skipwin Don't do the remote Windows build"
print " skiposx Don't do the remote OSX build"
print " skiplinux Don't do the remote Linux (RPM) build"
print " skiprpm Don't do the remote Linux (RPM) build"
print " skipdeb Don't do the remote Linux (DEB) build"
print " skipclean Don't do the cleanup step on the remote builds"
print " skipupload Don't upload the builds to starship"
print " ansi Also do the ansi builds"
@ -166,8 +172,11 @@ def main(args):
elif flag == "skiposx":
config.skiposx = "yes"
elif flag == "skiplinux":
config.skiplinux = "yes"
elif flag == "skipdeb":
config.skipdeb = "yes"
elif flag == "skiprpm":
config.skiprpm = "yes"
elif flag == "skipclean":
config.skipclean = "yes"
@ -198,7 +207,8 @@ def main(args):
file("DAILY_BUILD", "w").write(config.DAILY)
sys.path.append('.')
import setup
config.VERSION = setup.VERSION
v = config.VERSION = setup.VERSION
config.VER2 = '.'.join(v.split('.')[:2])
config_env = config.asDict()
config_env.update(os.environ)

53
wxPython/distrib/all/build-deb Executable file
View File

@ -0,0 +1,53 @@
#!/bin/bash
#----------------------------------------------------------------------
set -o errexit
#set -o xtrace
host=$1
chRootRoot=$2
chRootName=$3
function TestOnline {
local host=$1
local message=$2
if ping -q -c1 -w1 $host > /dev/null; then
return 0
else
return 1
fi
}
if [ $skipdeb != yes ]; then
# We use a chroot environment on th elocal machine for the debian
# builds, so this build is pretty simple. Just copy the tarball
# and a build script to /tmp, and then run do-build-deb in the
# chroot.
if TestOnline $host; then
echo "The $host machine is online, build continuing..."
echo "Copying source files and build script..."
ssh root@$host "mkdir -p $chRootRoot/$LINUX_BUILD && rm -rf $chRootRoot/$LINUX_BUILD/*"
scp $STAGING_DIR/wxPython-src* distrib/all/do-build-deb \
root@$host:$chRootRoot/$LINUX_BUILD
ssh root@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"do-build-deb $VERSION $VER2\""
echo "Fetching the results..."
mkdir -p $STAGING_DIR/$chRootName
ssh root@$host "rm $chRootRoot/$LINUX_BUILD/do-build-deb"
scp "root@$host:$chRootRoot/$LINUX_BUILD/*" $STAGING_DIR/$chRootName
ssh root@$host "rm $chRootRoot/$LINUX_BUILD/*"
echo "Done!"
else
echo "The $host machine is **OFFLINE**, skipping the binary DEB build."
exit 0
fi
fi

View File

@ -43,7 +43,8 @@ onlysource = no
skipdocs = no
skipwin = no
skiposx = no
skiplinux = no
skipdeb = no
skiprpm = no
skipclean = no
skipupload = no
skipnewdocs = no

View File

@ -19,14 +19,14 @@ if [ $KIND = daily ]; then
echo "Copying to the local file server..."
destdir=/stuff/temp/$VERSION
mkdir -p $destdir
cp $STAGING_DIR/* $destdir
cp -R $STAGING_DIR/* $destdir
if [ $skipupload != yes ]; then
destdir=$UPLOAD_PREVIEW_ROOT/$DAILY
echo "Copying to $UPLOAD_HOST at $destdir..."
if [ $UPLOAD_METHOD = ssh ]; then
ssh $UPLOAD_HOST "mkdir -p $destdir"
scp -p $STAGING_DIR/* $UPLOAD_HOST:/$destdir
scp -pr $STAGING_DIR/* $UPLOAD_HOST:/$destdir
fi
if [ $UPLOAD_METHOD = ftp ]; then
lftp -c "open $UPLOAD_HOST; mkdir $destdir"
@ -61,7 +61,7 @@ EOF
fi
echo "Cleaning up staging dir..."
rm $STAGING_DIR/*
rm -r $STAGING_DIR/*
rmdir $STAGING_DIR
exit 0
@ -73,14 +73,14 @@ if [ $KIND = release ]; then
echo "Copying to the local file server..."
destdir=/stuff/Development/wxPython/dist/$VERSION
mkdir -p $destdir
cp $STAGING_DIR/* $destdir
cp -R $STAGING_DIR/* $destdir
if [ $skipupload != yes ]; then
echo "Copying to $UPLOAD_HOST..."
destdir=$UPLOAD_RELEASE_ROOT/$VERSION
if [ $UPLOAD_METHOD = ssh ]; then
ssh $UPLOAD_HOST "mkdir -p $destdir"
scp -p $STAGING_DIR/* $UPLOAD_HOST:/$destdir
scp -pr $STAGING_DIR/* $UPLOAD_HOST:/$destdir
fi
if [ $UPLOAD_METHOD = ftp ]; then
lftp -c "open $UPLOAD_HOST; mkdir $destdir"

View File

@ -28,7 +28,7 @@ function TestOnline {
}
if [ $skiplinux != yes ]; then
if [ $skiprpm != yes ]; then
startedCoHost=no
hostAvailable=no

View File

@ -0,0 +1,31 @@
#!/bin/bash
# ---------------------------------------------------------------------------
set -o errexit
set -o xtrace
echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
VERSION=$1
VER2=$2
tar xjf wxPython-src-$VERSION.tar.bz2
rm wxPython-src-$VERSION.tar.bz2
mv wxPython-src-$VERSION wxwidgets$VER2-$VERSION
cd wxwidgets$VER2-$VERSION
CLVERSION=`dpkg-parsechangelog | sed -n 's/Version: //p' | sed 's/-.*//'`
if [ $CLVERSION != $VERSION ]; then
dch --newversion $VERSION-0 "automated build"
fi
debian/rules debian/control
dpkg-buildpackage -rfakeroot -us -uc
cd ..
rm -r wxwidgets$VER2-$VERSION
echo "-=-=-=- Goodbye! -=-=-=-"
exit 0