summaryrefslogtreecommitdiffstats
path: root/0ad-svn
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2009-08-20 00:51:51 +0200
committerFlorian Pritz <bluewind@xssn.at>2009-08-20 00:51:51 +0200
commit168118db7c4b1fd03547440cc5359a6d1a2f4fd4 (patch)
tree6f2521b0d50d70a396dc969e803d0d11f8d33eeb /0ad-svn
parent702a3d5b092feb07625958a31dc225863319a10e (diff)
downloadaur-packages-168118db7c4b1fd03547440cc5359a6d1a2f4fd4.tar.gz
aur-packages-168118db7c4b1fd03547440cc5359a6d1a2f4fd4.tar.xz
mass update
Diffstat (limited to '0ad-svn')
-rw-r--r--0ad-svn/0ad.sh3
-rw-r--r--0ad-svn/PKGBUILD129
2 files changed, 89 insertions, 43 deletions
diff --git a/0ad-svn/0ad.sh b/0ad-svn/0ad.sh
new file mode 100644
index 0000000..539c48b
--- /dev/null
+++ b/0ad-svn/0ad.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /opt/0ad/system
+LD_LIBRARY_PATH=/opt/0ad/system/spidermonkey/ ./pyrogenesis_dbg $*
diff --git a/0ad-svn/PKGBUILD b/0ad-svn/PKGBUILD
index 4f61a83..9036f74 100644
--- a/0ad-svn/PKGBUILD
+++ b/0ad-svn/PKGBUILD
@@ -1,60 +1,103 @@
-# Contributor: Florian Pritz <f-p@gmx.at>
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: Jakob "flocke" Nixdorf <flocke@user-helfen-usern.de>
+
pkgname=0ad-svn
-pkgver=7020
+pkgver=7093
pkgrel=1
-pkgdesc="real-time 3D strategy game"
+pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
arch=('i686' 'x86_64')
-url=""
-license=('GPL')
-groups=()
-depends=('nasm' 'sdl' 'boost' 'libpng' 'libxml2' 'openal' 'libogg' 'libvorbis' 'crypto++' 'spidermonkey' 'wxgtk' 'valgrind' 'enet' 'devil')
-makedepends=('subversion')
-provides=()
-conflicts=()
-replaces=()
-backup=()
-options=()
-install=
-source=()
-noextract=()
-md5sums=()
-
-_svntrunk=http://svn.wildfiregames.com/public/ps/trunk/
-_svnmod=trunk
+url="http://wildfiregames.com/0ad"
+license=('GPL2' 'CCPL')
+depends=('binutils' 'boost' 'crypto++' 'devil' 'enet' 'gamin' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'mesa' 'nspr' 'nasm' 'openal' 'sdl' 'valgrind' 'wxgtk' 'zlib')
+makedepends=('gcc' 'subversion')
+source=(http://ftp.mozilla.org/pub/mozilla.org/js/js-1.60.tar.gz \
+ 0ad.sh)
+
+md5sums=('bd8f021e43a8fbbec55ac2cd3d483243'
+ 'e44fcdb23628a6a2b6232a8171c38d13')
+
+_svntrunk="http://svn.wildfiregames.com/public/ps/trunk"
+_svnmod="trunk"
build() {
- cd "$srcdir"
+ msg "Building SpiderMonkey 1.6..."
+ cd ${srcdir}/js/src
+ [ "$CARCH" = "x86_64" ] && sed -i -e "s:lib64:lib:g" config.mk
+ JS_THREADSAFE=1 INCLUDES=-I/usr/include/nspr OTHER_LIBS=-L/usr/lib make -j1 -f Makefile.ref || return 1
+ make -j1 -f Makefile.ref export || return 1
+ cd ../../dist/Linux_All_DBG.OBJ
+
+ if [ -d ${srcdir}/spidermonkey ]; then
+ rm -rf ${srcdir}/spidermonkey
+ fi
+ install -d ${srcdir}/spidermonkey/lib || return 1
+ cp lib/* ${srcdir}/spidermonkey/lib || return 1
+
+ install -d ${srcdir}/spidermonkey/include/js || return 1
+ cp include/* ${srcdir}/spidermonkey/include/js || return 1
+
+ msg "Starting SVN checkout..."
+ cd ${srcdir}
if [ -d $_svnmod/.svn ]; then
(cd $_svnmod && svn up -r $pkgver)
else
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
fi
+ msg "SVN checkout done or server timeout"
- msg "SVN checkout done or server timeout"
- msg "Starting make..."
-
- rm -rf "$srcdir/$_svnmod-build"
- cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
- cd "$srcdir/$_svnmod-build"
+ msg "Starting make..."
+ if [ -d ${srcdir}/$_svnmod-build ]; then
+ rm -r $_svnmod-build
+ fi
+ cp -r $_svnmod $_svnmod-build
+ cd $_svnmod-build
- #
- # BUILD
- #
- pushd libraries/fcollada/src
+ msg "Building FCollada..."
+ cd ${srcdir}/$_svnmod-build/libraries/fcollada/src || return 1
make || return 1
- popd
- pushd build/premake/src
- make || return 1
- cp bin/premake ..
- popd
- pushd build/workspaces
- ./update-workspaces.sh
- cd gcc
+
+ msg "Building Premake..."
+ cd ${srcdir}/$_svnmod-build/build/premake/src || return 1
make || return 1
- cd ../../binaries/system
- ./pyrogenesis_dbg
+ cp bin/premake .. || return 1
-}
+ msg "Updating Workspaces..."
+ cd ${srcdir}/$_svnmod-build/build/workspaces
+ ./update-workspaces.sh || return 1
+
+ msg "Building 0 AD..."
+ cd ${srcdir}/$_svnmod-build/build/workspaces/gcc || return 1
+ LDFLAGS="-L${srcdir}/spidermonkey/lib -ljs" CFLAGS="-I${srcdir}/spidermonkey/include" make || return 1
+
+ msg "Installing binaries..."
+ install -d ${pkgdir}/opt/0ad || return 1
+ cp -r ${srcdir}/$_svnmod-build/binaries/* ${pkgdir}/opt/0ad || return 1
+ install -d ${pkgdir}/opt/0ad/system/spidermonkey || return 1
+ cp -r ${srcdir}/spidermonkey/lib/* ${pkgdir}/opt/0ad/system/spidermonkey/ || return 1
-# vim:set ts=2 sw=2 et:
+ msg "Removing SVN stuff..."
+ cd ${pkgdir}/opt/0ad || return 1
+ find -name ".svn" -type d -print0 | xargs -0 rm -rf || return 1
+
+ msg "Removing sucky windows stuff..."
+ cd ${pkgdir}/opt/0ad/system || return 1
+ rm *.exe
+ rm *.dll
+ rm *.bat
+ rm Microsoft.VC*
+ rm *.sys
+ rm *.pdb
+ rm -rf ape
+ rm -rf textureconv
+ rm ../data/createzip.bat
+
+ msg "Fixing file permissions..."
+ cd ${pkgdir}/opt/0ad/data || return 1
+ chown -R root:games ${pkgdir}/opt/0ad || return 1
+ chmod -R 664 ${pkgdir}/opt/0ad/data/cache || return 1
+ chmod -R 664 ${pkgdir}/opt/0ad/logs || return 1
+
+ msg "Installing run script..."
+ install -D -m755 ${srcdir}/0ad.sh ${pkgdir}/usr/bin/0ad || return 1
+}