2010-12-13 03:49:04 +08:00
|
|
|
|
#
|
|
|
|
|
# Games Packages for Chakra, part of chakra-project.org
|
|
|
|
|
#
|
2011-09-18 03:35:49 +08:00
|
|
|
|
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
|
2010-12-13 03:49:04 +08:00
|
|
|
|
|
2011-09-18 03:35:49 +08:00
|
|
|
|
pkgbase=0ad
|
|
|
|
|
pkgname=($pkgbase $pkgbase-debug $pkgbase-data)
|
|
|
|
|
pkgver=alpha_7
|
|
|
|
|
_pkgver=r10288-alpha
|
2011-07-11 17:09:21 +08:00
|
|
|
|
pkgrel=1
|
2011-09-18 03:35:49 +08:00
|
|
|
|
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
|
|
|
|
|
screenshot=http://www.wildfiregames.com/0ad/images/news_images/dynamic-borders.jpg
|
2010-12-13 03:49:04 +08:00
|
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
|
url="http://wildfiregames.com/0ad"
|
2011-09-18 03:35:49 +08:00
|
|
|
|
depends=('boost-libs' 'curl' 'devil' 'enet' 'gamin' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'mesa'
|
|
|
|
|
'nasm' 'openal' 'sdl' 'zip' 'zlib')
|
|
|
|
|
makedepends=('boost' 'cmake')
|
2010-12-13 03:49:04 +08:00
|
|
|
|
changelog=ChangeLog
|
2011-09-18 03:35:49 +08:00
|
|
|
|
source=(http://downloads.sourceforge.net/project/zero-ad/releases/$pkgbase-$_pkgver-unix-build.tar.xz
|
|
|
|
|
http://downloads.sourceforge.net/project/zero-ad/releases/$pkgbase-$_pkgver-unix-data.tar.xz)
|
|
|
|
|
md5sums=('234f623b5fd576907da5a7314d6c61e9'
|
|
|
|
|
'f870ff620667d6c40a4809e28a80eeb5')
|
2010-12-13 03:49:04 +08:00
|
|
|
|
|
2011-09-18 03:35:49 +08:00
|
|
|
|
build() {
|
|
|
|
|
cd $srcdir/$pkgbase-$_pkgver/build/workspaces
|
2011-03-15 03:40:34 +08:00
|
|
|
|
|
2011-09-18 03:35:49 +08:00
|
|
|
|
# NOTE: These sed commands are not likely to be changed between releases, like most patches.
|
2011-07-11 10:34:22 +08:00
|
|
|
|
sed -i \
|
|
|
|
|
's/unix_names = { "boost_signals-mt", "boost_filesystem-mt", "boost_system-mt" },/unix_names = { "boost_signals", "boost_filesystem", "boost_system" },/g' \
|
2011-09-18 03:35:49 +08:00
|
|
|
|
$srcdir/$pkgbase-$_pkgver/build/premake/extern_libs.lua
|
2011-07-11 16:31:09 +08:00
|
|
|
|
sed -i \
|
2011-07-11 17:07:38 +08:00
|
|
|
|
's/export HOSTTYPE="$HOSTTYPE"/export HOSTTYPE="$CARCH"/g' \
|
2011-07-11 16:31:09 +08:00
|
|
|
|
./update-workspaces.sh
|
|
|
|
|
|
2011-07-11 10:34:22 +08:00
|
|
|
|
# Atlas disabled because it requires GTK.
|
|
|
|
|
./update-workspaces.sh \
|
|
|
|
|
--disable-atlas \
|
2011-09-18 03:35:49 +08:00
|
|
|
|
--with-system-enet \
|
|
|
|
|
--with-system-nvtt
|
2010-12-13 03:49:04 +08:00
|
|
|
|
|
2011-09-18 03:35:49 +08:00
|
|
|
|
cd $srcdir/$pkgbase-$_pkgver/build/workspaces/gcc
|
2011-05-25 00:09:55 +08:00
|
|
|
|
CONFIG=Release make
|
2011-09-18 03:35:49 +08:00
|
|
|
|
CONFIG=Debug make
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# This script might change between releases. It install the content of ‘binaries/system/’ depending
|
|
|
|
|
# on the type of build, release or debug.
|
|
|
|
|
install_0ad() {
|
|
|
|
|
AFILES="libatlas libengine libgraphics libgui liblowlevel libmocks_real libmocks_test libnetwork libscriptinterface libsimulation2"
|
|
|
|
|
|
|
|
|
|
if [ "$1" == "Debug" ]
|
|
|
|
|
then # Debug.
|
|
|
|
|
|
|
|
|
|
# Install .a files.
|
|
|
|
|
for FILENAME in $AFILES
|
|
|
|
|
do
|
|
|
|
|
install -D $srcdir/$pkgbase-$_pkgver/binaries/system/${FILENAME}_dbg.a $pkgdir/usr/share/$pkgbase/system/${FILENAME}_dbg.a
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Install libCollada.
|
|
|
|
|
install -D $srcdir/$pkgbase-$_pkgver/binaries/system/libCollada_dbg.so $pkgdir/usr/share/$pkgbase/system/libCollada_dbg.so
|
|
|
|
|
|
|
|
|
|
# Install libmozjs185-ps.
|
|
|
|
|
install -D $srcdir/$pkgbase-$_pkgver/binaries/system/libmozjs185-ps-debug.so.1.0 $pkgdir/usr/share/$pkgbase/system/libmozjs185-ps-debug.so.1.0
|
|
|
|
|
|
|
|
|
|
# Install main binary.
|
|
|
|
|
install -D $srcdir/$pkgbase-$_pkgver/binaries/system/pyrogenesis_dbg $pkgdir/usr/share/$pkgbase/system/pyrogenesis_dbg
|
|
|
|
|
|
|
|
|
|
else # Release.
|
|
|
|
|
|
|
|
|
|
# Install .a files.
|
|
|
|
|
for FILENAME in $AFILES
|
|
|
|
|
do
|
|
|
|
|
install -D $srcdir/$pkgbase-$_pkgver/binaries/system/${FILENAME}.a $pkgdir/usr/share/$pkgbase/system/${FILENAME}.a
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Install libCollada.
|
|
|
|
|
install -D $srcdir/$pkgbase-$_pkgver/binaries/system/libCollada.so $pkgdir/usr/share/$pkgbase/system/libCollada.so
|
|
|
|
|
|
|
|
|
|
# Install libmozjs185-ps.
|
|
|
|
|
install -D $srcdir/$pkgbase-$_pkgver/binaries/system/libmozjs185-ps-release.so.1.0 $pkgdir/usr/share/$pkgbase/system/libmozjs185-ps-release.so.1.0
|
|
|
|
|
|
|
|
|
|
# Install main binary.
|
|
|
|
|
install -D $srcdir/$pkgbase-$_pkgver/binaries/system/pyrogenesis $pkgdir/usr/share/$pkgbase/system/pyrogenesis
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
2010-12-13 03:49:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
2011-09-18 03:35:49 +08:00
|
|
|
|
package_0ad() {
|
|
|
|
|
license=('GPL2' 'custom:MIT') # ‘source/’ licenses.
|
|
|
|
|
depends=('boost-libs' 'curl' 'devil' 'enet' 'gamin' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'mesa'
|
|
|
|
|
'nasm' 'openal' 'sdl' 'zip' 'zlib' '0ad-data')
|
|
|
|
|
|
|
|
|
|
cd $srcdir/$pkgbase-$_pkgver
|
|
|
|
|
install_0ad Release
|
|
|
|
|
|
|
|
|
|
# Execution script:
|
|
|
|
|
install -d $pkgdir/usr/bin/
|
|
|
|
|
echo "#!/bin/sh" > $pkgdir/usr/bin/$pkgbase
|
|
|
|
|
echo "cd /usr/share/0ad/system" >> $pkgdir/usr/bin/$pkgbase
|
|
|
|
|
echo "./pyrogenesis $*" >> $pkgdir/usr/bin/$pkgbase
|
|
|
|
|
chmod +x $pkgdir/usr/bin/$pkgbase
|
|
|
|
|
|
|
|
|
|
# Desktop Integration.
|
|
|
|
|
install -D ./build/resources/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
|
|
|
|
|
install -D ./build/resources/$pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
|
|
|
|
|
|
|
|
|
|
# Legal.
|
|
|
|
|
install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/license.txt
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package_0ad-debug() {
|
|
|
|
|
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game (debug version)"
|
|
|
|
|
license=('GPL2' 'custom:MIT') # ‘source/’ licenses.
|
|
|
|
|
depends=('boost-libs' 'curl' 'devil' 'enet' 'gamin' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'mesa'
|
|
|
|
|
'nasm' 'openal' 'sdl' 'zip' 'zlib' '0ad-data')
|
|
|
|
|
|
|
|
|
|
cd $srcdir/$pkgbase-$_pkgver
|
|
|
|
|
install_0ad Debug
|
2011-06-08 00:23:47 +08:00
|
|
|
|
|
|
|
|
|
# Execution script:
|
|
|
|
|
install -d $pkgdir/usr/bin/
|
|
|
|
|
echo "#!/bin/sh" > $pkgdir/usr/bin/$pkgname
|
2011-09-18 03:35:49 +08:00
|
|
|
|
echo "cd /usr/share/$pkgbase/system" >> $pkgdir/usr/bin/$pkgname
|
|
|
|
|
echo "./pyrogenesis_dbg $*" >> $pkgdir/usr/bin/$pkgname
|
2011-06-08 00:23:47 +08:00
|
|
|
|
chmod +x $pkgdir/usr/bin/$pkgname
|
2011-09-18 03:35:49 +08:00
|
|
|
|
|
|
|
|
|
# Legal.
|
|
|
|
|
install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/license.txt
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package_0ad-data() {
|
|
|
|
|
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game (data files)"
|
|
|
|
|
arch=('any')
|
|
|
|
|
license=('GPL2' 'CCPL-by-sa') # ‘binary/data/’ licenses.
|
|
|
|
|
|
|
|
|
|
cd $srcdir/$pkgbase-$_pkgver
|
|
|
|
|
|
|
|
|
|
install -d $pkgdir/usr/share/$pkgbase
|
|
|
|
|
cp -r $srcdir/$pkgbase-$_pkgver/binaries/data $pkgdir/usr/share/$pkgbase/
|
|
|
|
|
|
|
|
|
|
# Legal.
|
|
|
|
|
install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/license.txt
|
2010-12-13 03:49:04 +08:00
|
|
|
|
}
|