updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / gearhead2-svn / PKGBUILD
blob5f319be5d19a28053981449f0359fa0819415af5
1 # This is an example PKGBUILD file. Use this as a start to creating your own,
2 # and remove these comments. For more information, see 'man PKGBUILD'.
3 # NOTE: Please fill out the license field for your package! If it is unknown,
4 # then please put 'unknown'.
6 # See http://wiki.archlinux.org/index.php/Arch_CVS_&_SVN_PKGBUILD_guidelines
7 # for more information on packaging from SVN sources.
9 # Contributor: Your Name <youremail@domain.com>
10 pkgname=gearhead2-svn
11 pkgver=561
12 pkgrel=1
13 pkgdesc=""
14 arch=(i686)
15 url="http://www.gearheadrpg.com/"
16 license=('unknown')
17 groups=()
18 depends=()
19 makedepends=('subversion' 'fpc')
20 provides=()
21 conflicts=()
22 replaces=()
23 backup=()
24 options=()
25 install=
26 source=()
27 noextract=()
28 md5sums=() #generate with 'makepkg -g'
30 _svntrunk=https://gearhead2.svn.sourceforge.net/svnroot/gearhead2 
31 _svnmod=svn
33 build() {
34   cd "$srcdir"
36   if [ -d $_svnmod/.svn ]; then
37     (cd $_svnmod && svn up -r $pkgver)
38   else
39     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
40   fi
42   msg "SVN checkout done or server timeout"
43   msg "Starting make..."
45   rm -rf "$srcdir/$_svnmod-build"
46   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
47   cd "$srcdir/$_svnmod-build"
49   #
50   # BUILD
51   #
52   #./autogen.sh
53   #./configure --prefix=/usr
54   #make || return 1
55   #make DESTDIR="$pkgdir/" install
56   cd trunk/
57   ppc386 -dASCII gearhead || return 1
58   mkdir -p $pkgdir/usr/share/GH2/
59   mv * $pkgdir/usr/share/GH2/
61   echo "#!/bin/bash" > $pkgdir/usr/share/GH2/start-gearhead
62   echo "cd /usr/share/GH2/ || return 1" >> $pkgdir/usr/share/GH2/start-gearhead
63   echo "exec ./gearhead" >> $pkgdir/usr/share/GH2/start-gearhead
64   chmod g+x $pkgdir/usr/share/GH2/start-gearhead
65   mkdir -p $pkgdir/usr/bin
66   cp -l $pkgdir/usr/share/GH2/start-gearhead $pkgdir/usr/bin/gearhead
68   mkdir -p $pkgdir/usr/share/GH2/savegame/
69   
70   chgrp -R games $pkgdir/usr/share/GH2/
71   chmod -R g+rw $pkgdir/usr/share/GH2/*