Copy snapcraft.yaml from snapcrafters/minetest

This commit is contained in:
luk3yx 2018-10-11 08:38:46 +13:00
parent 8a586c5315
commit 5223eba152
4 changed files with 114 additions and 68 deletions

View File

@ -1,6 +1,6 @@
Unlike the rest of the content, snapcraft.yaml is licensed under the MIT license as follows: Unlike the rest of the content, snapcraft.yaml is licensed under the MIT license as follows:
© 2016-2017 by Snapcrafters (https://github.com/ubuntu/snappy-playpen) © 2016-2018 by Snapcrafters (https://github.com/ubuntu/snappy-playpen)
© 2017-2018 by luk3yx © 2017-2018 by luk3yx
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining

View File

@ -1,6 +1,9 @@
# luk3yx's unofficial Minetest snap # luk3yx's unofficial Minetest snap
This is my unofficial Minetest snap package, derived from the Minetest snap in the snappy playpen. This is my unofficial Minetest snap package, derived from the Minetest snap in the snappy playpen.
**NOTE**: The `snapcraft.yaml` here is now mostly copied from the
[official snap](https://github.com/snapcrafters/minetest).
## How to install ## How to install
**Using sudo: (Ubuntu & Derivatives)** **Using sudo: (Ubuntu & Derivatives)**
~~~ ~~~
@ -50,6 +53,6 @@ sudo systemctl enable --now snapd.socket
More: More:
[http://snapcraft.io/docs/core/install](http://snapcraft.io/docs/core/install) [https://snapcraft.io/docs/core/install](https://snapcraft.io/docs/core/install)
Credit to [http://snapcraft.io](http://snapcraft.io) for the resources shown in the FAQ. Credit to [https://snapcraft.io](https://snapcraft.io) for the resources shown in the FAQ.

108
snap/snapcraft.yaml Normal file
View File

@ -0,0 +1,108 @@
name: minetest-luk3yx
summary: "Minetest 0.4"
description: |
Minetest is a minecraft-inspired game written from scratch and licensed
under the LGPL (version 2.1 or later). It supports both survival and
creative modes along with multiplayer support, dynamic lighting, and an
"infinite" map generator.
grade: stable
confinement: strict
icon: snap/gui/minetest.svg
adopt-info: minetest
apps:
minetest:
environment:
HOME: "$SNAP_USER_COMMON"
command: launcher
plugs: [desktop, desktop-legacy, x11, network, network-bind, opengl, pulseaudio]
parts:
launcher:
source: snap/scripts
plugin: dump
minetestgame:
source: https://github.com/minetest/minetest_game.git
source-branch: stable-0.4
plugin: dump
override-pull: |
snapcraftctl pull
last_committed_tag="$(git tag | sort -V | grep ^0 | grep -v dev | tail -n 1)"
last_released_tag="$(snap info minetest | awk '$1 == "beta:" { print $2 }')"
# If the latest tag from the upstream project has not been released to
# beta, build that tag instead of master.
if [ "${last_committed_tag}" != "${last_released_tag}" ]; then
git fetch
git checkout "${last_committed_tag}"
fi
override-build: |
snapcraftctl build
organize:
'*': 'share/minetest/games/minetest_game/'
minetest:
source: https://github.com/minetest/minetest.git
source-branch: stable-0.4
override-pull: |
snapcraftctl pull
last_committed_tag="$(git tag | sort -V | grep ^0 | grep -v dev | tail -n 1)"
last_released_tag="$(snap info minetest | awk '$1 == "beta:" { print $2 }')"
# If the latest tag from the upstream project has not been released to
# beta, build that tag instead of master.
if [ "${last_committed_tag}" != "${last_released_tag}" ]; then
git fetch
git checkout "${last_committed_tag}"
# Needed by the cmake plugin
cd ../src
git checkout "${last_committed_tag}"
fi
snapcraftctl set-version "$(git describe --tags)"
override-build: |
snapcraftctl build
plugin: cmake
configflags: ["-DRUN_IN_PLACE=FALSE", "-DCMAKE_BUILD_TYPE=Release"]
build-packages:
- cmake
- gcc
- g++
- gettext
- imagemagick
- libbz2-dev
- libcurl4-gnutls-dev
- libfreetype6-dev
- libglu1-mesa-dev
- libirrlicht-dev
- libjpeg-dev
- libjsoncpp-dev
- libleveldb-dev
- libluajit-5.1-dev
- libogg-dev
- libopenal-dev
- libpng-dev
- libpulse-dev
- libsqlite3-dev
- libvorbis-dev
- libx11-dev
- zlib1g-dev
stage-packages:
- libgl1-mesa-dri
- libpulse0
- libcurl3-gnutls
- libgl1-mesa-glx
- libxshmfence1
- libxcb-sync1
- libxcb-present0
- libxcb-glx0
- libxcb-dri3-0
- libxcb-dri2-0
- libvorbisfile3
- libsnappy1v5
- libopenal1
- libluajit-5.1-2
- libleveldb1v5
- libjpeg-turbo8
- libxxf86vm1
- libxfixes3
- libxext6
- libxdamage1
- libx11-6
- libx11-xcb1

View File

@ -1,65 +0,0 @@
name: minetest-luk3yx
version: "0.4.17.1"
summary: "luk3yx's unofficial Minetest builds."
description: |
Minetest is a Minecraft-inspired game written from scratch and licensed
under the LGPL (version 2.1 or later). It supports both survival and
creative modes along with multiplayer support, dynamic lighting, and an
"infinite" map generator.
grade: stable
confinement: strict
icon: snap/gui/minetest.svg
apps:
minetest:
command: launcher
plugs: [x11, network, network-bind, opengl, pulseaudio]
minetestserver:
command: launcher --server
plugs: [x11, network, network-bind, opengl, pulseaudio]
minetest-luk3yx:
command: launcher
plugs: [x11, network, network-bind, opengl, pulseaudio]
parts:
launcher:
source: snap/scripts
plugin: dump
minetestgame:
source: https://github.com/minetest/minetest_game.git
plugin: dump
source-branch: stable-0.4
organize:
'*': 'share/minetest/games/minetest_game/'
minetest:
source: https://github.com/minetest/minetest.git
source-branch: stable-0.4
plugin: cmake
configflags: [-DRUN_IN_PLACE=FALSE]
build-packages:
- cmake
- gcc
- g++
- gettext
- imagemagick
- libbz2-dev
- libcurl4-gnutls-dev
- libfreetype6-dev
- libglu1-mesa-dev
- libirrlicht-dev
- libjpeg-dev
- libjsoncpp-dev
- libleveldb-dev
- libluajit-5.1-dev
- libogg-dev
- libopenal-dev
- libpng-dev
- libpulse-dev
- libsqlite3-dev
- libvorbis-dev
- libx11-dev
- zlib1g-dev
stage-packages:
- libgl1-mesa-dri
- libpulse0
- libcurl3-gnutls