updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / machinarium / PKGBUILD
blob10e8d891976918ccfcab650300533add2e5a9e10
1 # Maintainer: Marek Otahal <markotahal gmail>
2 # Contributor: Gen2ly <toddrpartridge@gmail.com>
4 pkgname=machinarium
5 _pkgname=Machinarium
6 _gamepkg="Machinarium_full_en.tar.gz"
7 pkgver=3
8 pkgrel=9
9 pkgdesc="A point-and-click logic adventure game by the creators of Samarost, \
10 requires copy of the full game"
11 arch=('i686' 'x86_64')
12 url="http://machinarium.net/"
13 license=('custom')
14 depends=('hicolor-icon-theme' 'gtk2' 'libxft' 'nss')
15 if [[ "${CARCH}" == "x86_64" ]]; then
16   depends=('hicolor-icon-theme' 'lib32-gtk2' 'lib32-libxt' 'lib32-nss' 
17            'lib32-libxdamage' 'lib32-curl' 'lib32-alsa-lib')
19 install="machinarium.install"
20 source=(machinarium.png
21         machinarium.desktop
22         machinarium.sh
23                                 machinarium-browser.swf)
24 md5sums=('fb9978e2f24ff2db118a8031b1a218e7'
25          '018189ba7b060498cebe7d99270ee49c'
26          '320f8c3baf6b41f9e73622d686869f98'
27                                  '2608f5bcf0e0903d4dc63d8d248f2368')
29 build () {
30    cd ${srcdir}
31   
32    msg "You need a full copy of this game in order to install it"
33    msg "Searching for ${_gamepkg} in dir: \"$startdir\""
34          pkgpath=$startdir
35    if [[ ! -f "$startdir/${_gamepkg}" ]]; then
36        error "Game package not found, please type absolute path to ${_gamepkg} (/home/joe):"
37        read pkgpath
38        if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then
39            error "Unable to find game package." && return 1
40        fi
41     fi
42     msg "Found game package, installing..."
44     ln -fs ${pkgpath}/${_gamepkg} . || return 1
45     tar xvf ${pkgpath}/${_gamepkg} || return 1
47   # create pkgdir folders
48   install -d ${pkgdir}/usr/bin
49   install -d ${pkgdir}/usr/share/{applications,games,icons}
51   # install files
52   cp -r ${_pkgname} ${pkgdir}/usr/share/games/${pkgname}
53   find ${pkgdir}/usr/share/games/${pkgname}/ -type d -exec chmod 0755 {} \;
54   find ${pkgdir}/usr/share/games/${pkgname}/ -type f -exec chmod 0644 {} \;
55   chmod 0755 ${pkgdir}/usr/share/games/${pkgname}/${_pkgname}
57   # license
58   # I can't find a license for this game anywhere, not even in there game :(
59   #install -d ${pkgdir}/usr/share/licenses/${pkgname}
61   # launch script
62   install -m755 ${srcdir}/machinarium.sh ${pkgdir}/usr/bin/${pkgname}
63   # browser version
64         install -m644 $srcdir/machinarium-browser.swf ${pkgdir}/usr/share/games/${pkgname}
66   # icon/.desktop
67   install -Dm644 ${pkgname}.png ${pkgdir}/usr/share/icons/
68   install -Dm644 ${pkgname}.desktop ${pkgdir}/usr/share/applications/
70 # vim: ts=2 sw=2