forked from flathub/org.flightgear.FlightGear
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.flightgear.FlightGear.yaml
147 lines (138 loc) · 5.07 KB
/
org.flightgear.FlightGear.yaml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
id: org.flightgear.FlightGear
runtime: org.kde.Platform
# When updating this version number, care must be taken to update the ffmpeg extension
# version as well, by checking which version of the freedesktop-sdk this KDE runtime depends on.
runtime-version: '5.14'
sdk: org.kde.Sdk
# ffmpeg might be used by libflite, the audio-synthesis library used by flightgear and provided by the KDE runtime.
# As of https://invent.kde.org/packaging/flatpak-kde-runtime/-/commit/ec8fab8796126c8e3fbeaa9ed8d78ebfd12d2198,
# the KDE runtime lets application depend on the ffmpeg runtime if needed (for libflite)
add-extensions:
- org.freedesktop.Platform.ffmpeg-full:
- directory: lib/ffmpeg
- version: 19.08
- add-ld-path: .
command: flightgear.sh
rename-icon: flightgear
finish-args:
- --socket=wayland
- --socket=fallback-x11
- --socket=x11
- --share=ipc
- --device=all
- --socket=pulseaudio
- --share=network
- --persist=.fgfs
# As of http://wiki.flightgear.org/$FG_HOME, "$FG_HOME is a notable place were
# FlightGear data is written to, contrary to $FG_ROOT, which is generally read-only."
# This means that it's safe to store the default built-in flightgear-data under /app,
# which is writable but non-persistent.
# The FG_ROOT can still be changed by passing the --fg-root option when calling flatpak run.
- --env=FG_ROOT=/app/share/flightgear
cleanup:
- /include
- /lib/pkgconfig
- /lib64/pkgconfig
- /lib/cmake
- /share/doc
- /share/man
- "*.h"
- "*.a"
- "*.la"
- "*.cmake"
modules:
- name: boost
buildsystem: simple
build-commands:
- ./bootstrap.sh --prefix=/app
- ./b2 headers -j $FLATPAK_BUILDER_N_JOBS
- ./b2 --build-type=minimal -j $FLATPAK_BUILDER_N_JOBS install
sources:
- type: archive
url: https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.bz2
sha256: 4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402
- shared-modules/glu/glu-9.json
- shared-modules/glew/glew.json
- name: freeglut
buildsystem: cmake
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DFREEGLUT_BUILD_DEMOS=OFF
- -DFREEGLUT_BUILD_SHARED_LIBS=ON
sources:
- type: archive
url: https://sourceforge.net/projects/freeglut/files/freeglut/3.2.1/freeglut-3.2.1.tar.gz
sha256: d4000e02102acaf259998c870e25214739d1f16f67f99cb35e4f46841399da68
- name: openscenegraph
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
sources:
- type: archive
url: https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.6.5.tar.gz
sha256: aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12
- name: simgear
builddir: true
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo
- -DOpenGL_GL_PREFERENCE=GLVND
- -DENABLE_TESTS=OFF
sources:
- type: archive
url: https://iweb.dl.sourceforge.net/project/flightgear/release-2020.1/simgear-2020.1.3.tar.bz2
sha256: 66da2c4f68058f6854206f2dd9c03c9223851ade24a50216e88b4e50598c13d1
- name: xmu
sources:
- type: archive
url: https://www.x.org/archive/individual/lib/libXmu-1.1.3.tar.bz2
sha256: 9c343225e7c3dc0904f2122b562278da5fed639b1b5e880d25111561bac5b731
- name: plib
sources:
- type: archive
url: https://plib.sourceforge.net/dist/plib-1.8.5.tar.gz
sha256: 485b22bf6fdc0da067e34ead5e26f002b76326f6371e2ae006415dea6a380a32
- name: libevent
buildsystem: autotools
sources:
- type: archive
url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
sha256: 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
- name: flightgear-data
buildsystem: simple
sources:
- type: archive
url: https://iweb.dl.sourceforge.net/project/flightgear/release-2020.1/FlightGear-2020.1.3-data.tar.bz2
sha256: 2196f4ffcdeaae3a8b0a2b6ebf62a456bfd0198abb6c0619f763204d89804a03
dest: fgdata
build-commands:
- mkdir --parents /app/share/flightgear
- mv fgdata/* /app/share/flightgear/
- name: flightgear
buildsystem: cmake
config-opts:
- -DENABLE_QT=ON
- -DCMAKE_BUILD_TYPE=Release
- -DFG_BUILD_TYPE=Release
- -DOpenGL_GL_PREFERENCE=GLVND
# Set the path to the base data, as it can't find translations and such otherwise
- -DFG_DATA_DIR=/app/share/flightgear
# Let flightgear build flite, as at least we know it'll work
- -DSYSTEM_FLITE=0
builddir: true
sources:
- type: archive
url: https://iweb.dl.sourceforge.net/project/flightgear/release-2020.1/flightgear-2020.1.3.tar.bz2
sha256: 1f07e8ef2c558dae3b9738e313b57e711d38e569f85d49fc2c5ae647e3949a17
- type: file
path: org.flightgear.FlightGear.appdata.xml
- type: script
commands:
- fgfs --launcher "$@"
dest-filename: flightgear.sh
build-commands:
- install -Dm644 ../org.flightgear.FlightGear.appdata.xml /app/share/appdata/org.flightgear.FlightGear.appdata.xml
- install -Dm755 ../flightgear.sh /app/bin/flightgear.sh
post-install:
- desktop-file-edit --set-key=Exec --set-value=flightgear.sh /app/share/applications/org.flightgear.FlightGear.desktop
- desktop-file-edit --set-key=StartupWMClass --set-value=osgViewer /app/share/applications/org.flightgear.FlightGear.desktop