summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d719e909b57adcfaf16237de9440f9fee8f70ac1 (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
# Maintainer: Nikoloz Shvelidze <captain@pirrate.me>
pkgname=osrs-launcher
pkgver=1.2
pkgrel=1
epoch=
pkgdesc="Official OldSchool RuneScape launcher"
arch=(any)
url="https://oldschool.runescape.com/"
license=('unknown')
depends=(java-runtime bash)
makedepends=(p7zip libicns)
source=("https://www.runescape.com/l=1/downloads/OldSchool.dmg" "osrs-launcher" "osrs-launcher.desktop")
md5sums=('af345cb11c7e392c15e4d2681d9de17f' SKIP SKIP)

prepare() {
    cd "$srcdir"
    # Extract launcher jar and Apple icon from the dmg
    7z e "OldSchool.dmg" -o"$pkgname-$pkgver" -aoa -y -bb0 -bd \
        "Old School RuneScape/Old School RuneScape.app/Contents/Java/jagexappletviewer.jar" \
        "Old School RuneScape/Old School RuneScape.app/Contents/Resources/OSRS.icns"

	cd "$pkgname-$pkgver"
    # Extract 512x512x32bits png icon from the Apple icon
    icns2png -x "OSRS.icns" -s 512x512 -d 32
}

package() {
    install -Dm644 "$pkgname-$pkgver/OSRS_512x512x32.png" "$pkgdir/usr/share/pixmaps/osrs-launcher.png"
    install -Dm644 "$pkgname-$pkgver/jagexappletviewer.jar" "$pkgdir/usr/share/java/osrs-launcher/jagexappletviewer.jar"
    install -Dm755 "osrs-launcher" "$pkgdir/usr/bin/osrs-launcher"
    install -Dm644 "osrs-launcher.desktop" "$pkgdir/usr/share/applications/osrs-launcher.desktop"
}