diff options
Diffstat (limited to 'contrib/angstrom')
-rwxr-xr-x | contrib/angstrom/build-release.sh | 82 | ||||
-rw-r--r-- | contrib/angstrom/rss.php | 48 | ||||
-rw-r--r-- | contrib/angstrom/rss2.php | 63 |
3 files changed, 193 insertions, 0 deletions
diff --git a/contrib/angstrom/build-release.sh b/contrib/angstrom/build-release.sh new file mode 100755 index 0000000000..7ba5f8bf3b --- /dev/null +++ b/contrib/angstrom/build-release.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +DO_UCLIBC=0 + +do_build() { + echo "MACHINE = \"$BUILD_MACHINE\"" > conf/auto.conf + + BUILD_MODE="glibc" + if [ "$BUILD_CLEAN" != "" ] + then + bitbake -c clean $BUILD_CLEAN + fi + + for target in $BUILD_TARGETS + do + bitbake $target && do_report_success + done + + if [ $DO_UCLIBC = 1 ] + then + BUILD_MODE="uclibc" + echo 'ANGSTROM_MODE = "uclibc"' >> conf/auto.conf + for target in $BUILD_TARGETS + do + bitbake $target && do_report_success + done + fi +} + +do_report_success() { + + echo "$(date -u +%s) $target $BUILD_MODE $machine" >> autobuilder.log +} + +# No graphics +for machine in ep93xx gumstix-connex efika omap5912osk +do + BUILD_MACHINE=$machine + BUILD_TARGETS="minimal-image console-image" + do_build +done + +for machine in ixp4xxle ixp4xxbe +do + BUILD_MACHINE=$machine + BUILD_TARGETS="nslu2-minimal-image" + do_build +done + +# build altboot images for zaurus +for machine in c7x0 poodle tosa akita spitz collie +do + BUILD_MACHINE=$machine + BUILD_TARGETS="altboot-console-image" + do_build +done + +# graphics, flash storage +for machine in fic-gta01 a780 at91sam9263ek qemuarm h2200 h4000 poodle tosa hx4700 c7x0 spitz akita collie +do + BUILD_MACHINE=$machine + BUILD_TARGETS="minimal-image console-image x11-image" + do_build +done + +# graphics, disk storage +for machine in spitz +do + BUILD_MACHINE=$machine + BUILD_TARGETS="x11-gpe-image x11-pimlico-image x11-office-image" + BUILD_CLEAN="qmake2-native" + do_build +done + +#phones +for machine in fic-gta01 a780 +do + BUILD_MACHINE=$machine + BUILD_TARGETS="openmoko-image" + BUILD_CLEAN="qmake2-native" + do_build +done diff --git a/contrib/angstrom/rss.php b/contrib/angstrom/rss.php new file mode 100644 index 0000000000..cf5a9e0218 --- /dev/null +++ b/contrib/angstrom/rss.php @@ -0,0 +1,48 @@ +<?php echo ('<?xml version="1.0" encoding="utf-8"?>'); ?> +<rss version="2.0" xml:base="http://www.angstrom-distribution.org/unstable/autobuild/" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <channel> + <title>Ångström autobuilder updates</title> + <link>http://www.angstrom-distribution.org/unstable/autobuild/</link> + <description></description> + <language>en</language> +<?php + +$base_path = "/home/angstrom/website/unstable/autobuild"; + +if ($handle = opendir("$base_path")) +{ + while (false !== ($file = readdir($handle))) + { + if(!(is_dir($file) && $file != "." && $file != "..")) + { + continue; + } + + $second_handle = opendir("$base_path/$file/"); + + while (false !== ($file2 = readdir($second_handle))) + { + if(is_file("/$base_path/$file/$file2")) + { + $fmtime = filemtime("$file/$file2"); + + echo "<item>\n" + echo "<title>$file/$file2 uploaded</title>\n"; + echo " <link>http://www.angstrom-distribution.org/unstable/autobuild/$file/$file2</link>\n"; + + $rsstime = strftime("%a, %d %b %Y %T +0100", $fmtime); + + echo "<pubDate>$rsstime</pubDate>\n"; + echo "<dc:creator>Angstrom autobuilder</dc:creator>"; + echo "</item>\n"; + } + } + + closedir($second_handle); + } + + closedir($handle); +} +?> + </channel> +</rss> diff --git a/contrib/angstrom/rss2.php b/contrib/angstrom/rss2.php new file mode 100644 index 0000000000..995c344e14 --- /dev/null +++ b/contrib/angstrom/rss2.php @@ -0,0 +1,63 @@ +<?php + +/* + * This generator expect only log from autobuilder in simple format: + * TIME_OF_BUILD BUILD_TARGET BUILD_MODE MACHINE + * + * where TIME_OF_BUILD is epoch + * + * All what it does is parsing log and output it in reverse order (new builds + * first) in RSS 2.0 format. + * + * (C) 2007 Marcin Juszkiewicz + * + * License: MIT + * + */ + +$build_link_base = 'http://www.angstrom-distribution.org/unstable/autobuild/'; + +$builder_log_date = file('autobuilder.log'); + +if(empty($builder_log_date)) + die("No logs\n"); + +$builder_log_date = array_reverse($builder_log_date); + +$rss_xml = new xmlWriter(); + +if(!$rss_xml) + die("Unable to create XML Writer\n"); + +$rss_xml->openMemory(); + +$rss_xml->startDocument('1.0','utf-8'); +$rss_xml->startElement('rss'); +$rss_xml->writeAttribute('version', '2.0'); + +$rss_xml->startElement('channel'); + +$rss_xml->writeElement('title', 'Ångström autobuilder updates'); +$rss_xml->writeElement('link', $build_link_base); +$rss_xml->writeElement('description', 'Ångström autobuilder updates list'); + +foreach($builder_log_date as $build) +{ + $build = str_replace("\n", "", $build); + $data = explode(' ', $build); + + $rss_xml->startElement('item'); + $rss_xml->writeElement('title', "{$data[1]} ({$data[2]}) built for {$data[3]}"); + $rss_xml->writeElement('link', "{$build_link_base}{$data[3]}/"); + $rss_xml->writeElement('pubDate', date('r', $data[0])); + + $rss_xml->endElement(); +} + +$rss_xml->endElement(); +$rss_xml->endElement(); + +echo $rss_xml->outputMemory(true); + +echo "\n"; +?> |