desktop/0ad/PKGBUILD
2018-05-19 08:47:09 +02:00

72 lines
2.3 KiB
Bash

pkgname=0ad
pkgver=0.0.23
_pkgver=$pkgver-alpha
pkgrel=1
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
screenshot=http://www.wildfiregames.com/0ad/images/news_images/dynamic-borders.jpg
arch=('x86_64')
url="http://play0ad.com/"
license=('GPL2' 'CCPL') # source licenses.
depends=('boost-libs' 'curl' 'enet' 'gamin' 'gloox' 'libgl' 'libogg' 'libpng' 'libvorbis'
'libsodium' 'libxcursor' 'libxml2' 'mesa' 'miniupnpc' 'nspr' 'openal'
'sdl2' 'zip' 'zlib' 'gloox' 0ad-data=$pkgver)
makedepends=('boost' 'python2' 'cmake')
replaces=(0ad-debug) # If someone wants a debug version, they should rebuild 0ad with config=debug.
categories=('games')
source=(https://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz)
sha1sums=('4baf0025ba6455a3d955168d2363945f75fd0ec1')
prepare() {
cd $pkgname-$_pkgver
sed -i "s/env python/env python2/g" libraries/source/cxxtest-4.4/bin/cxxtestgen
}
build() {
cd $pkgname-$_pkgver/build/workspaces
# Required to build SpiderMonkey.
unset CPPFLAGS
# Required to build SpiederMonkey in a chroot, see:
# http://ur1.ca/obpvf
# http://ur1.ca/obpvi
export SHELL=/bin/bash
# Atlas disabled because it requires GTK.
# --with-system-nvtt disabled, because it fails with new nvidia-texture-tools
export SDL2_CONFIG="pkg-config sdl2"
./update-workspaces.sh \
--bindir=/usr/bin \
--libdir=/usr/lib/0ad \
--datadir=/usr/share/${pkgname}/data \
--disable-atlas \
--without-pch
cd gcc
verbose=1 make
}
package() {
cd $pkgname-$_pkgver
# Manual installation.
install -d ${pkgdir}/usr/{bin,lib,share/"${pkgname}"/data}
install -Dm755 ${srcdir}/${pkgbase}-${_pkgver}/binaries/system/pyrogenesis ${pkgdir}/usr/bin
install -Dm755 ${srcdir}/${pkgbase}-${_pkgver}/binaries/system/*.so ${pkgdir}/usr/lib
# Copy l10n files.
cp -r binaries/data/l10n/ ${pkgdir}/usr/share/${pkgname}/data/
# Execution script.
install -Dm755 ./build/resources/$pkgname.sh $pkgdir/usr/bin/$pkgname
# Desktop Integration.
install -Dm644 ./build/resources/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
install -Dm644 ./build/resources/$pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
# Legal.
install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/license.txt
}