updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / sdlmess-svn / PKGBUILD
blob9fb1aaf992037dd41f30df92dcf226a82ecc5df7
1 # Contributor: Anton Shestakov <engored*ya.ru>
2 # Maintainer: Anton Shestakov <engored*ya.ru>
4 pkgname=sdlmess-svn
5 pkgver=10006
6 pkgrel=1
7 pkgdesc='A port of the popular Multiple Emulator Super System using SDL, SVN version.'
8 url='http://www.mess.org/'
9 license=('custom:MAME License')
10 arch=('i686' 'x86_64')
11 depends=('sdl>=1.2.11' 'sdl_ttf' 'libxinerama' 'gconf' 'zlib' 'expat')
12 makedepends=('svn')
13 [ "$CARCH" = 'i686' ] && makedepends=('svn' 'nasm')
14 conflicts=('sdlmess')
15 provides=('sdlmess')
16 source=(sdlmess.sh)
17 md5sums=('141069e7019da5e33414dc8d4c421150')
18 install=sdlmess.install
20 _svntrunk=svn://messdev.no-ip.org/mess/
21 _svnmod=mess
23 build() {
24   cd "$srcdir"
26   if [ -d "$_svnmod/.svn" ]; then
27     (cd "$_svnmod" && svn up -r "$pkgver")
28   else
29     svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
30   fi
32   msg 'SVN checkout done or server timeout'
33   msg 'Starting make...'
35   rm -rf "$srcdir/$_svnmod-build"
36   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
37   cd "$srcdir/$_svnmod-build"
39   # These changes allow GCC 4.2+ to compile SDLMESS
40   sed -e 's|CCOMFLAGS += -Werror|CCOMFLAGS += |' \
41     -e 's|-Wno-unused-functions|-Wno-unused|' \
42     -i makefile
44   # Adjusting make options according to target architecture
45   if [ "$CARCH" == 'x86_64' ]; then
46     echo 'Compiling for AMD64...'
47     make TARGET=mess AMD64=1 PTR64=1 SUFFIX64='' BUILD_ZLIB=0 BUILD_EXPAT=0 ARCHOPTS="$CFLAGS"
48   elif [ "$CARCH" == 'i686' ]; then
49     echo 'Compiling for i686...'
50     make TARGET=mess I686=1 BUILD_ZLIB=0 BUILD_EXPAT=0 ARCHOPTS="$CFLAGS"
51   else
52     echo 'Compiling for i386...'
53     make TARGET=mess PM=1 BUILD_ZLIB=0 BUILD_EXPAT=0 ARCHOPTS="$CFLAGS"
54   fi
57 package() {
58   cd "$srcdir/$_svnmod-build"
59     
60   # Installing the wrapper script
61   install -Dm755 "$srcdir/sdlmess.sh" "$pkgdir/usr/bin/sdlmess"
63   # Installing binaries
64   install -Dm755 mess "$pkgdir/usr/share/sdlmess/sdlmess"
66   # Installing extra bits
67   install -d "$pkgdir/usr/share/sdlmess/artwork"
68   install -m644 artwork/* "$pkgdir/usr/share/sdlmess/artwork/"
69   install -d "$pkgdir/usr/share/sdlmess/hash"
70   install -m644 hash/* "$pkgdir/usr/share/sdlmess/hash/"
71   install -d "$pkgdir/usr/share/sdlmess/keymaps"
72   install -m644 keymaps/* "$pkgdir/usr/share/sdlmess/keymaps/"
74   # The license
75   install -Dm644 docs/license.txt "$pkgdir/usr/share/licenses/custom/sdlmess/license.txt"