blob: ac954941c40ab8677d5c51c84322b6fe1eba103d (
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Maintainer: J0k3r <moebius282 at gmail dot com>
pkgname=reus
pkgver=1389636757
pkgrel=1
epoch=1
pkgdesc="A god game in which you take control of nature through the hands of mighty giants"
url="http://www.reusgame.com/"
license=('unknown')
arch=('i686' 'x86_64')
groups=("games")
depends=('gcc-libs' 'libvorbis' 'openal' 'libtheora' 'freetype2' 'sdl2')
makedepends=('unzip' 'imagemagick')
changelog="${pkgname}.changelog"
_purgelibs=('libtheora.so.0' 'libtheoradec.so.1' 'libvorbis.so.0' 'libopenal.so.1' 'libogg.so.0' 'libfreetype.so.6' 'libSDL2-2.0.so.0')
_binver=$pkgver
_archivename="${pkgname}_linux_${_binver}-bin"
source=("hib://${_archivename}"
"${pkgname}.desktop"
"${pkgname}.changelog")
sha256sums=('e9f2306bbbf8908b1dd4d09519959316a31df38002e80bfb74116cd338c50584'
'066e9af39f583bf1906e40966b59db22e61097d970fba146933bbf4f92fc1bbb'
'258da37d9afe688f9a7a093d9ba9be82b8c92ae94c74660840d3f282ebc44da7')
PKGEXT=".pkg.tar"
# You can download the Humble Indie Bundle file manually, or you can configure
# DLAGENTS in makepkg.conf to auto-download.
#
# For example, to use hib-dlagent to download files set something like this in
# your makepkg.conf (change/add -k and add -u/-p to your needs):
# DLAGENTS=('hib::/usr/bin/hib-dlagent -k 1a2b3c -o %o $(echo %u | cut -c 7-)')
#
# To auto-search through a directory containing Humble Bundle downloads, you
# could set:
# DLAGENTS=('hib::/usr/bin/find /path/to/downloads -name $(echo %u | cut -c 7-) -exec ln -s \{\} %o \; -quit')
DLAGENTS+=('hib::/usr/bin/echo "Could not find %u. Download manually to \"$(pwd)\" or setup hib:// DLAGENT in /etc/makepkg.conf."; exit 1')
package()
{
mkdir -p "${pkgdir}/opt/${pkgname}/"
# unzip is stupid..
unzip -qq "${srcdir}/${_archivename}" -d "${pkgdir}/opt/tmp/" 'data/*' || true
mv "${pkgdir}/opt/tmp/data/"* "${pkgdir}/opt/${pkgname}/"
rm -r "${pkgdir}/opt/tmp/"
if [ "$CARCH" = "x86_64" ]; then
rm -r "${pkgdir}/opt/${pkgname}/lib/"
rm "${pkgdir}/opt/${pkgname}/${pkgname^}.bin.x86"
for i in "${_purgelibs[@]}"; do
rm "${pkgdir}/opt/${pkgname}/lib64/${i}"
done
else
rm -r "${pkgdir}/opt/${pkgname}/lib64/"
rm "${pkgdir}/opt/${pkgname}/${pkgname^}.bin.x86_64"
for i in "${_purgelibs[@]}"; do
rm "${pkgdir}/opt/${pkgname}/lib/${i}"
done
fi
# patching the included startup script so it supports being symlinked
sed -i -e 's|`dirname "$0"`|$(dirname \"$(readlink -f \"$0\")\")|' "${pkgdir}/opt/${pkgname}/Reus"
mkdir -p "${pkgdir}/usr/bin/"
ln -s "/opt/${pkgname}/Reus" "${pkgdir}/usr/bin/${pkgname}"
# the spec only specifies png, svg and xpm..
convert "${pkgdir}/opt/${pkgname}/Reus.bmp" "${pkgdir}/opt/${pkgname}/${pkgname}.png"
install -D -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -D -m644 "${pkgdir}/opt/${pkgname}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
}
|