Skip to content

Commit

Permalink
More automation for arch packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew committed May 12, 2010
1 parent a8e4546 commit 2175dba
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packaging/linux/pkgbuild/PKGBUILD
@@ -1,6 +1,6 @@
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
pkgname=openra-git
pkgver=20100507
pkgver=20100511
pkgrel=1
pkgdesc="Open Source rebuild of the Red Alert game engine using Mono/OpenGL."
arch=(any)
Expand Down
29 changes: 29 additions & 0 deletions packaging/linux/pkgbuild/buildpackage.sh
@@ -0,0 +1,29 @@
#!/bin/bash
ARGS=5
E_BADARGS=85

if [ $# -ne "$ARGS" ]
then
echo "Usage: `basename $0` ftp-server ftp-path username password version"
exit $E_BADARGS
fi

sed -i s/pkgver=[0-9]+/pkgver=$5/ PKGBUILD

makepkg --holdver

PACKAGEFILE="openra-git-$5-1-any.pkg.tar.xz"

size=`stat -c "%s" $PACKAGEFILE`

echo "$5,$size,$PACKAGEFILE" > archlatest.txt

ftp -n -v $1 << cmd
user "$3" "$4"
cd $2
put $PACKAGEFILE
put archlatest.txt
cmd



Expand Up @@ -25,21 +25,33 @@ <h1>
<span class="links"><a href="http://twitter.com/openRA">Twitter</a></span>
</div>
<div>
<div class="rounded download" style="display: block; text-align: center" onclick="document.location='openra-git-20100507-1-any.tar.xz'">
<img src="/arrow.png" alt="Download Arrow" style="float: left; margin-top: 3px" />
Download for Arch Linux<br />
<span class="desc">version: 20100507 size: 1.3MB</span>
</div>
<div class="rounded download" style="display: block; text-align: center" onclick="document.location='openra-20100507-1-noarch.rpm'">
<img src="/arrow.png" alt="Download Arrow" style="float: left; margin-top: 3px" />
Download for RPM based systems<br />
<span class="desc">version: 20100507 size: 1.5MB</span>
</div>
<div class="rounded download" style="display: block; text-align: center" onclick="document.location='http://github.com/chrisforbes/OpenRA/tarball/playtest-20100507'">
<img src="/arrow.png" alt="Download Arrow" style="float: left; margin-top: 3px" />
Download for other systems<br />
<span class="desc">(source package)</span>
</div>
<?php
function generateDownloadButton($target, $text, $desc)
{
echo "<div class=\"rounded download\" style=\"display: block; text-align: center\" onclick=\"document.location='".$target."'\">\n";
echo "\t<img src=\"/arrow.png\" alt=\"Download Arrow\" style=\"float: left; margin-top: 3px\" />\n";
echo "\t". $text ."<br />\n";
echo "\t<span class=\"desc\">". $desc ."</span>\n";
echo "</div>";
}

$archTarget = file_get_contents("archlatest.txt");
list($version,$size,$target) = explode(",", $archTarget);
$desc = sprintf("version: %s size: %.2fMB", $version, $size/1048576);

generateDownloadButton(trim($target), "Download for Arch Linux", $desc);

$rpmTarget = file_get_contents("rpmlatest.txt");
list($version,$size,$target) = explode(",", $rpmTarget);
$desc = sprintf("version: %s size: %.2fMB", $version, $size/1048576);

generateDownloadButton(trim($target), "Download for RPM based systems", $desc);

$version = file_get_contents("srclatest.txt");
$target = "http://github.com/chrisforbes/OpenRA/tarball/playtest-".trim($version);

generateDownloadButton($target, "Download for other systems", "(source package)");
?>
</div>
</div>
<div id="footer" class="bar">
Expand Down

0 comments on commit 2175dba

Please sign in to comment.