blob: 018928454c64199571a1649f6213e7a5b5418a15 (
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
|
# Maintainer: Guillaume Hayot <postblue@postblue.info>
pkgname=gog-risk-of-rain
pkgver=2.1.0.6
pkgrel=3
pkgdesc="Risk of Rain is an action platformer with roguelike elements."
url="https://www.gog.com/game/risk_of_rain"
license=('custom')
arch=('i686' 'x86_64')
depends_x86_64=('lib32-alsa-lib' 'lib32-libstdc++5' 'lib32-libcurl-compat')
depends_i686=('alsa-lib' 'libstdc++5' 'libcurl-compat')
source=("gog://${pkgname//-/_}_${pkgver}.sh"
"${pkgname}.desktop")
sha256sums=('efb2968d85da4510274ae021d63b79989e4d85ea06f09ec5b69df817ab7ad719'
'a1f0cc949d89cf5c9601b691989a5e728224f17b1f8c7d03d4c7f82be0a105ca')
# You need to download the gog.com installer file manually or with lgogdownloader.
DLAGENTS+=("gog::/usr/bin/echo %u - This is is not a real URL, you need to download the GOG file manually to \"$PWD\" or setup a gog:// DLAGENT. Read this PKGBUILD for more information.")
# Prevent compressing final package
PKGEXT='.pkg.tar'
prepare(){
cd "$srcdir/data/noarch"
# The launcher expects the user to be in the game dir
if [ "${CARCH}" == 'x86_64' ]; then
echo -e "#!/bin/sh\ncd /opt/${pkgname}\nLD_PRELOAD=/usr/lib32/libcurl.so.3 ./start.sh" > "${srcdir}/${pkgname}"
elif [ "${CARCH}" == 'i686' ]; then
echo -e "#!/bin/sh\ncd /opt/${pkgname}\nLD_PRELOAD=/usr/lib/libcurl.so.3 ./start.sh" > "${srcdir}/${pkgname}"
fi
}
package(){
cd "$srcdir"
# Install game
install -d "${pkgdir}/opt/${pkgname}/"
install -d "${pkgdir}/opt/${pkgname}/support"
install -d "${pkgdir}/usr/bin/"
cp -r "data/noarch/game/" "${pkgdir}/opt/${pkgname}/"
# using straight cp on the supplied tarball tends to have screwy permissions
find "${pkgdir}/opt/${pkgname}" -type d -exec chmod 755 {} \;
install -Dm755 "data/noarch/start.sh" \
"${pkgdir}/opt/${pkgname}/"
install -Dm755 data/noarch/support/*.{sh,shlib} -t \
"${pkgdir}/opt/${pkgname}/support"
# Desktop integration
install -Dm 644 "data/noarch/support/icon.png" \
"${pkgdir}/usr/share/pixmaps/${pkgname}.png"
install -Dm644 "data/noarch/docs/End User License Agreement.txt" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm 644 "${srcdir}/${pkgname}.desktop" \
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -Dm 755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}
|