]> git.saurik.com Git - wxWidgets.git/commitdiff
Added scripts to build debian packages
authorRobin Dunn <robin@alldunn.com>
Tue, 28 Nov 2006 23:24:06 +0000 (23:24 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 28 Nov 2006 23:24:06 +0000 (23:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/distrib/all/build-all
wxPython/distrib/all/build-deb [new file with mode: 0755]
wxPython/distrib/all/build-environ.cfg
wxPython/distrib/all/build-finalize
wxPython/distrib/all/build-rpm
wxPython/distrib/all/do-build-deb [new file with mode: 0755]

index 373d788a7cf7cded8a0c03379d5f1e6b1b983964..aca8fbba8a290f0ba4cb3e9666c359e73f6181f3 100755 (executable)
@@ -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)
diff --git a/wxPython/distrib/all/build-deb b/wxPython/distrib/all/build-deb
new file mode 100755 (executable)
index 0000000..0686fb2
--- /dev/null
@@ -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
+
index c0332e56f4957bb921bbb8bb8da0ac4a71e68f89..df59f673eac201860bfd591d493fd169ad7cf5e2 100644 (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
index 2666b7f5d9c73c08db1ecc637a6a512e33e1f208..ba10bdfdc1dd80c0a1ced86383fbd009d5a1eaeb 100755 (executable)
@@ -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"
index d04f25ba70caea7c5b297e3f7b0761684f441ceb..4542dd7e3d71e7f9e0d14b4d15bbfed5a3a736f6 100755 (executable)
@@ -28,7 +28,7 @@ function TestOnline {
 }
 
 
-if [ $skiplinux != yes ]; then
+if [ $skiprpm != yes ]; then
 
     startedCoHost=no
     hostAvailable=no
diff --git a/wxPython/distrib/all/do-build-deb b/wxPython/distrib/all/do-build-deb
new file mode 100755 (executable)
index 0000000..6c9c370
--- /dev/null
@@ -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