More automation for arch packaging.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
|
||||||
pkgname=openra-git
|
pkgname=openra-git
|
||||||
pkgver=20100507
|
pkgver=20100511
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Open Source rebuild of the Red Alert game engine using Mono/OpenGL."
|
pkgdesc="Open Source rebuild of the Red Alert game engine using Mono/OpenGL."
|
||||||
arch=(any)
|
arch=(any)
|
||||||
|
|||||||
29
packaging/linux/pkgbuild/buildpackage.sh
Normal file
29
packaging/linux/pkgbuild/buildpackage.sh
Normal file
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -25,21 +25,33 @@
|
|||||||
<span class="links"><a href="http://twitter.com/openRA">Twitter</a></span>
|
<span class="links"><a href="http://twitter.com/openRA">Twitter</a></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="rounded download" style="display: block; text-align: center" onclick="document.location='openra-git-20100507-1-any.tar.xz'">
|
<?php
|
||||||
<img src="/arrow.png" alt="Download Arrow" style="float: left; margin-top: 3px" />
|
function generateDownloadButton($target, $text, $desc)
|
||||||
Download for Arch Linux<br />
|
{
|
||||||
<span class="desc">version: 20100507 size: 1.3MB</span>
|
echo "<div class=\"rounded download\" style=\"display: block; text-align: center\" onclick=\"document.location='".$target."'\">\n";
|
||||||
</div>
|
echo "\t<img src=\"/arrow.png\" alt=\"Download Arrow\" style=\"float: left; margin-top: 3px\" />\n";
|
||||||
<div class="rounded download" style="display: block; text-align: center" onclick="document.location='openra-20100507-1-noarch.rpm'">
|
echo "\t". $text ."<br />\n";
|
||||||
<img src="/arrow.png" alt="Download Arrow" style="float: left; margin-top: 3px" />
|
echo "\t<span class=\"desc\">". $desc ."</span>\n";
|
||||||
Download for RPM based systems<br />
|
echo "</div>";
|
||||||
<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'">
|
$archTarget = file_get_contents("archlatest.txt");
|
||||||
<img src="/arrow.png" alt="Download Arrow" style="float: left; margin-top: 3px" />
|
list($version,$size,$target) = explode(",", $archTarget);
|
||||||
Download for other systems<br />
|
$desc = sprintf("version: %s size: %.2fMB", $version, $size/1048576);
|
||||||
<span class="desc">(source package)</span>
|
|
||||||
</div>
|
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>
|
</div>
|
||||||
<div id="footer" class="bar">
|
<div id="footer" class="bar">
|
||||||
Reference in New Issue
Block a user