summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe7dcd675904e2d7e2dbcf6e3562bd23916ee2bb (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
# Maintainer: Oystein Sture <oysstu ät gmail dõt cóm>
# Contributor:

pkgname=gog-vampire-the-masquerade-bloodlines
_gogver=1.2_up10
_gogrel=22135
_gamename=${pkgname#gog-}
_gamename=${_gamename//-/_}

pkgver=${_gogver}_${_gogrel}
pkgrel=1
pkgdesc='Vampire®: The Masquerade - Bloodlines™. GOG version (Wine).'
arch=('x86_64')
url='https://www.gog.com/game/vampire_the_masquerade_bloodlines'
license=('custom')

depends=('wine')
makedepends=('innoextract' 'unzip')

source=(
    "file://setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(${_gogrel}).exe"
    "file://setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(${_gogrel})-1.bin"
    "file://vampire-the-masquerade-bloodlines.bash"
    "file://vampire-the-masquerade-bloodlines.desktop"
)

sha256sums=(
    "660687df598d03866011e103680030e8c29aa165d9088fa05aae7c90f28bdf5b"
    "b69f90787295c8780973ea3bf599b1089ac09b4bcd97a622fc89bbffeb65685d"
    "83dc8c11b71e060824061fca50523542af9735a115318689f3fb9cae22bf05cc"
    "af3096274bd636907b9a588d5ecadc102c72a36da4040958833183da54100d43"
)

# Prevent compressing final package
PKGEXT='.pkg.tar'

prepare() {
    cd "${srcdir}"
    innoextract -c -m -s --progress=1 "setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(${_gogrel}).exe"
    unzip "app/webcache.zip" "333aae3c07b0beee2653175bd76cfc74e719b184d04bb15477196c558c6c07cb.png"
    
    # Remove unneeded files
    rm -rf "__redist"
    rm "setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(22135).exe"
    rm "setup_vampire_the_masquerade_-_bloodlines_1.2_(up_10.0)_(22135)-1.bin"
}

package() {
    msg2 'Packaging game icon'
    install -Dm644 -T "${srcdir}/333aae3c07b0beee2653175bd76cfc74e719b184d04bb15477196c558c6c07cb.png" "${pkgdir}/usr/share/pixmaps/${pkgname#gog-}.png"
    
    msg2 'Packaging license'
    install -Dm644 "${srcdir}/Docs/License.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    
    msg2 'Packaging launcher'
    install -Dm755 -T "${srcdir}/${pkgname#gog-}.bash" "${pkgdir}/usr/bin/${pkgname#gog-}"
    
    msg2 'Packaging desktop shortcut'
    install -Dm644 "${srcdir}/${pkgname#gog-}.desktop" "${pkgdir}/usr/share/applications/${pkgname#gog-}.desktop"

    msg2 'Packaging game data'
    mkdir -p "${pkgdir}/opt/${pkgname}"
    mv -T "${srcdir}/" "${pkgdir}/opt/${pkgname}"
}