Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snapcraft recipe #2413

Merged
merged 7 commits into from Jan 17, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
133 changes: 133 additions & 0 deletions builds/snap/snapcraft.yaml
@@ -0,0 +1,133 @@
name: easyrpg-player
base: core20
adopt-info: easyrpg-player
summary: easyrpg-player
description: |
EasyRPG Player is a program that allows to play games created with RPG Maker 2000 and 2003.
EasyRPG is developed by the amazing people running the [EasyRPG project](https://easyrpg.org/).

It aims to be a free (as in freedom) cross-platform RPG Maker 2000/2003 interpreter.
The main goal is to play all games created with them as the original game interpreter (RPG_RT) does.
confinement: strict
grade: stable

apps:
easyrpg-player:
command: bin/desktop-launch $SNAP/usr/bin/easyrpg-player
plugs:
- x11
- wayland
- unity7
- opengl
- audio-playback
- joystick
- home

environment:
XDG_DATA_HOME: $SNAP_USER_COMMON/
DBUS_FATAL_WARNINGS: 0

layout:
/etc/wildmidi:
bind: $SNAP/etc/wildmidi
/usr/share/midi/freepats:
bind: $SNAP/usr/share/midi/freepats

parts:
liblcf:
plugin: autotools
source: https://github.com/EasyRPG/liblcf
source-type: git
autotools-configure-parameters:
- --prefix=/usr
carstene1ns marked this conversation as resolved.
Show resolved Hide resolved
override-build: |
git fetch
snapcraftctl build
build-packages:
- libexpat1-dev
- libicu-dev
- icu-devtools
stage-packages:
- libicu66

easyrpg-player:
plugin: autotools
after: [libwildmidi,liblcf,desktop-glib-only]
source: https://github.com/EasyRPG/Player
source-type: git
autotools-configure-parameters:
- --prefix=/usr
override-build: |
last_committed_tag="$(git tag --list | tac | head -n1)"
trimmed_tag="$(echo $last_committed_tag | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')"
carstene1ns marked this conversation as resolved.
Show resolved Hide resolved
last_released_tag="$(snap info easyrpg-player | awk '$1 == "latest/beta:" { print $2 }')"
# If the latest tag from the upstream project has not been released to
# beta, build that tag instead of master.
if [ "${trimmed_tag}" != "${last_released_tag}" ]; then
git fetch
git checkout -f "${last_committed_tag}"
snapcraftctl set-version $(git -C ../src tag --list | tac | head -n1 | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')
else
snapcraftctl set-version $(git describe | sed 's/desc\///')
fi
snapcraftctl build

build-packages:
- libfmt-dev
- libfreetype6-dev
- libharfbuzz-dev
- libmpg123-dev
- libopusfile-dev
- libpixman-1-dev
- libpng-dev
- libsdl2-dev
- libsdl2-mixer-dev
- libsdl2-ttf-dev
carstene1ns marked this conversation as resolved.
Show resolved Hide resolved
- libsndfile1-dev
- libspeexdsp-dev
- libvorbis-dev
- libxmp-dev

stage-packages:
- freepats
- libfreetype6
- libharfbuzz0b
- libmpg123-dev
carstene1ns marked this conversation as resolved.
Show resolved Hide resolved
- libstdc++6
- libgl1-mesa-dri
- libgl1-mesa-glx
- libglu1-mesa
- libopusfile0
- libpixman-1-0
- libpng16-16
- libsdl2-2.0-0
- libsdl2-mixer-2.0-0
- libsdl2-ttf-2.0-0
carstene1ns marked this conversation as resolved.
Show resolved Hide resolved
- libsndfile1
- libspeexdsp1
- libvorbis0a
- libwayland-egl1-mesa
- libwildmidi-config
- libxmp4
- locales-all

libwildmidi:
plugin: cmake
source: https://github.com/Mindwerks/wildmidi
source-type: git
cmake-parameters:
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_SHARED_LIBS=OFF
- -DWANT_PLAYER=ON
carstene1ns marked this conversation as resolved.
Show resolved Hide resolved
- -DWANT_STATIC=ON
stage-packages:
- libasound2

desktop-glib-only:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: glib-only
plugin: make
build-packages:
- libglib2.0-dev
stage-packages:
- libglib2.0-bin