forked from flathub/com.github.Anuken.Mindustry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcom.github.Anuken.Mindustry.yml
75 lines (70 loc) · 2.43 KB
/
com.github.Anuken.Mindustry.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
app-id: com.github.Anuken.Mindustry
runtime: org.freedesktop.Platform
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk17
command: mindustry.sh
finish-args:
- --socket=fallback-x11
- --socket=pulseaudio
- --device=dri
- --env=PATH=/usr/bin:/app/bin:/app/jre/bin
- --env=JAVA_HOME=/app/jre
- --share=network
- --filesystem=xdg-run/app/com.discordapp.Discord:create
- --filesystem=xdg-run/app/com.discordapp.DiscordCanary:create
build-options:
env:
JAVA_HOME: /usr/lib/sdk/openjdk17/
modules:
- name: openjdk
buildsystem: simple
build-commands:
- /usr/lib/sdk/openjdk17/install.sh
- name: mindustry
buildsystem: simple
sources:
# Main repo
- type: git
url: 'https://github.com/Anuken/Mindustry'
tag: 'v135'
commit: c24c5c6196cd89bdc17a079a2a8acd372cc260d9
x-checker-data:
type: git
tag-pattern: '^v([0-9.]+)$'
# Use externally downloaded gradle wrapper
- type: patch
path: local-gradle-wrapper.patch
- type: file
url: 'https://services.gradle.org/distributions/gradle-7.3-bin.zip'
sha256: de8f52ad49bdc759164f72439a3bf56ddb1589c4cde802d3cec7d6ad0e0ee410
dest: 'gradle/wrapper/'
# Use externally downloaded dependencies
- type: patch
path: local-maven-repo.patch
- gradle-sources.json
# Build script
- type: script
commands:
- 'set -xe'
- 'version=$(git describe --tags | sed -E "s/^v([0-9.]+)$/\1/")'
- './gradlew desktop:dist --no-daemon -Pbuildversion=$version'
dest-filename: build.sh
build-commands:
- 'bash build.sh'
- 'install -D desktop/build/libs/Mindustry.jar /app/bin/Mindustry.jar'
- 'install -D android/ic_launcher-web.png /app/share/icons/hicolor/512x512/apps/com.github.Anuken.Mindustry.png'
- name: misc
buildsystem: simple
sources:
- type: file
path: com.github.Anuken.Mindustry.metainfo.xml
- type: file
path: com.github.Anuken.Mindustry.desktop
- type: file
path: mindustry.sh
build-commands:
- 'install -D mindustry.sh /app/bin/mindustry.sh'
- 'install -D com.github.Anuken.Mindustry.desktop /app/share/applications/com.github.Anuken.Mindustry.desktop'
- 'install -D com.github.Anuken.Mindustry.metainfo.xml /app/share/metainfo/com.github.Anuken.Mindustry.metainfo.xml'