updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / srb2 / PKGBUILD
blob411ac33031761cf93fe3e998d454b9af6fef6351
1 # Maintainer: DeedleFake <yisszev at beckforce dot com>
3 pkgname=srb2
4 pkgver=2.0.6
5 pkgrel=7
6 pkgdesc="Sonic Robo Blast 2. A 3-D Sonic fan-game based off of Doom Legacy."
7 arch=('i686' 'x86_64')
8 license=('GPL')
9 url='http://www.srb2.org'
10 depends=('sdl_mixer' 'libpng12' "srb2-data=${pkgver}")
11 provides=("srb2")
12 conflicts=('srb2-bin' "bin32-srb2")
13 if [ "$CARCH" == "x86_64" ]; then
14         makedepends=('subversion')
15 else
16         makedepends=('subversion' 'nasm')
18 source=(srb2.bashcomp
19                 SRB2.desktop
20                 SRB2-OpenGL.desktop)
21 md5sums=('f8f020fcb255da3f6afb414d67a421c2'
22          '7388d3393eba404df482bc01da618fed'
23          '4ddefbaee0bb25fcb485e0f95e45a115')
25 build() {
26         cd "$srcdir"
28         msg2 'Fetching code from svn...'
29         svn co -q "svn://code.srb2.org/SRB2/tags/SRB2v${pkgver}" srb2-src
31         cd "$srcdir/srb2-src"
32         sh comptime.sh "$srcdir/srb2-src/src" || :
34         cd "$srcdir/srb2-src/src"
35         if [ "$CARCH" == "x86_64" ]; then
36                 local _makeline='LINUX64=1 PNG_CFLAGS=-I../tools/libpng-src PNG_LDFLAGS=-lpng12'
37         else
38                 local _makeline='LINUX=1 PNG_CFLAGS=-I../tools/libpng-src PNG_LDFLAGS=-lpng12'
39         fi
40         msg2 'Building...'
41         make $_makeline
44 package() {
45   cd "$srcdir"
47   if [ "$CARCH" == "x86_64" ]; then
48     local _path="$srcdir/srb2-src/bin/Linux64/Release"
49   else
50     local _path="$srcdir/srb2-src/bin/Linux/Release"
51   fi
53   install -m 755 -D "$_path/lsdlsrb2" "$pkgdir/usr/bin/srb2"
55   install -m 644 -D SRB2.desktop "$pkgdir/usr/share/applications/SRB2.desktop"
56   install -m 644 -D SRB2-OpenGL.desktop "$pkgdir/usr/share/applications/SRB2-OpenGL.desktop"
57   install -m 644 -D srb2.bashcomp "$pkgdir/etc/bash_completion.d/srb2"