summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a2f3a31788a09e51bb7ead9d43d4b236a07f3b2 (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
# Maintainer: Otreblan <otreblain@gmail.com>

pkgname=rare-git
pkgver=1.10.11.201.r2.g8f018cb1
pkgrel=1
pkgdesc="GUI for legendary. An Epic Games Launcher open source alternative."
arch=('any')
url="https://github.com/Dummerle/Rare"
license=('GPL3')
groups=()
depends=(
	"legendary"
	"python-orjson"
	"python-pillow"
	"python-psutil"
	"python-pypresence"
	"python-pyqt5"
	"python-qtawesome"
	"python-requests"
	"python-setuptools"
	"python-vdf"
	"python-wheel"
)
makedepends=("git" "python-setuptools" "gendesk")
checkdepends=()
optdepends=()
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
replaces=()
backup=()
options=()
install=
changelog=
source=("$pkgname::git+$url.git")
noextract=()
sha256sums=("SKIP")

pkgver() {
	cd "$srcdir/$pkgname"
	( set -o pipefail
	git describe --tags --long 2>/dev/null | sed 's/^v-//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

prepare() {
	cd "$srcdir/$pkgname"

	gendesk -n -f \
		--pkgname "${pkgname%-git}" \
		--pkgdesc "$pkgdesc" \
		--categories "Application;Game;Launcher" \
		--custom "Keywords=epic;games;launcher;legendary;"
}

build() {
	cd "$srcdir/$pkgname"

	python setup.py build
}

package() {
	cd "$srcdir/$pkgname"

	local py_version=$(python --version | cut -d" " -f2 | cut -d. -f1-2)

	python setup.py install --root="$pkgdir/" --optimize=1 --skip-build

	install -Dm644 "${pkgname%-git}.desktop" "$pkgdir/usr/share/applications/${pkgname%-git}.desktop"

	mkdir -p "$pkgdir/usr/share/pixmaps"
	ln -s "/usr/lib/python$py_version/site-packages/${pkgname%-git}/styles/Logo.png" "$pkgdir/usr/share/pixmaps/${pkgname%-git}.png"
}