updated on Tue Jan 17 16:10:12 UTC 2012
[aur-mirror.git] / intensityengine-git / PKGBUILD
blobcf2b433beadd78f6eef2f11bfc91579142917bdd
1 # Original PKGBUILD code token from:
2 # xnitropl <xnitropl at gmail dot com>
3 # vbmithr
4 # Flamelab <panosfilip@gmail.com>
5
6 # Maintainer:
7 # Adrián Chaves Fernández aka Gallaecio <adriyetichaves@gmail.com>
9 # Fixes and improvements thanks to:
10 # DarwinSurvivor <darwinsurvivor@gmail.com>
11 # qubodup <qubodup@gmail.com>
13 pkgname=intensityengine-git
14 _pkgname=intensityengine
15 pkgver=20100124
16 pkgrel=1
17 pkgdesc="The Intensity Engine is the open source project that forms the basis of Syntensity."
18 arch=('i686' 'x86_64')
19 url="http://www.syntensity.com/toplevel/intensityengine/"
20 license=('AGPL')
21 depends=('sdl' 'sdl_image' 'sdl_mixer' 'libgl' 'python' 'openjpeg' 'libstdc++5' 'mesa')
22 makedepends=('scons' 'boost' 'git' 'cmake')
23 install=${_pkgname}.install
24 source=("intensity-client.desktop"
25         "intensity")
26 md5sums=('24411e644ebc2bce268fe72de0eac07c'
27          '454378f1890b0fe28a53e3478eea7732')
29 _giturl="git://github.com/kripken/intensityengine.git"
31 build() 
33
34     cd ${srcdir}/
35     
36     msg "Connecting to GIT server...."
37     
38       git clone ${_giturl}    
39       
40     msg "GIT checkout done."
41     
42     msg "Adding extra line to client CMakeLists.txt"
43     
44       # Temporal fix by RazZziel <razielmine@gmail.com>
45       echo "target_link_libraries(Intensity_CClient rt)" >> ${srcdir}/${_pkgname}/src/client/CMakeLists.txt
46     
47     msg "Building Google V8 into Intensity..."
48     
49       cd ${srcdir}/${_pkgname}/src/thirdparty/v8/
50       
51       if [[ $CARCH = 'x86_64' ]]; then
52         msg "...for a 64bit system..."
53         GCC_VERSION="44" scons arch=x64 || return 1
54       else
55         msg "...for a 32bit system..."
56         GCC_VERSION="44" scons || return 1
57       fi
58     
59     
60     msg "Building Intensity..."
61     
62       cd ${srcdir}/${_pkgname}/cbuild/
63       cmake .. || return 1 
64       make || return 1
65       
66     msg "Preparing package..."
67   
68       # copy data files
69       mkdir -p ${pkgdir}/usr/share/games/${_pkgname}
70       cp -r ${srcdir}/${_pkgname}/* ${pkgdir}/usr/share/games/${_pkgname}
72       # move docs and licenses to right directory
73       mkdir -p ${pkgdir}/usr/share/doc/${_pkgname}
74       mv ${pkgdir}/usr/share/games/${_pkgname}/{docs,*.txt} ${pkgdir}/usr/share/doc/${_pkgname}
76       # delete useless files
77       rm -r ${pkgdir}/usr/share/games/${_pkgname}/{windows,tests,tools,*.bat}
78       
79       # Install menu entries
80       install -D -m644 ${srcdir}/../intensity-client.desktop ${pkgdir}/usr/share/applications/intensity-client.desktop
81       
82       # Install executables
83       install -D -m755 ${srcdir}/../intensity ${pkgdir}/usr/bin/intensity
84       
86 # vim:set ts=2 sw=2 et: