aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6108ec5ae5e6552ad5d6f7db4c8e2dbcdbc10c8c (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
# Maintainer: Rain Xelelo <rxelelo@outlook.com>

pkgname=tclient-ddnet
pkgver=10.8.7
pkgrel=1
pkgdesc="Extended DDNet Teeworlds client."
arch=('x86_64')
url="https://tclient.app/"
license=()
depends=('freetype2' 'opusfile' 'curl' 'glew' 'wavpack' 'ffmpeg' 'libnotify' 'miniupnpc' 'sqlite' 'mariadb-libs' 'vulkan-icd-loader')
checkdepends=('gmock')
optdepends=('ddnet-maps-git: All the maps used on the official DDNet Servers.'
    'discord-game-sdk: Enable rich presence in Discord desktop client.')
backup=('usr/share/ddnet/data/autoexec_server.cfg')
install="tclient.install"
source=("https://github.com/TaterClient/TClient/releases/download/V$pkgver/TClient-ubuntu.tar.xz" "tclient.png")
sha256sums=('426281134f29ecd82d536a6a8c0d78a92e22b359560b84de9ca2079138109f2b'
            '29ecb3376c3fe0a56af495f71754c72c54f3e7f97031446e23a355833b954b65')

prepare() {
    mkdir -p tclient/game
    bsdtar -xf "TClient-ubuntu.tar.xz" -C tclient
    cp -r tclient/TClient-*-linux_x86_64/* tclient/game
    rm -rf tclient/TClient-*-linux_x86_64
    chmod +x tclient/game/DDNet
}

package() {
    install -dm0755 "$pkgdir/opt"
    cp -a tclient "$pkgdir/opt/$pkgname"
    install -dm0755 "$pkgdir/usr/bin"
    install -dm0755 "$pkgdir/usr/share/applications/"
    cat >"$pkgdir/usr/bin/tclient" <<EOF
#!/bin/bash
exec /opt/$pkgname/game/DDNet
EOF
    chmod +x $pkgdir/usr/bin/tclient
    cat >"$pkgdir/usr/share/applications/tclient.desktop" <<EOF
[Desktop Entry]
Version=$pkgver
Name=Tater Client
StartupNotify=true
TryExec=tclient
Exec=tclient
Terminal=false
Icon=/opt/$pkgname/tclient.png
Type=Application
Categories=Game
EOF
    install -Dm0644 "$srcdir/tclient.png" "$pkgdir/opt/$pkgname/tclient.png"
}