Browse Source

Fixed autobuild system so it uses the correct architecture on Linux.

rude 16 years ago
parent
commit
0264c9a6c8
5 changed files with 28 additions and 7 deletions
  1. 1 1
      configure.in
  2. 9 3
      platform/unix/autobuild
  3. 1 1
      platform/unix/debian
  4. 7 0
      platform/unix/get-libs
  5. 10 2
      platform/unix/make-package

+ 1 - 1
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])

+ 9 - 3
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.

+ 1 - 1
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%

+ 7 - 0
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

+ 10 - 2
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 <package> <version>"
 	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