updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / ufoai-git / PKGBUILD
blob1e22fba1f61fcc00f8a6da277bedae2e9fdcfe4b
1 #Contributor: Wesley <rudirennsau_at_hotmail_dot_com>
3 pkgname=ufoai-git
4 pkgver=20110101
5 pkgrel=1
6 pkgdesc="Development version of 'Ufo: Alien Invasion'. Includes Gamedata."
7 url="http://ufoai.sourceforge.net"
8 license=('custom')
9 arch=('i686' 'x86_64')
10 depends=('libgl' 'curl' 'sdl_image' 'sdl_mixer' 'sdl_ttf' 'libtheora' 'xvidcore')
11 makedepends=('git')
12 conflicts=('ufoai' 'ufoai-data' 'ufoai-svn')
13 source=(ufo.sh ufoded.sh ufoai.png ufoai.desktop)
15 md5sums=('855b91e47893f297b35b6e9f47145be0'
16          '81f3c45d1c3269473d2fe85730fd7e53'
17          'ae3be6e45fdd8ff584fcfc55d6a40a72'
18          'f212811fecfa6eacff73b09e12df73a3')
20 _gitroot=git://ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
21 _gitname=ufoai
23 build() {
24         cd $srcdir
26         msg "Connecting to GIT server...."
28         if [ -d $_gitname ] ; then
29           cd $_gitname && git pull origin
30           msg "The local files are updated."
31         else
32           git clone $_gitroot $_gitname
33         fi
35         msg "GIT checkout done or server timeout"
36         msg "Starting make..."
38         cd $_gitname
40         ./configure --prefix=/usr || return 1
42         make || return 1
43         make lang || return 1
44         make models || return 1 #not necessary, but it will speed things up during runtime i guess
45         make maps || return 1
46         make pk3 || return 1
49 package() {
50         cd $srcdir/$_gitname
51         #gamedata
52         mkdir -p $pkgdir/usr/share/ufoai/base/
53         cp  base/*.pk3 base/*.cfg base/*.txt base/*.so $pkgdir/usr/share/ufoai/base/
55          #binarys
56         mkdir -p $pkgdir/usr/share/ufoai/
57         cp ufo ufoded ufo2map ufomodel $pkgdir/usr/share/ufoai/
59         #translations
60         mkdir -p $pkgdir/usr/share/locale/
61         cp -r base/i18n/* $pkgdir/usr/share/locale/
63         #licenses
64         mkdir -p $pkgdir/usr/share/licenses/$pkgname
65         cp COPYING LICENSES $pkgdir/usr/share/licenses/$pkgname/
67         install -D -m644 $srcdir/ufoai.desktop $pkgdir/usr/share/applications/ufoai.desktop
68         install -D -m644 $srcdir/ufoai.png $pkgdir/usr/share/pixmaps/ufoai.png
69         install -D -m755 $srcdir/ufo.sh $pkgdir/usr/bin/ufo
70         install -D -m755 $srcdir/ufoded.sh $pkgdir/usr/bin/ufoded