updated on Tue Jan 17 12:00:36 UTC 2012
[aur-mirror.git] / osmos / PKGBUILD
blob4142c7413ab2abbb5a649ccd0b57143bbe228cf7
1 # Maintainer: Marek Otahal <markotahal gmail>
2 # Contributor: N30N <archlinux@alunamation.com>
4 pkgname=osmos
5 pkgver=1.6.1
6 pkgrel=2
7 pkgdesc="Enter the ambient world of Osmos: elegant, physics-based gameplay, dreamlike visuals, and a minimalist, electronic soundtrack."
8 arch=("i686" "x86_64")
9 url="http://www.hemispheregames.com/osmos/"
10 license=("custom: commercial")
11 depends=("openal" "mesa" "libvorbis")
12 _gamepkg="Osmos_${pkgver}.tar.gz"
13 source=("osmos.desktop")
14 md5sums=("7709be11fab3001b109ddf842b596d0c")
15 build() {
16   cd $srcdir
17   msg "You need a full copy of this game in order to install it"
18   msg "Searching for \"${_gamepkg}\" in dir: $(readlink -f `pwd`/..)"
19     pkgpath=$startdir
20     if [[ ! -f "$startdir/${_gamepkg}" ]]; then
21        error "Game package not found, please type absolute path to ${_gamepkg} (/home/joe):"
22        read pkgpath
23        if [[ ! -f "${pkgpath}/${_gamepkg}" ]]; then
24            error "Unable to find game package." && return 1
25        fi
26     fi
27   msg "Found game package, installing..."
29   ln -fs ${pkgpath}/${_gamepkg} . || return 1
30   tar xzf ${srcdir}/${_gamepkg} || return 1
33         msg2 "Patching install path."
34         sed -ri "s|^(CANONPATH=).*|\1/opt/osmos/Osmos|" Osmos/Osmos
36         msg2 "Patching sound issue."
37         sed -ri 's/^(soundDevice ")-/\1/' Osmos/defaults.cfg
40 package() {
41         cd Osmos
43         install -d "${pkgdir}/usr/bin" \
44                 "${pkgdir}/usr/share/applications" \
45                 "${pkgdir}/usr/share/licenses/${pkgname}" \
46                 "${pkgdir}/opt/osmos/Fonts" \
47                 "${pkgdir}/opt/osmos/Icons" \
48                 "${pkgdir}/opt/osmos/Sounds" \
49                 "${pkgdir}/opt/osmos/Textures"
51         if [ ${CARCH} == "x86_64" ]; then
52                 install -m755 Osmos.bin64 "$pkgdir/opt/osmos"
53         else
54                 install -m755 Osmos.bin32 "$pkgdir/opt/osmos"
55         fi
57         install -m755 Osmos "$pkgdir/usr/bin/osmos"
58         install -m644 *.{cfg,loc} "${pkgdir}/opt/osmos"
59         install -m644 Icons/*.png "${pkgdir}/opt/osmos/Icons"
60         install -m644 Sounds/*.ogg "${pkgdir}/opt/osmos/Sounds"
61         install -m644 Textures/*.tga "${pkgdir}/opt/osmos/Textures"
62         install -m644 Fonts/*.ttf "${pkgdir}/opt/osmos/Fonts"
63         install -m644 eula.txt \
64                 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
65         install -m644 "${srcdir}/osmos.desktop" \
66                 "${pkgdir}/usr/share/applications/osmos.desktop"
69 # vim: set noet ff=unix: