@@ -143,22 +143,95 @@ the Flatpak. While simple applications may only specify one or two modules,
143143and therefore have short modules sections, some applications can bundle
144144numerous modules and therefore have lengthy modules sections.
145145
146- GNOME Dictionary's modules section is short, since it just contains the
147- application itself, and looks like:
146+ Modules are built in the order they are declared in the manifest. If any
147+ module changes, that module and all the subsequent modules below it will
148+ be rebuilt, otherwise it should use the cache.
149+
150+ The general recommendation is to place the "main" module, usually the
151+ module for the main application as the last module in the manifest but
152+ if there is a module which gets updated often and is independent from the
153+ rest, that module can also be placed as the last module to avoid
154+ rebuilding everything else.
155+
156+ Modules can either be nested to clearly show the dependency structure
157+ or be linearly declared.
148158
149159.. code-block :: yaml
150160
151- modules :
152- - name : gnome-dictionary
153- buildsystem : meson
154- config-opts :
155- - -Dbuild_man=false
156- sources :
157- - type : archive
158- url : https://download.gnome.org/sources/gnome-dictionary/3.26/gnome-dictionary-3.26.1.tar.xz
159- sha256 : 16b8bc248dcf68987826d5e39234b1bb7fd24a2607fcdbf4258fde88f012f300
160- - type : patch
161- path : appdata_oars.patch
161+ # Nested
162+
163+ finish-args :
164+ - --share=ipc
165+ - --socket=fallback-x11
166+ - --socket=wayland
167+ - --socket=pulseaudio
168+
169+ modules :
170+ - name : video-player-app
171+ buildsystem : meson
172+ config-opts :
173+ - --buildtype=release
174+ cleanup :
175+ - /share/man
176+ sources :
177+ - type : archive
178+ url : https://example.com/release.tar.gz
179+ sha256 : 216656c4495bb3ca02dc4ad9cf3da8e8f15c8f80e870eeac8eb1eedab4c3788b
180+ modules :
181+ - name : libmpv
182+ buildsystem : meson
183+ config-opts :
184+ - -Dlibmpv=true
185+ sources :
186+ - type : archive
187+ url : https://example.com/mpv.tar.gz
188+ sha256 : 2ca92437affb62c2b559b4419ea4785c70d023590500e8a52e95ea3ab4554683
189+ modules :
190+ - " shared-modules/lua5.1/lua-5.1.5.json"
191+
192+ - name : libv4l2
193+ buildsystem : meson
194+ sources :
195+ - type : archive
196+ url : url: https://example.com/libv4l2.tar.gz
197+ sha256 : 0fa075ce59b6618847af6ea191b6155565ccaa44de0504581ddfed795a328a82
198+ # Linear
199+
200+ finish-args :
201+ - --share=ipc
202+ - --socket=fallback-x11
203+ - --socket=wayland
204+ - --socket=pulseaudio
205+
206+ modules :
207+ - " shared-modules/lua5.1/lua-5.1.5.json"
208+
209+ - name : libv4l2
210+ buildsystem : meson
211+ sources :
212+ - type : archive
213+ url : url: https://example.com/libv4l2.tar.gz
214+ sha256 : 0fa075ce59b6618847af6ea191b6155565ccaa44de0504581ddfed795a328a82
215+
216+ - name : libmpv
217+ buildsystem : meson
218+ config-opts :
219+ - -Dlibmpv=true
220+ sources :
221+ - type : archive
222+ url : https://example.com/mpv.tar.gz
223+ sha256 : 2ca92437affb62c2b559b4419ea4785c70d023590500e8a52e95ea3ab4554683
224+
225+ - name : video-player-app
226+ buildsystem : meson
227+ config-opts :
228+ - --buildtype=release
229+ cleanup :
230+ - /share/man
231+ sources :
232+ - type : archive
233+ url : https://example.com/release.tar.gz
234+ sha256 : 216656c4495bb3ca02dc4ad9cf3da8e8f15c8f80e870eeac8eb1eedab4c3788b
162235
163236 As can be seen, each listed module has a ``name `` (which can be freely
164237assigned) and a list of ``sources ``. Each source has a ``type ``, and available
0 commit comments