updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / trauma / PKGBUILD
blob6563214b330114b54e7cee6432b6a84326126624
1 # Maintainer: D. Can Celasun <dcelasun[at]gmail[dot]com>
3 pkgname=trauma
4 _gamepkg="trauma.tar.gz"
5 pkgver=1
6 pkgrel=1
7 pkgdesc="TRAUMA is a unique photographic experience by game designer Krystian Majewski. Dive into the mind of a traumatized young woman to learn and understand."
8 arch=('i686' 'x86_64')
9 url="http://www.traumagame.com/"
10 license=('custom')
11 depends=('flashplayer-standalone')
12 install="trauma.install"
13 source=(trauma.png
14         trauma.desktop
15         trauma.sh)
17 md5sums=('41951abca248a5e2f4831cab92b6c281'
18          '6560fcfccf2f48f955efdaab81413eda'
19          '618a5bd22abe98666d1e7980256e70ce')
21 build () {
22    cd ${srcdir}
23   
24    msg "You need a full copy of this game in order to install it"
25    msg "Searching for ${_gamepkg} in dir: \"$startdir\""
26          pkgpath=$startdir
27    if [[ ! -f "$startdir/${_gamepkg}" ]]; then
28        error "Game package not found, please type absolute path to ${_gamepkg} (/home/joe):"
29        read pkgpath
30        if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then
31            error "Unable to find game package." && return 1
32        fi
33     fi
34     msg "Found game package, installing..."
36     ln -fs  "${pkgpath}/${_gamepkg}" . || return 1
37     tar xvf "${pkgpath}/${_gamepkg}" || return 1
39   # create pkgdir folders
40   install -d ${pkgdir}/usr/bin
41   install -d ${pkgdir}/usr/share/{applications,games,icons}
42   install -d ${pkgdir}/usr/share/games/${pkgname}
44   # install files
45   cp -r . ${pkgdir}/usr/share/games/${pkgname}
46   find ${pkgdir}/usr/share/games/${pkgname}/ -type d -exec chmod 0755 {} \;
47   find ${pkgdir}/usr/share/games/${pkgname}/ -type f -exec chmod 0644 {} \;
48   chmod 0755 ${pkgdir}/usr/share/games/${pkgname}/${pkgname}.sh
49   chmod 0755 ${pkgdir}/usr/share/games/${pkgname}/${pkgname}.swf
50   chmod +x ${pkgdir}/usr/share/games/${pkgname}/${pkgname}.swf
51   rm -rf ${pkgdir}/usr/share/games/${pkgname}/flashplayer
52   
53   # license
54   # I can't find a license for this game anywhere, not even in the game :(
55   #install -d ${pkgdir}/usr/share/licenses/${pkgname}
57   # launch script
58   install -m755 ${srcdir}/${pkgname}.sh ${pkgdir}/usr/bin/${pkgname}
59   
60   # icon/.desktop
61   install -Dm644 ${pkgname}.png ${pkgdir}/usr/share/icons/
62   install -Dm644 ${pkgname}.desktop ${pkgdir}/usr/share/applications/