updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / beep-game / PKGBUILD
blob99f70b08d1eac6cebd7c1b946ae8dc7f05e7c39a
1 # Maintainer: Wido <widomaker2k7 at gmail dot com>
3 pkgname=beep-game
4 _pkgname=beep
5 pkgver=1.3
6 pkgrel=2
7 pkgdesc="a 2D side-scrolling platformer with physics-based gameplay. (requires copy of the full game)"
8 url="http://www.gameolith.com/game/beep/"
9 license=('custom: "commercial"')
10 arch=('i686' 'x86_64')
11 makedepends=()
12 options=(!strip)
13 install=(${_pkgname}.install)
14 source=("beep.sh" "beep.desktop")
15 md5sums=('c9667467d8fcb493cf9cfa0f94b9f99d'
16          'e2be3a0703613f203a358687c0c7ca05')
18 _gamepkg="${_pkgname}_${pkgver}_i386.tar.gz"
19 depends=('mesa')
20 _depends64=('lib32-mesa')
22 if [[ $CARCH == x86_64 ]]; then
23   depends=(${_depends64[@]})
26 build() {
27    cd ${srcdir}
28    msg "You need a full copy of this game in order to install it"
29    msg "Searching for ${_gamepkg} in dir: \"$startdir\""
30    pkgpath=$startdir
31    if [[ ! -f "$startdir/${_gamepkg}" ]]; then
32        error "Game package not found, please type absolute path to ${_gamepkg} (/home/joe):"
33        read pkgpath
34        if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then
35            error "Unable to find game package." && return 1
36        fi
37     fi
38     msg "Found game package, installing..."
40     ln -fs ${pkgpath}/${_gamepkg} . || return 1
41     tar xvf ${pkgpath}/${_gamepkg} || return 1
43   install -d ${pkgdir}/opt/${_pkgname}
44   cp -R ${srcdir}/BEEP/{lib,Art} ${pkgdir}/opt/${_pkgname}/
45   cp ${srcdir}/BEEP/{BEEP.bin32,RUNBEEP.sh} ${pkgdir}/opt/${_pkgname}/
49 package(){
50   cd ${srcdir}
52   # Install Launcher
53   install -Dm 755 ${srcdir}/${_pkgname}.sh ${pkgdir}/usr/bin/${_pkgname}-game
55   # Install Desktop
56   install -D -m644 ${srcdir}/${_pkgname}.desktop \
57         ${pkgdir}/usr/share/applications/${_pkgname}.desktop
59   # Install license
60   install -D -m644 ${srcdir}/BEEP/EULA.rtf ${pkgdir}/usr/share/licenses/beep-game/EULA.rtf
62   # Make save game Directory with user group permissions (config)
63   install -d -m775 -g users ${pkgdir}/opt/${_pkgname}/Art/Save/
64   install -m644 -g users ${srcdir}/BEEP/Art/Settings.xml ${pkgdir}/opt/${_pkgname}/Art/
66   # Executable
67   chmod 755 ${pkgdir}/opt/${_pkgname}/BEEP.bin32