snapcraft.yaml 2.37 KB
Newer Older
Alex Gleason's avatar
Alex Gleason committed
1
name: solarus
Alex Gleason's avatar
Alex Gleason committed
2
version: 1.6
Alex Gleason's avatar
Alex Gleason committed
3 4 5 6 7 8 9
summary: A free and open-source Action-RPG game engine
description: |
  Solarus is a free and open-source Action-RPG game engine, licensed under GPL,
  and written in C++. It runs quests in Lua, and can work on a great number
  of platforms. Solarus also features a game editor called Solarus Quest Editor,
  written in C++ with Qt to help you create your game.

Alex Gleason's avatar
Alex Gleason committed
10
confinement: strict
Alex Gleason's avatar
Alex Gleason committed
11 12 13 14 15

apps:
  launcher:
    command: desktop-launch solarus-launcher
    desktop: share/applications/solarus.desktop
16
    plugs:
Alex Gleason's avatar
Alex Gleason committed
17 18
      - desktop
      - desktop-legacy
19 20 21 22
      - home
      - opengl
      - pulseaudio
      - x11
Alex Gleason's avatar
Alex Gleason committed
23 24 25
  quest-editor:
    command: desktop-launch solarus-quest-editor
    desktop: share/applications/solarus-quest-editor.desktop
26
    plugs:
Alex Gleason's avatar
Alex Gleason committed
27 28
      - desktop
      - desktop-legacy
29 30 31 32
      - home
      - opengl
      - pulseaudio
      - x11
Alex Gleason's avatar
Alex Gleason committed
33 34 35 36 37 38 39 40 41
  run:
    command: desktop-launch solarus-run
    plugs:
      - desktop
      - desktop-legacy
      - home
      - opengl
      - pulseaudio
      - x11
Alex Gleason's avatar
Alex Gleason committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

parts:
  launcher:
    plugin: cmake
    source-type: git
    source: https://gitlab.com/solarus-games/solarus.git
    source-commit: 633bad6be5fbe2f77c3d63db497f7d7e2b1128f6
    build-packages:
      - g++
      - make
      - libsdl2-dev
      - libsdl2-image-dev
      - libsdl2-ttf-dev
      - libluajit-5.1-dev
      - libphysfs-dev
      - libopenal-dev
      - libmodplug-dev
      - libvorbis-dev
      - qtbase5-dev
      - qttools5-dev
      - qttools5-dev-tools
      - libglm-dev
    after: [desktop-qt5]
Alex Gleason's avatar
Alex Gleason committed
65 66 67 68 69
    override-prime: |
      set -eu
      snapcraftctl prime
      # Fix-up application icon lookup
      sed --in-place 's|^Icon=.*|Icon=${SNAP}/share/icons/hicolor/256x256/apps/solarus.png|' share/applications/solarus.desktop
Alex Gleason's avatar
Alex Gleason committed
70 71 72 73 74 75 76 77 78 79 80 81
  quest-editor:
    plugin: cmake
    source-type: git
    source: https://gitlab.com/solarus-games/solarus-quest-editor.git
    source-tag: v1.6.0
    build-packages:
      - g++
      - make
      - qtbase5-dev
      - qttools5-dev
      - qttools5-dev-tools
      - libglm-dev
Alex Gleason's avatar
Alex Gleason committed
82
    after: [desktop-qt5, launcher]
Alex Gleason's avatar
Alex Gleason committed
83 84 85 86 87
    override-prime: |
      set -eu
      snapcraftctl prime
      # Fix-up application icon lookup
      sed --in-place 's|^Icon=.*|Icon=${SNAP}/share/icons/hicolor/256x256/apps/solarus-quest-editor.png|' share/applications/solarus-quest-editor.desktop
88 89
      # Move `assets` directory
      mv share/solarus-quest-editor/assets bin/assets