summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e8fadb4fd78f96c6faae6b3516e9eb844223fe6 (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
# Maintainer: Felix Golatofski <contact@xdfr.de>
# Contributor: Primetoxinz <primetoxinzz@gmail.com>
# Contributor: Joona <julia@joonatoona.me>

pkgname=hearthlauncher-git
pkgver=0.058.r0.gf972f3c
pkgrel=1
pkgdesc="Minecraft launcher and modpack installer"
arch=('x86_64')
url="https://gitlab.com/HearthProject/HearthLauncher"
license=('GPL')
depends=('qt5-base' 'zlib' 'quazip' 'qt5-svg')
makedepends=('git' 'cmake' 'clang' 'ninja')
source=("$pkgname::git+https://gitlab.com/HearthProject/HearthLauncher.git")
sha512sums=('SKIP')
provides=('hearthlauncher')
conflicts=('hearthlauncher')

pkgver() {
    cd "$srcdir/$pkgname"
    git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

build() {
    cd "$srcdir/$pkgname"
    
    mkdir -p build
    cd build
    cmake ../src -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -G Ninja
    ninja
}

package() {
    install -Dm755 $srcdir/$pkgname/build/HearthLauncher $pkgdir/usr/bin/hearthlauncher
    install -D $srcdir/$pkgname/packaging/HearthLauncher.png $pkgdir/usr/share/pixmaps/hearthlauncher.png
    install -D $srcdir/$pkgname/packaging/HearthLauncher.desktop $pkgdir/usr/share/applications/hearthlauncher.desktop
}