diff --git a/.editorconfig b/.editorconfig
index 1749b2d..78f0170 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -2,7 +2,7 @@ root = true
[*]
indent_style = space
-indent_size = 4
+indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..169e893
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,7 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ # Check for updates to GitHub Actions every month
+ interval: "monthly"
diff --git a/.github/workflows/promote-to-stable.yml b/.github/workflows/promote-to-stable.yml
new file mode 100644
index 0000000..f38b063
--- /dev/null
+++ b/.github/workflows/promote-to-stable.yml
@@ -0,0 +1,25 @@
+name: Promote
+
+on:
+ issue_comment:
+ types:
+ - created
+
+permissions:
+ issues: write
+
+jobs:
+ promote:
+ name: โฌ๏ธ Promote to stable
+ environment: "Candidate Branch"
+ runs-on: ubuntu-latest
+ if: |
+ ( !github.event.issue.pull_request )
+ && contains(github.event.comment.body, '/promote ')
+ && contains(github.event.*.labels.*.name, 'testing')
+ steps:
+ - name: โฌ๏ธ Promote to stable
+ uses: snapcrafters/ci/promote-to-stable@main
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ store-token: ${{ secrets.SNAP_STORE_STABLE }}
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
new file mode 100644
index 0000000..6777305
--- /dev/null
+++ b/.github/workflows/pull-request.yml
@@ -0,0 +1,17 @@
+name: Pull Request
+
+on:
+ pull_request:
+ branches: ["candidate"]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ name: ๐งช Build snap on amd64
+ runs-on: ubuntu-latest
+ steps:
+ - name: ๐งช Build snap on amd64
+ uses: snapcrafters/ci/test-snap-build@main
diff --git a/.github/workflows/release-to-candidate.yml b/.github/workflows/release-to-candidate.yml
new file mode 100644
index 0000000..3650393
--- /dev/null
+++ b/.github/workflows/release-to-candidate.yml
@@ -0,0 +1,72 @@
+name: Release
+
+on:
+ # Run the workflow each time new commits are pushed to the candidate branch.
+ push:
+ branches: ["candidate"]
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+ issues: write
+
+jobs:
+ get-architectures:
+ name: ๐ฅ Get snap architectures
+ runs-on: ubuntu-latest
+ outputs:
+ architectures: ${{ steps.get-architectures.outputs.architectures }}
+ architectures-list: ${{ steps.get-architectures.outputs.architectures-list }}
+ steps:
+ - name: ๐ฅ Get snap architectures
+ id: get-architectures
+ uses: snapcrafters/ci/get-architectures@main
+
+ release:
+ name: ๐ข Release to latest/candidate
+ needs: get-architectures
+ runs-on: ubuntu-latest
+ environment: "Candidate Branch"
+ strategy:
+ matrix:
+ architecture: ${{ fromJSON(needs.get-architectures.outputs.architectures-list) }}
+ steps:
+ - name: ๐ข Release to latest/candidate
+ uses: snapcrafters/ci/release-to-candidate@main
+ with:
+ architecture: ${{ matrix.architecture }}
+ launchpad-token: ${{ secrets.LP_BUILD_SECRET }}
+ repo-token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
+ store-token: ${{ secrets.SNAP_STORE_CANDIDATE }}
+
+ call-for-testing:
+ name: ๐ฃ Create call for testing
+ needs: [release, get-architectures]
+ environment: "Candidate Branch"
+ runs-on: ubuntu-latest
+ outputs:
+ issue-number: ${{ steps.issue.outputs.issue-number }}
+ steps:
+ - name: ๐ฃ Create call for testing
+ id: issue
+ uses: snapcrafters/ci/call-for-testing@main
+ with:
+ architectures: ${{ needs.get-architectures.outputs.architectures }}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+
+ screenshots:
+ name: ๐ธ Gather screenshots
+ needs: call-for-testing
+ environment: "Candidate Branch"
+ runs-on: ubuntu-latest
+ steps:
+ - name: ๐ธ Gather screenshots
+ uses: snapcrafters/ci/get-screenshots@main
+ with:
+ issue-number: ${{ needs.call-for-testing.outputs.issue-number }}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ screenshots-token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml
new file mode 100644
index 0000000..5aa0eff
--- /dev/null
+++ b/.github/workflows/sync-upstream.yml
@@ -0,0 +1,29 @@
+name: Update
+
+on:
+ # Runs at 10:00 UTC every day
+ schedule:
+ - cron: "0 10 * * *"
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ sync:
+ name: ๐ Sync version with upstream
+ environment: "Candidate Branch"
+ runs-on: ubuntu-latest
+ steps:
+ - name: ๐ Sync version with upstream
+ uses: snapcrafters/ci/sync-version@main
+ with:
+ token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
+ update-script: |
+ VERSION=$(
+ curl -sL https://api.github.com/repos/minetest/minetest/releases |
+ jq . | grep tag_name | grep -vE "beta|rc" | head -n 1 | cut -d'"' -f4 | tr -d 'v'
+ )
+ sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml
diff --git a/.github/workflows/test-snap-can-build.yml b/.github/workflows/test-snap-can-build.yml
deleted file mode 100644
index 88650dd..0000000
--- a/.github/workflows/test-snap-can-build.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: ๐งช Test snap can be built on x86_64
-
-on:
- push:
- branches: [ "master" ]
- pull_request:
- branches: [ "master" ]
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
-
- - uses: snapcore/action-build@v1
- id: build
-
- - uses: diddlesnaps/snapcraft-review-action@v1
- with:
- snap: ${{ steps.build.outputs.snap }}
- isClassic: 'false'
- # Plugs and Slots declarations to override default denial (requires store assertion to publish)
- # plugs: ./plug-declaration.json
- # slots: ./slot-declaration.json
diff --git a/.gitignore b/.gitignore
index e924516..67837ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,7 @@
#snapcraft specifics
parts
stage
-prime
\ No newline at end of file
+prime
+#snapcraft remote-build stuff
+*.snap
+minetest_*.txt
diff --git a/README.md b/README.md
index cdcddba..8fe3491 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,85 @@
-This is the snap for Minetest. This snap is a community-maintained package to easily install Minetest on Ubuntu, Fedora, Debian and other major Linux distributions. It is available in the Snap Store, Ubuntu Software, and a number of other software stores.
+This is the snap for Minetest. It is a community-maintained package to easily install Minetest on Ubuntu, Fedora, Debian and other major Linux distributions. It is available in the Snap Store, Ubuntu Software, and a number of other applications.
-[![minetest](https://snapcraft.io/minetest/badge.svg)](https://snapcraft.io/minetest)
+"Open source voxel game engine."
+
+
+
+
+
+
+
## Install
```shell
-sudo snap install minetest
+snap install minetest
```
([Don't have snapd installed?](https://snapcraft.io/docs/core/install))
+Published for
with :gift_heart: by Snapcrafters
+
![minetest](https://dashboard.snapcraft.io/site_media/appmedia/2018/01/Screenshot_from_2018-01-14_18-38-01.png "minetest")
-Published for
with :gift_heart: by Snapcrafters
+## How to contribute to this snap
+
+Thanks for your interest! Below you find instructions to help you contribute to this snap.
+
+The general workflow is to submit pull requests that merges your changes into the `candidate` branch here on GitHub. Once the pull request has been merged, a GitHub action will automatically build the snap and publish it to the `candidate` channel in the Snap Store. Once the snap has been tested thoroughly, we promote it to the `stable` channel so all our users get it!
+
+### Initial setup
+
+If this is your first time contributing to this snap, you first need to set up your own fork of this repository.
+
+1. [Fork the repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) into your own GitHub namespace.
+2. [Clone your fork](https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository), so that you have it on your local computer.
+3. Configure your local repo. To make things a bit more intuitive, we will rename your fork's remote to `myfork`, and add the snapcrafters repo as `snapcrafters`.
+
+ ```shell
+ git remote rename origin myfork
+ git remote add snapcrafters https://github.com/snapcrafters/minetest.git
+ git fetch --all
+ ```
+
+### Submitting changes in a pull request
+
+Once you're all setup for contributing, keep in mind that you want the git information to be all up-to-date. So if you haven't "fetched" all changes in a while, start with that:
+
+```shell
+git fetch --all -p
+```
+
+Now that your git metadata has been updated you are ready to create a bugfix branch, make your changes, and open a pull request.
+
+1. All pull requests should go to the stable branch so create your branch as a copy of the stable branch:
+
+ ```shell
+ git checkout -b my-bugfix-branch snapcrafters/candidate
+ ```
+
+2. Make your desired changes and build a snap locally for testing:
+
+ ```shell
+ snapcraft --use-lxd
+ ```
+
+3. After you are happy with your changes, commit them and push them to your fork so they are available on GitHub:
+
+ ```shell
+ git commit -a
+ git push -u myfork my-bugfix-branch
+ ```
+
+4. Then, [open up a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) from your `my-bugfix-branch` to the `snapcrafters/candidate` branch.
+5. Once you've opened the pull request, it will automatically trigger the build-test action that will launch a build of the snap. You can watch the progress of the snap build from your pull request (Show all checks -> Details). Once the snap build has completed, you can find the built snap (to test with) under "Artifacts".
+6. Someone from the team will review the open pull request and either merge it or start a discussion with you with additional changes or clarification needed.
+7. Once the pull request has been merged into the stable branch, a GitHub action will rebuild the snap using your changes and publish it to the [Snap Store](https://snapcraft.io/minetest) into the `candidate` channel. After sufficient testing of the snap from the candidate channel, one of the maintainers or administrators will promote the snap to the stable branch in the Snap Store.
## License
-* The license of the build files in this repository is MIT.
-* The license of Minetest itself is LGPL-2.1+
+- The license of the build files in this repository is MIT.
+- The license of Minetest itself is LGPL-2.1+
diff --git a/scripts/launcher b/snap/local/bin/launcher
similarity index 100%
rename from scripts/launcher
rename to snap/local/bin/launcher
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 02e7afd..0d3c465 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -1,5 +1,6 @@
name: minetest
-title: Minetest
+version: 5.8.0
+
summary: Open source voxel game engine
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.
@@ -7,79 +8,68 @@ description: |
**Authors**
This snap package is maintained by the Snapcrafters community. It is not necessarily endorsed or officially supported by the developers of the application itself.
+
license: LGPL-2.1-or-later
website: https://www.minetest.net/
contact: https://github.com/snapcrafters/minetest/issues
issues: https://github.com/snapcrafters/minetest/issues
source-code: https://github.com/snapcrafters/minetest
icon: snap/gui/minetest.svg
-adopt-info: minetest
base: core22
compression: lzo
grade: stable
confinement: strict
+
architectures:
+ - build-on: amd64
- build-on: armhf
- build-on: i386
- - build-on: amd64
+ - build-on: arm64
apps:
minetest:
+ extensions: [gnome]
environment:
HOME: "$SNAP_USER_COMMON"
- command: launcher
- plugs: [desktop, desktop-legacy, x11, network, network-bind, opengl, pulseaudio, home, removable-media]
+ DISABLE_WAYLAND: 1
+ command: bin/launcher
+ plugs:
+ - audio-playback
+ - desktop
+ - desktop-legacy
+ - joystick
+ - home
+ - network
+ - network-bind
+ - opengl
+ - pulseaudio
+ - removable-media
+ - screen-inhibit-control
+ - wayland
+ - x11
parts:
launcher:
- source: scripts
- plugin: dump
-
- minetestgame:
- source: https://github.com/minetest/minetest_game.git
plugin: dump
- override-pull: |
- craftctl default
- last_committed_tag="$(git for-each-ref --sort=taggerdate --format '%(tag)' refs/tags | tail -n 1)"
- last_released_tag="$(snap info minetest | 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 [ "${last_committed_tag}" != "${last_released_tag}" ]; then
- git fetch
- git checkout "${last_committed_tag}"
- fi
- override-build: |
- craftctl default
- organize:
- '*': 'share/minetest/games/minetest_game/'
+ source: ./snap/local
+ source-type: local
minetest:
plugin: cmake
source: https://github.com/minetest/minetest.git
+ source-tag: $SNAPCRAFT_PROJECT_VERSION
cmake-parameters:
- - -DRUN_IN_PLACE=FALSE
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX=/usr
+ - -DRUN_IN_PLACE=FALSE
override-pull: |
craftctl default
- last_committed_tag="$(git for-each-ref --sort=taggerdate --format '%(tag)' refs/tags | 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
- craftctl set version="$(git describe --tags)"
git clone --depth=1 --branch=1.9.0mt13 https://github.com/minetest/irrlicht lib/irrlichtmt
build-packages:
- cmake
- - gcc
- g++
+ - gcc
- gettext
- imagemagick
- libbz2-dev
@@ -101,31 +91,31 @@ parts:
- libzstd-dev
- zlib1g-dev
stage-packages:
- - libgl1-mesa-dri
- - libpulse0
- libcurl3-gnutls
+ - libfreetype6
+ - libgl1-mesa-dri
- libgl1-mesa-glx
- - libxshmfence1
- - libxcb-sync1
- - libxcb-present0
- - libxcb-glx0
- - libxcb-dri3-0
- - libxcb-dri2-0
- - libvorbisfile3
- - libsnappy1v5
+ - libjpeg-turbo8
+ - libjsoncpp25
+ - libleveldb1d
+ - libluajit-5.1-2
- libopenal1
- libopengl0
- - libluajit-5.1-2
- - libleveldb1d
- - libjpeg-turbo8
- - libxxf86vm1
- - libxfixes3
- - libxext6
- - libxdamage1
+ - libpng16-16
+ - libpulse0
+ - libsnappy1v5
+ - libvorbisfile3
- libx11-6
- libx11-xcb1
- - libzstd1
- - libfreetype6
- - libpng16-16
- - libjsoncpp25
+ - libxcb-dri2-0
+ - libxcb-dri3-0
+ - libxcb-glx0
+ - libxcb-present0
+ - libxcb-sync1
+ - libxdamage1
+ - libxext6
+ - libxfixes3
- libxi6
+ - libxshmfence1
+ - libxxf86vm1
+ - libzstd1