aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7a4211384654c33affe747631aa4d077609c04b3 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Maintainer: Alan Jenkins <alan.james.jenkins [at] gmail [dot] com>
# Contributor: NiteHogg <keith.b.elliott [at] gmail [dot] com>
# Contributor: Slash <demodevil5 [at] yahoo [dot] com>
# Contributor: Karsten Anderson <orbitcoder@gmail.com>

pkgname=ut2004-steam
epoch=1
pkgver=3369_2
_pkgvermaj=3369
_pkgvermin=2
pkgrel=5
pkgdesc="Popular first person shooter, native Linux version, installing data files from Steam (requires you having had purchased the Steam version)."
epoch=1
arch=('i686' 'x86_64')
url="https://store.steampowered.com/app/13230/"
license=('custom')
depends=('sdl' 'openal' 'steamcmd' 'libstdc++5')
conflicts=('ut2004')
install=ut2004.install
changelog=ChangeLog
source=("https://github.com/alanjjenkins/archlinux-package-ut2004-steam/raw/master/ut2004-lnxpatch$_pkgvermaj-$_pkgvermin.tar.bz2"
    "ut2004.desktop"
    "ut2004.png"
    "ut2004-install.sh"
    "ut2004-update.sh"
    "ut2004.sh")
md5sums=('0fa447e05fe5a38e0e32adf171be405e'
         '874c61a0d0729ca430dbd08f0b3c9917'
         '145fb11c4e768ecb65396f51ac29e743'
         '5608b9b891788ae3d6a53afaf2a370d2'
         '1119a2bbec7211ee11c939941af3cb48'
         '85623fe9fecd0678e4f12902c22d7272')

package() {

    # Making sure directories exist.
    install -d $pkgdir/usr/share/{applications,pixmaps,licenses}
    install -d $pkgdir/opt/ut2004
    install -d $pkgdir/opt/ut2004/{Animations,Help,Textures,Web,Benchmark,ForceFeedback,KarmaData,Maps,Music,StaticMeshes,Sounds,Speech,System}
    install -d $pkgdir/usr/bin/

    # Install UT2004 Linux patch data. Will later do a non-clobber
    # move over the top of it.
    cp -R $srcdir/UT2004-Patch/* $pkgdir/opt/ut2004

    # Install helper scripts.
    install -D -m 755 $srcdir/ut2004-install.sh \
         $pkgdir/opt/ut2004/Scripts/ut2004-install
    install -D -m 755 $srcdir/ut2004-update.sh \
         $pkgdir/opt/ut2004/Scripts/ut2004-update
    install -D -m 755 $srcdir/ut2004.sh \
         $pkgdir/opt/ut2004/Scripts/ut2004

    # Install license.
    install -D -m 644 $srcdir/UT2004-Patch/System/License.int \
         $pkgdir/usr/share/licenses/$pkgname/LICENSE

    # Install desktop file.
    install -D -m 644 $srcdir/ut2004.desktop \
             $pkgdir/usr/share/applications/ut2004.desktop

    # Install icon file.
    install -D -m 644 $srcdir/ut2004.png \
             $pkgdir/usr/share/pixmaps/ut2004.png

    # Create symlinks to add the ut2004 startup and utility scripts to usr/bin
    ln -s /opt/ut2004/Scripts/ut2004 $pkgdir/usr/bin/ut2004 || return 1
    ln -s /opt/ut2004/Scripts/ut2004-install $pkgdir/usr/bin/ut2004-install || return 1
    ln -s /opt/ut2004/Scripts/ut2004-update $pkgdir/usr/bin/ut2004-update || return 1
    # chmod 755 $pkgdir/usr/bin/*


    if [ "$CARCH" == "x86_64" ]
    then
         sed 's/ut2004-bin/&-linux-amd64/g' $pkgdir/opt/ut2004/Scripts/ut2004 > $pkgdir/opt/ut2004/Scripts/ut2004.TMP

         install -D -m 755 $pkgdir/opt/ut2004/Scripts/ut2004.TMP $pkgdir/opt/ut2004/Scripts/ut2004
    else
        rm $pkgdir/opt/ut2004/System/ucc-bin-linux-amd64
        rm $pkgdir/opt/ut2004/System/ut2004-bin-linux-amd64
    fi

    # Installing cd key file placeholder.
    cat /dev/null > $pkgdir/opt/ut2004/System/CDkey
    chmod 644 $pkgdir/opt/ut2004/System/CDkey || return 1


    # Create symbolic links to system libraries in game directory.
    ln -s /usr/lib/libSDL-1.2.so.0 $pkgdir/opt/ut2004/System || return 1
    chmod 644 $pkgdir/opt/ut2004/System/libSDL-1.2.so.0 || return 1
    ln -s /usr/lib/libopenal.so $pkgdir/opt/ut2004/System/openal.so || return 1
    chmod 644 $pkgdir/opt/ut2004/System/openal.so || return 1
}

# vim:set ts=2 sw=2 et: