From 0264c9a6c8d3a4c8ab3475fe9302a2be5e2f724a Mon Sep 17 00:00:00 2001 From: rude Date: Mon, 31 Aug 2009 21:10:56 +0200 Subject: [PATCH] Fixed autobuild system so it uses the correct architecture on Linux. --- configure.in | 2 +- platform/unix/autobuild | 12 +++++++++--- platform/unix/debian | 2 +- platform/unix/get-libs | 7 +++++++ platform/unix/make-package | 12 ++++++++++-- 5 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 platform/unix/get-libs diff --git a/configure.in b/configure.in index 6c06dc6f8..09a2d3756 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -AC_INIT([love], [20090829-40a9af50de1f]) +AC_INIT([love], [20090831-cb0095a0fc04]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([platform/unix]) AC_CONFIG_MACRO_DIR([platform/unix/m4]) diff --git a/platform/unix/autobuild b/platform/unix/autobuild index c5355197c..bc2f56dc3 100755 --- a/platform/unix/autobuild +++ b/platform/unix/autobuild @@ -65,9 +65,11 @@ else buildrev=$2 fi +echo $buildrev + # Upload to the appropriate revision. hg pull -hg update $buildrev +hg update -r $buildrev # Set the displayversion. if [ -z $3 ]; then @@ -86,6 +88,8 @@ else displayversion=$3 fi +echo $displayversion + # Update version in configure. # cat configure.in | sed "s/LOVE_VERSION/$displayversion/g" > configure.in head -c 15 configure.in > configure.in.tmp @@ -109,12 +113,14 @@ mv "love-$displayversion.tar.gz" platform/unix/$tar cd platform/unix sh make-package deb $displayversion +machine=`uname -m` + # Move and rename the deb. -deb="love-$displayversion-ubuntu-x86.deb" +deb="love-$displayversion-ubuntu-$machine.deb" mv "love-$displayversion.deb" $deb # Copy and rename the binary. -binary="love-$displayversion-linux-x86" +binary="love-$displayversion-linux-$machine" cp ../../src/love $binary # Deal with uploading. diff --git a/platform/unix/debian b/platform/unix/debian index 21bf8c539..3a4b92954 100644 --- a/platform/unix/debian +++ b/platform/unix/debian @@ -2,7 +2,7 @@ Package: love Version: %VERSION% Section: games Priority: optional -Architecture: i386 +Architecture: %ARCHITECTURE% Essential: no Depends: libdevil1c2, libfreetype6, libgl1-mesa-glx, liblua5.1-0, libphysfs-1.0-0, libsdl1.2debian, libopenal1, libogg0, libvorbis0a, libvorbisfile3, libflac8, libflac++6, libmodplug0c2, libmpg123-0 Installed-Size: %INSTALLSIZE% diff --git a/platform/unix/get-libs b/platform/unix/get-libs new file mode 100644 index 000000000..b88808e0b --- /dev/null +++ b/platform/unix/get-libs @@ -0,0 +1,7 @@ +#!/bin/sh +# Get required packages. +sudo apt-get -y install subversion build-essential automake autoconf libtool \ +liblua5.1-dev libopenal-dev libsdl1.2-dev libfreetype6-dev \ +libphysfs-dev libdevil-dev libtiff4-dev libmng-dev \ +liblcms1-dev ftp-upload libmpg123-dev libmodplug-dev libpng12-dev \ +libvorbis-dev libflac-dev libflac++-dev diff --git a/platform/unix/make-package b/platform/unix/make-package index f5bbd0c5e..a289a008f 100755 --- a/platform/unix/make-package +++ b/platform/unix/make-package @@ -2,6 +2,13 @@ echo echo "Packing LÖVE to go v1.2" echo + +arch="i386" + +if [ -n "`uname -m | grep -c -G x86_64`" ]; then + arch="amd64" +fi + if [ -z "$2" ]; then echo "Syntax: ./make-package " echo "Example: ./make-package deb 0.3.0-1" @@ -14,8 +21,9 @@ case "$1" in strip ../../src/love mkdir deb mkdir deb/DEBIAN - sed "s/%VERSION%/$2/" < debian > deb/DEBIAN/tmp - sed "s/%INSTALLSIZE%/`ls -l ../../src/love | awk '{ sum += $5 } END { printf "%.2f", sum / 1000 }'`/" < deb/DEBIAN/tmp > deb/DEBIAN/control + cat debian | sed "s/%VERSION%/$2/" | sed "s/%ARCHITECTURE%/$arch/g" > deb/DEBIAN/tmp + cat deb/DEBIAN/tmp + sed "s/%INSTALLSIZE%/`ls -l ../../src/love | awk '{ sum += $5 } END { printf "%.2f", sum / 1000 }'`/" < deb/DEBIAN/tmp > deb/DEBIAN/control rm deb/DEBIAN/tmp cp mimescript deb/DEBIAN/postinst cp mimescript deb/DEBIAN/postrm