summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f7be8e9dc7d69ea5cf4773c0a007cd7717bc628 (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: bemxio <bemxiov@protonmail.com>

pkgname="sklauncher-bin"
pkgdesc="Secure and modern Minecraft Launcher"

pkgver=3.1.2
pkgrel=2

arch=(i686 x86_64)

url="https://skmedix.pl"
license=("unknown")

depends=("java-runtime>=17")
makedepends=(unzip gendesk)

provides=(sklauncher)
conflicts=(sklauncher sklauncher-git)

source=("https://skmedix.pl/binaries_/SKlauncher-${pkgver}.jar" "sklauncher")
md5sums=("e98a84b4bcc5e9b2b76e985c6688cad5" "3207598439df0c86594f3ef52a25cef1")

noextract=("SKlauncher-${pkgver}.jar")

prepare() {
	# extract the JAR file
	unzip -o -d "SKlauncher-${pkgver}" "SKlauncher-${pkgver}.jar"

	# get the icon out of the extracted JAR file
	cp -r "SKlauncher-${pkgver}/logo.png" SKlauncher.png

	# generate a .desktop file
	gendesk -f -n \
		--pkgname SKlauncher \
		--pkgdesc "${pkgdesc}" \
		--exec sklauncher \
		--icon SKlauncher.png \
		--categories "Game;Simulation"
}

package() {
	# copy the launcher .jar file
	install -Dm755 "SKlauncher-${pkgver}.jar" "${pkgdir}/usr/share/java/sklauncher/SKlauncher.jar"

	# copy the executable script
	install -Dm755 sklauncher "${pkgdir}/usr/bin/sklauncher"

	# copy the extracted icon and the generated .desktop file
	install -Dm644 SKlauncher.png "${pkgdir}/usr/share/pixmaps/SKlauncher.png"
	install -Dm644 SKlauncher.desktop "${pkgdir}/usr/share/applications/SKlauncher.desktop"
}