aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 08224542663bbea3b6cc76a3c27ee6806852d38d (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: thephoenix <ezrakhuzadi@gmail.com>
pkgname=prismlauncher-offline
pkgver=10.0.2
pkgrel=1
pkgdesc="Prism Launcher fork with offline account support enabled (built from source)"
arch=('x86_64' 'i686' 'aarch64' 'armv7h')
url="https://github.com/Diegiwg/PrismLauncher-Cracked"
license=('GPL3')
depends=('qt6-base' 'qt6-5compat' 'qt6-svg' 'qt6-networkauth' 'qt6-imageformats' 'java-runtime' 'zlib' 'quazip-qt6' 'tomlplusplus' 'cmark' 'gamemode' 'libarchive' 'qrencode')
makedepends=('git' 'cmake' 'extra-cmake-modules' 'java-environment>=8')
provides=('prismlauncher-offline')
conflicts=('prismlauncher')
source=("git+https://github.com/Diegiwg/PrismLauncher-Cracked.git#tag=${pkgver}"
        "git+https://github.com/PrismLauncher/libnbtplusplus.git"
        "git+https://github.com/gulrak/filesystem.git")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')

prepare() {
    cd "${srcdir}/PrismLauncher-Cracked"

    # Copy git submodules into place
    mkdir -p libraries/libnbtplusplus libraries/filesystem
    cp -r "${srcdir}/libnbtplusplus/"* libraries/libnbtplusplus/
    cp -r "${srcdir}/filesystem/"* libraries/filesystem/

    # Fix Java 7 to Java 8 compatibility
    sed -i 's/-target 7 -source 7/-target 8 -source 8/g' libraries/javacheck/CMakeLists.txt
    sed -i 's/-target 7 -source 7/-target 8 -source 8/g' libraries/launcher/CMakeLists.txt

}

build() {
    cd "${srcdir}/PrismLauncher-Cracked"

    cmake -B build \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DENABLE_LTO=ON \
        -DLauncher_QT_VERSION_MAJOR=6 \
        -DLauncher_BUILD_PLATFORM=archlinux

    cmake --build build -j$(nproc)
}

package() {
    cd "${srcdir}/PrismLauncher-Cracked"

    DESTDIR="${pkgdir}" cmake --install build
}