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

pkgname=rclient
pkgver=4.0.1
pkgrel=0
pkgdesc="Yet another fork of TaterClient for DDNet"
arch=('x86_64')
url="https://rushie-client.ru/"
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.')
install="rclient.install"
source=("https://github.com/RushieClient/RushieClient-ddnet/releases/download/V$pkgver/RClient-ubuntu.tar.xz" "rclient.png")
sha256sums=('5402751d65faf33a405bf8ef48c938216dd14f290e7e1bccdcd52455fea11328'
            '99b0c10aafe311f6a26beb639dae27dbdd0d44c6394e7af224f865e397cd64de')

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

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