aboutsummaryrefslogtreecommitdiff
path: root/snap/snapcraft.yaml
blob: 8e647eea13f93d95dcca88518c72beb94b1820a8 (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
name: prismlauncher
license: GPL-3.0-only
base: core20
website: https://prismlauncher.org/
source-code: https://github.com/PrismLauncher/PrismLauncher
issues: https://github.com/PrismLauncher/PrismLauncher/issues
donation: https://opencollective.com/prismlauncher
contact: https://discord.gg/prismlauncher
summary: A custom Minecraft launcher with modpack support
adopt-info: prismlauncher

grade: devel
confinement: strict

architectures:
  - build-on: amd64
  - build-on: arm64

parts:
  prismlauncher:
    parse-info:
      - usr/share/metainfo/org.prismlauncher.PrismLauncher.metainfo.xml
    plugin: cmake
    build-packages:
      - default-jdk-headless
    stage-packages:
      - openjdk-17-jre
      - openjdk-8-jre
    source: .
    override-pull: |
      snapcraftctl pull
      # Fix the icon reference in the desktop file
      sed -i.bak -e 's|Icon=org.prismlauncher.PrismLauncher|Icon=/usr/share/icons/hicolor/scalable/apps/org.prismlauncher.PrismLauncher.svg|g' program_info/org.prismlauncher.PrismLauncher.desktop.in
      # Remove the build directory so that local development doesn't interfere with Snap compilation
      rm -rf build
    cmake-generator: Ninja
    cmake-parameters:
      - "-DCMAKE_INSTALL_PREFIX=/usr"
      - "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
      - "-DENABLE_LTO=ON"
      - "-DLauncher_BUILD_PLATFORM=snap"

apps:
  prismlauncher:
    common-id: org.prismlauncher.PrismLauncher
    desktop: usr/share/applications/org.prismlauncher.PrismLauncher.desktop
    command: usr/bin/prismlauncher
    extensions:
      - kde-neon
    plugs:
      - home
      - opengl
      - network
      - network-bind
      - audio-playback