summaryrefslogtreecommitdiffstats
path: root/0ad/PKGBUILD
blob: b024fcf07a5f62ee366aab106ecb387986e7720f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>

pkgname=0ad
pkgver=alpha_1
_pkgver=r07970-alpha
pkgrel=5
pkgdesc="Cross-platform, 3D and historically-based real-time strategy game"
arch=('i686' 'x86_64')
url="http://wildfiregames.com/0ad"
license=('GPL2' 'CCPL')
depends=('binutils' 'boost' 'crypto++' 'devil' 'enet-old' 'fam' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'mesa' 'nasm' 'openal' 'sdl' 'wxgtk' 'zip' 'zlib')
conflicts=('0ad-svn')
provides=('0ad')
source=("http://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz"
	"http://releases.wildfiregames.com/$pkgname-$_pkgver-unix-data.tar.xz"
	"${pkgname}.install"
	"${pkgname}.sh"
	"${pkgname}-editor.sh"
	"${pkgname}.desktop"
	"${pkgname}-editor.desktop"
	"${pkgname}.png")
md5sums=('75a4a308c75a836ae61112b63b4f8b36'
         '2b78c9aa2f88faaf3ddf4efe2434a7bc'
         '92575ff82bd29369b7b0ee0ce307b39e'
         '0a8abdb0fc32af6d48ea235c46be5b7c'
         '1a54a2b4ab72424d14ffc42a01925ff3'
         'e56b164613ab929fbce76c83b766c6e9'
         '51f83e2fd2f22764dbf775689aa155a4'
         '51559438e79c0eb8576b98213a5d92d1')

build(){

cd "${srcdir}/${pkgname}-${_pkgver}/build/workspaces" || return 1
./update-workspaces.sh || return 1

cd ${srcdir}/${pkgname}-${_pkgver}/build/workspaces/gcc || return 1

# Official recomendations about -j parameter.
if [[ $CARCH = 'x86_64' ]]
  then
    CONFIG=Release make -j3 || return 1
  else
    CONFIG=Release make -j21 CC=distcc || return 1
fi
  
install -d ${pkgdir}/opt/0ad || return 1
cp -r ${srcdir}/${pkgname}-${_pkgver}/binaries/* ${pkgdir}/opt/0ad || return 1
 
# Removing useless stuff.
# This might change between releases:
rm -r ${pkgdir}/opt/0ad/system/*r
rm -r ${pkgdir}/opt/0ad/system/*.a
rm -r ${pkgdir}/opt/0ad/system/*t
rm -r ${pkgdir}/opt/0ad/system/*debug.so

install -D -m755 ${srcdir}/${pkgname}.sh ${pkgdir}/usr/bin/${pkgname} || return 1
install -D -m755 ${srcdir}/${pkgname}-editor.sh ${pkgdir}/usr/bin/${pkgname}-editor || return 1

install -D -m 0644 "${srcdir}/${pkgname}.desktop"		"${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -D -m 0644 "${srcdir}/${pkgname}-editor.desktop"	"${pkgdir}/usr/share/applications/${pkgname}-editor.desktop"
install -D -m 0644 "${srcdir}/${pkgname}.png"			"${pkgdir}/usr/share/pixmaps/${pkgname}.png"
}