updated on Tue Jan 17 12:00:36 UTC 2012
[aur-mirror.git] / ohrrpgce-svn / PKGBUILD
blobfaa3c9018b1c13da2dc0d74e2a502f80d53cb92d
1 # Maintainer: Yaohan Chen <yaohan.chen@gmail.com>
2 # Contributor: Jesse Jaara <gmail.com: jesse.jaara>
4 pkgname=ohrrpgce-svn
5 pkgver=4085
6 pkgrel=1
7 pkgdesc="Official Hamster Republic Role Playing Game Construction Engine"
8 arch=(i686 x86_64)
9 url="http://hamsterrepublic.com/ohrrpgce/Main_Page.html"
10 license=('GPL')
11 if [ "$CARCH" = "x86_64" ]; then
12 depends=('lib32-sdl' 'lib32-sdl_mixer' 'lib32-libxpm' 'timidity++' 'euphoria3' )
13 makedepends=('gcc-multilib')
14 else
15 depends=('sdl' 'sdl_mixer' 'timidity++' 'euphoria3' 'libxpm')
17 makedepends=('subversion' 'freebasic')
18 conflicts=('ohrrpgce')
19 provides=('ohrrpgce')
20 source=()
21 _svntrunk=svn://gilgamesh.HamsterRepublic.com/ohrrpgce/wip
22 _svnmod=ohrrpgce
24 build() {
25   cd "$srcdir"
27   if [ -d $_svnmod/.svn ]; then
28     (cd $_svnmod && svn up -r $pkgver)
29   else
30     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
31   fi
33   msg "SVN checkout done or server timeout"
34   msg "Starting make..."
36   rm -rf "$srcdir/$_svnmod-build"
37   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
38   cd "$srcdir/$_svnmod-build"
40   if [ "$CARCH" = "x86_64" ]; then
41   sed 's|gcc|gcc -m32|g' -i makeedit.sh
42   sed 's|gcc|gcc -m32|g' -i makegame.sh
43   fi
44   ./makeedit.sh
45   ./makegame.sh
46   ./makeutil.sh
47   sed 's|hspeak.exw|/usr/share/ohrrpgce/hspeak.exw|g' -i hspeak.sh
50 package() {
51   cd "$srcdir/$_svnmod-build"
53   mv ohrrpgce-custom ohrrpgce-custom.bin
54   echo -e "#!/bin/sh\ncd /usr/share/ohrrpgce\nexec ./ohrrpgce-custom.bin \"\${@}\""\
55         > ohrrpgce-custom && chmod +x ohrrpgce-custom
56   mkdir -p "${pkgdir}/usr/bin/"
57   mkdir -p "${pkgdir}/usr/share/ohrrpgce/"
58   mkdir -p "${pkgdir}/usr/share/doc/ohrrpgce/"
60   cp ohrrpgce-{game,custom} {re,un}lump "${pkgdir}/usr/bin/"
61   cp hspeak.sh hsspiffy.e ohrrpgce-custom.bin "${pkgdir}/usr/share/ohrrpgce/"
62   cp ohrrpgce.new plotscr.hsd scancode.hsi "${pkgdir}/usr/share/ohrrpgce/"
63   cp -r import "${pkgdir}/usr/share/ohrrpgce/"
64   cp -r docs "${pkgdir}/usr/share/doc/ohrrpgce/"
65   cp -r ohrhelp "${pkgdir}/usr/share/doc/ohrrpgce/"
68 # vim:set ts=2 sw=2 et: