summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5a17f971ad62f48e6926eebedfc461c2245052ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: swyter <swyterzone+aur@gmail.com>
# Note: Haven't really tested it with i686, but it should work all the same... at least in theory. :)

pkgname=sinerider
pkgver=0.4
pkgrel=1
epoch=
pkgdesc="A game of numerical sledding. It will make you see math the way mathematicians see it: a creative process of exploration and discovery. Math is the ultimate puzzle, and SineRider is the ultimate math puzzle game."
arch=('x86_64' 'i686')
url="http://sineridergame.com/"
license=('custom:freeware' 'unknown')
groups=()
depends=('glibc' 'glu' 'libgl' 'libx11' 'libxext' 'libxcursor' 'libxrandr' 'gcc-libs' 'expat' 'libxdamage' 'libxfixes' 'libxcb' 'libxshmfence' 'libxxf86vm' 'libdrm' 'libxrender' 'libxau' 'libxdmcp')
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=("https://s3.amazonaws.com/sinerider/SineRider+Linux.zip" "sinerider.desktop")
md5sums=("36071911e1f861c017004feca55f4f10"
         "778d8fd98d2a051882220c7b55bd0846")
install=sinerider.install

package()
{
	# look up table from unity3d's silly arch nomenclature
	declare -A archlut=([x86_64]="x86_64" [i686]="x86")

	# mosly optional
	cd "$srcdir"

	# create the main folder
	install -d "$pkgdir/opt/sinerider"

	# copy the engine assets...
	cp -rp "$srcdir/SineRider_Data" "$pkgdir/opt/sinerider/"

	# ...and the right executable, depending on our current arch
	install -Dm 755 "SineRider.${archlut[$CARCH]}" "$pkgdir/opt/sinerider/SineRider.$CARCH"

	# remove unneeded stuff from the other arch
	# unset the platform we're using from the look-up array,
	# get the value of the other index and use it to delete anything we want.

	unset archlut[$CARCH]
	otherarch=${archlut[${!archlut[@]}]}

	rm -rf "$pkgdir/opt/sinerider/SineRider_Data/Mono/$otherarch"
	rm -rf "$pkgdir/opt/sinerider/SineRider_Data/Plugins/$otherarch"

	# sundry icons and symlinked launcher
	install -d "$pkgdir/usr/bin"
	echo "/opt/sinerider/SineRider.$CARCH" > "$pkgdir/usr/bin/sinerider"
	chmod +x "$pkgdir/usr/bin/sinerider"

	install -Dm 755 "sinerider.desktop" "$pkgdir/usr/share/applications/sinerider.desktop"
	install -Dm 644 "$srcdir/SineRider_Data/Resources/UnityPlayer.png" "$pkgdir/usr/share/pixmaps/sinerider.png"
}