File: flatpak-manifest.xml

package info (click to toggle)
flatpak-builder 1.0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,580 kB
  • sloc: ansic: 23,288; sh: 5,793; xml: 1,718; makefile: 114; python: 6
file content (1119 lines) | stat: -rw-r--r-- 63,798 bytes parent folder | download | duplicates (2)
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<refentry id="flatpak-manifest">

    <refentryinfo>
        <title>flatpak manifest</title>
        <productname>flatpak</productname>

        <authorgroup>
            <author>
                <contrib>Developer</contrib>
                <firstname>Alexander</firstname>
                <surname>Larsson</surname>
                <email>alexl@redhat.com</email>
            </author>
        </authorgroup>
    </refentryinfo>

    <refmeta>
        <refentrytitle>flatpak manifest</refentrytitle>
        <manvolnum>5</manvolnum>
    </refmeta>

    <refnamediv>
        <refname>flatpak-manifest</refname>
        <refpurpose>Information for building an application</refpurpose>
    </refnamediv>

    <refsect1>
        <title>Description</title>

        <para>
          Flatpak uses manifest, or recipe, files in a json or yaml format to describe how an
          application and its bundled dependencies can be built from sources. The manifest
          gets used by flatpak-builder.
       </para>
    </refsect1>

    <refsect1>
        <title>File format</title>

        <para>
          The top level of the manifest file describes global attributes of the application, how
          it can be built, and the list of modules that need to be built.
        </para>

        <refsect2>
        <title>Toplevel properties</title>
        <para>
          These are the properties that are accepted:
        </para>
        <variablelist>
                <varlistentry>
                    <term><option>id</option> or <option>app-id</option> (string)</term>
                    <listitem><para>A string defining the application id.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>branch</option> (string)</term>
                    <listitem><para>The branch to use when exporting
                    the application. If this is unset the defaults
                    come from the default-branch option.</para>
                    <para>This key overrides both the default-branch
                    key, and the --default-branch commandline
                    option. Unless you need a very specific branchname
                    (like for a runtime or an extension) it is
                    recommended to use the default-branch key instead, because
                    you can then override the default using --default-branch when
                    building for instance a test build.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>default-branch</option> (string)</term>
                    <listitem><para>The default branch to use when
                    exporting the application. Defaults to master. </para>
                    <para>This key can be overridden by the
                    --default-branch commandline
                    option.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>collection-id</option> (string)</term>
                    <listitem><para>The collection ID of the repository,
                    defaults to being unset. Setting a globally
                    unique collection ID allows the apps in the repository to be shared over
                    peer to peer systems without needing further configuration.
                    If building in an existing repository, the collection ID
                    must match the existing configured collection ID for that
                    repository.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>extension-tag</option> (string)</term>
                    <listitem><para>If building an extension, the tag for the extension
                    point to use. Since flatpak 0.11.4 a runtime may define multiple
                    locations for the same extension point with the intention that
                    different branches for the extension are mounted at each location. When
                    building an extension it is necessary to know what extension point to
                    install the extension to. This option resolves any ambiguity
                    in which extension point to choose. If not specified, the default choice
                    is to install into either the only location for the extension point or
                    into the location for the untagged extension point. If there are multiple
                    locations for the same extension point defined with different tags
                    then an error will occur.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>token-type</option> (integer)</term>
                    <listitem><para>The type of token needed to install
                    this commit. Setting this to a value greater than 0
                    implies that authentication will be needed to
                    install the flatpak.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>runtime</option> (string)</term>
                    <listitem><para>The name of the runtime that the application uses.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>runtime-version</option> (string)</term>
                    <listitem><para>The version of the runtime that the application uses, defaults to master.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>sdk</option> (string)</term>
                    <listitem><para>The name of the development runtime that the application builds with.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>var</option> (string)</term>
                    <listitem><para>Initialize the (otherwise empty) writable /var in the build with a copy of this runtime.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>metadata</option> (string)</term>
                    <listitem><para>Use this file as the base metadata file when finishing.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>command</option> (string)</term>
                    <listitem><para>
                        The filename or path to the main binary of the application. Note that this
                        is really just a single file, not a commandline. If you want to pass arguments,
                        install a shell script wrapper and use that as the command.
                    </para><para>
                        Also note that the command is used when the application is run via
                        <command>flatpak run</command>, and does not affect what gets executed when
                        the application is run in other ways, e.g. via the desktop file or D-Bus
                        activation.
                    </para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>build-runtime</option> (boolean)</term>
                    <listitem><para>Build a new runtime instead of an application.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>build-extension</option> (boolean)</term>
                    <listitem><para>Build an extension.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>separate-locales</option> (boolean)</term>
                    <listitem><para>Separate out locale files and translations to an extension runtime. Defaults to true.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>id-platform</option> (string)</term>
                    <listitem><para>When building a runtime sdk, also create a platform based on it with this id.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>metadata-platform</option> (string)</term>
                    <listitem><para>The metadata file to use for the platform we create.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>writable-sdk</option> (boolean)</term>
                    <listitem><para>If true, use a writable copy of the sdk for /usr.
                    Defaults to true if build-runtime is specified.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>appstream-compose</option> (boolean)</term>
                    <listitem><para>Run appstream-compose during cleanup phase. Defaults to true.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>sdk-extensions</option> (array of strings)</term>
                    <listitem><para>Install these extra sdk extensions in /usr.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>platform-extensions</option> (array of strings)</term>
                    <listitem><para>Install these extra sdk extensions when creating the platform.</para></listitem>
                </varlistentry>

                <varlistentry>
                    <term><option>base</option> (string)</term>
                    <listitem><para>Start with the files from the specified application. This can be
                    used to create applications that extend another application.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>base-version</option> (string)</term>
                    <listitem><para>Use this specific version of the application specified in base.
                    If unspecified, this uses the value specified in branch</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>base-extensions</option> (array of strings)</term>
                    <listitem><para>Install these extra extensions from the base application when initializing
                    the application directory.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>inherit-extensions</option> (array of strings)</term>
                    <listitem><para>Inherit these extra extensions points from the base application or sdk when
                    finishing the build.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>inherit-sdk-extensions</option> (array of strings)</term>
                    <listitem><para>Inherit these extra extensions points from the base application or sdk when
                    finishing the build, but do not inherit them into the platform.</para></listitem>
                </varlistentry>

                <varlistentry>
                    <term><option>tags</option> (array of strings)</term>
                    <listitem><para>Add these tags to the metadata file.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>build-options</option> (object)</term>
                    <listitem><para>Object specifying the build environment. See below for details.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>modules</option> (array of objects or strings)</term>
                    <listitem><para>An array of objects specifying the modules to be built in order.
                    String members in the array are interpreted as the name of a separate json or yaml file that contains a module.
                    See below for details.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>add-extensions</option> (objects)</term>
                    <listitem><para>This is a dictionary of extension objects. The key is the name of the extension. See below for details.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>add-build-extensions</option> (objects)</term>
                    <listitem><para>This is a dictionary of extension objects similar to add-extensions. The main difference is that the extensions are added early and are available for use during the build.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cleanup</option> (array of strings)</term>
                    <listitem><para>An array of file patterns that should be removed at the end.
                    Patterns starting with / are taken to be full pathnames (without the /app prefix), otherwise they just match
                    the basename.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cleanup-commands</option> (array of strings)</term>
                    <listitem><para>An array of commandlines that are run during the cleanup phase.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cleanup-platform</option> (array of strings)</term>
                    <listitem><para>Extra files to clean up in the platform.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cleanup-platform-commands</option> (array of strings)</term>
                    <listitem><para>An array of commandlines that are run during the cleanup phase of the platform.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>prepare-platform-commands</option> (array of strings)</term>
                    <listitem><para>An array of commandlines that are run after importing the base platform, but before applying the new files from the sdk. This is a good place to e.g. delete things from the base that may conflict with the files added in the sdk. </para></listitem>
                </varlistentry>
               <varlistentry>
                    <term><option>finish-args</option> (array of strings)</term>
                    <listitem><para>An array of arguments passed to the <command>flatpak build-finish</command> command.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>rename-desktop-file</option> (string)</term>
                    <listitem><para>Any desktop file with this name will be renamed to a name based on id during the cleanup phase.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>rename-appdata-file</option> (string)</term>
                    <listitem><para>Any appdata file with this name will be renamed to a name based on id during the cleanup phase.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>rename-icon</option> (string)</term>
                    <listitem><para>Any icon with this name will be renamed to a name based on id during the cleanup phase. Note that this is the icon name, not the full filenames, so it should not include a filename extension. </para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>appdata-license</option> (string)</term>
                    <listitem><para>Replace the appdata
                    project_license field with this string. This is
                    useful as the upstream license is typically only
                    about the application itself, whereas the bundled
                    app can contain other licenses
                    too. </para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>copy-icon</option> (boolean)</term>
                    <listitem><para>If rename-icon is set, keep a copy of the old icon file.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>desktop-file-name-prefix</option> (string)</term>
                    <listitem><para>This string will be prefixed to the Name key in the main application desktop file.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>desktop-file-name-suffix</option> (string)</term>
                    <listitem><para>This string will be suffixed to the Name key in the main application desktop file.</para></listitem>
                </varlistentry>
        </variablelist>

        </refsect2>
        <refsect2>
            <title>Build Options</title>
            <para>
                Build options specify the build environment of a module, and can be specified globally as
                well as per-module. Options can also be specified on a per-architecture basis using the arch property.
            </para>
            <para>
                These are the properties that are accepted:
            </para>
            <variablelist>
                <varlistentry>
                    <term><option>cflags</option> (string)</term>
                    <listitem><para>This is set in the environment variable CFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cflags-override</option> (boolean)</term>
                    <listitem><para>If this is true, clear cflags from previous build options before adding it from these options.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cppflags</option> (string)</term>
                    <listitem><para>This is set in the environment variable CPPFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cppflags-override</option> (boolean)</term>
                    <listitem><para>If this is true, clear cppflags from previous build options before adding it from these options.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cxxflags</option> (string)</term>
                    <listitem><para>This is set in the environment variable CXXFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cxxflags-override</option> (boolean)</term>
                    <listitem><para>If this is true, clear cxxflags from previous build options before adding it from these options.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>ldflags</option> (string)</term>
                    <listitem><para>This is set in the environment variable LDFLAGS during the build. Multiple specifications of this (in e.g. per-arch area) are concatenated, separated by spaces.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>ldflags-override</option> (boolean)</term>
                    <listitem><para>If this is true, clear ldflags from previous build options before adding it from these options.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>prefix</option> (string)</term>
                    <listitem><para>The build prefix for the modules (defaults to <filename>/app</filename> for
                    applications and <filename>/usr</filename> for runtimes).</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>libdir</option> (string)</term>
                    <listitem><para>The build libdir for the modules (defaults to <filename>/app/lib</filename> for
                    applications and <filename>/usr/lib</filename> for runtimes).</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>append-path</option> (string)</term>
                    <listitem><para>This will get appended to PATH in the build environment (with an leading colon if
                    needed).</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>prepend-path</option> (string)</term>
                    <listitem><para>This will get prepended to PATH in the build environment (with an trailing colon if
                    needed).</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>append-ld-library-path</option> (string)</term>
                    <listitem><para>This will get appended to LD_LIBRARY_PATH in the build environment (with an leading colon if
                    needed).</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>prepend-ld-library-path</option> (string)</term>
                    <listitem><para>This will get prepended to LD_LIBRARY_PATH in the build environment (with an trailing colon if
                    needed).</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>append-pkg-config-path</option> (string)</term>
                    <listitem><para>This will get appended to PKG_CONFIG_PATH in the build environment (with an leading colon if
                    needed).</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>prepend-pkg-config-path</option> (string)</term>
                    <listitem><para>This will get prepended to PKG_CONFIG_PATH in the build environment (with an trailing colon if
                    needed).</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>env</option> (object)</term>
                    <listitem><para>This is a dictionary defining environment variables to be set during the build. Elements in this override the properties that set the environment, like cflags and ldflags. Keys with a null value unset the corresponding variable. </para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>build-args</option> (array of strings)</term>
                    <listitem><para>This is an array containing extra options to pass to flatpak build.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>test-args</option> (array of strings)</term>
                    <listitem><para>Similar to build-args but affects the tests, not the normal build.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>config-opts</option> (array of strings)</term>
                    <listitem><para>This is an array containing extra options to pass to configure.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>make-args</option> (array of strings)</term>
                    <listitem><para>An array of extra arguments that will be passed to make</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>make-install-args</option> (array of strings)</term>
                    <listitem><para>An array of extra arguments that will be passed to make install</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>strip</option> (boolean)</term>
                    <listitem><para>If this is true (the default is false) then all ELF files will be stripped after install.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>no-debuginfo</option> (boolean)</term>
                    <listitem><para>By default (if strip is not true) flatpak-builder extracts all debug info in ELF files to a separate files
                    and puts this in an extension. If you want to disable this, set no-debuginfo to true.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>no-debuginfo-compression</option> (boolean)</term>
                    <listitem><para>By default when extracting debuginfo we compress the debug sections. If you want to disable this, set no-debuginfo-compression to true.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>arch</option> (object)</term>
                    <listitem><para>This is a dictionary defining for each arch a separate build options object that override the main one.</para></listitem>
                </varlistentry>
            </variablelist>
        </refsect2>
        <refsect2>
            <title>Extension</title>
            <para>
              Extension define extension points in the app/runtime that can be implemented by extensions, supplying extra files
              which are available during runtime..
            </para>
            <para>
                These are the properties that are accepted:
            </para>
            <variablelist>
                <varlistentry>
                    <term><option>directory</option> (string)</term>
                    <listitem><para>
                      The directory where the extension is mounted.
                      If the extension point is for an application, this path is relative to /app,
                      otherwise it is relative to /usr.
                    </para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>bundle</option> (boolean)</term>
                    <listitem><para>If this is true, then the data
                    created in the extension directory is omitted from
                    the result, and instead packaged in a separate
                    extension.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>remove-after-build</option> (boolean)</term>
                    <listitem><para>If this is true, the extension is
                    removed during when finishing. This is only
                    interesting for extensions in the
                    add-build-extensions property.</para></listitem>
                </varlistentry>
            </variablelist>
            <para>
              Additionally the standard flatpak extension properties
              are supported, and put directly into the metadata file:
              autodelete, no-autodownload, subdirectories,
              add-ld-path, download-if, enable-if, merge-dirs,
              subdirectory-suffix, locale-subset, version, versions.
              See the flatpak metadata documentation for more information on these.
            </para>
        </refsect2>
        <refsect2>
            <title>Module</title>
            <para>
                Each module specifies a source that has to be separately built and installed. It contains
                the build options and a list of sources to download and extract before building.
            </para>
            <para>
                Modules can be nested, in order to turn related modules on and off with a single key.
            </para>
            <para>
                These are the properties that are accepted:
            </para>
            <variablelist>
                <varlistentry>
                    <term><option>name</option> (string)</term>
                    <listitem><para>The name of the module, used in e.g. build logs. The name is also used for constructing filenames and commandline arguments, therefore using spaces or '/' in this string is a bad idea.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>disabled</option> (boolean)</term>
                    <listitem><para>If true, skip this module</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>sources</option> (array of objects or strings)</term>
                    <listitem><para>An array of objects defining
                    sources that will be downloaded and extracted in
                    order. String members in the array are interpreted
                    as the name of a separate json or yaml file that contains
                    sources.  See below for details.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>config-opts</option> (array of strings)</term>
                    <listitem><para>An array of options that will be passed to configure</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>make-args</option> (array of strings)</term>
                    <listitem><para>An array of arguments that will be passed to make</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>make-install-args</option> (array of strings)</term>
                    <listitem><para>An array of arguments that will be passed to make install</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>rm-configure</option> (boolean)</term>
                    <listitem><para>If true, remove the configure script before starting build</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>no-autogen</option> (boolean)</term>
                    <listitem><para>Ignore the existence of an autogen script</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>no-parallel-make</option> (boolean)</term>
                    <listitem><para>Don't call make with arguments to build in parallel</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>install-rule</option> (string)</term>
                    <listitem><para>Name of the rule passed to make for the install phase, default is install</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>no-make-install</option> (boolean)</term>
                    <listitem><para>Don't run the make install (or equivalent) stage</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>no-python-timestamp-fix</option> (boolean)</term>
                    <listitem><para>Don't fix up the *.py[oc] header timestamps for ostree use.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cmake</option> (boolean)</term>
                    <listitem><para>Use cmake instead of configure (deprecated: use buildsystem instead)</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>buildsystem</option> (string)</term>
                    <listitem><para>Build system to use: autotools, cmake, cmake-ninja, meson, simple, qmake</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>builddir</option> (boolean)</term>
                    <listitem><para>Use a build directory that is separate from the source directory</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>subdir</option> (string)</term>
                    <listitem><para>Build inside this subdirectory of the extracted sources</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>build-options</option> (object)</term>
                    <listitem><para>A build options object that can override global options</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>build-commands</option> (array of strings)</term>
                    <listitem><para>An array of commands to run during build (between make and make install if those are used).
                    This is primarily useful when using the "simple" buildsystem.
                    Each command is run in <literal>/bin/sh -c</literal>, so it can use standard POSIX shell syntax such as piping output.
                    </para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>post-install</option> (array of strings)</term>
                    <listitem><para>An array of shell commands that are run after the install phase. Can for example
                    clean up the install dir, or install extra files.
                    </para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cleanup</option> (array of strings)</term>
                    <listitem><para>An array of file patterns that should be removed at the end.
                    Patterns starting with / are taken to be full pathnames (without the /app prefix), otherwise they just match
                    the basename. Note that any patterns will only match files installed by this module.
                    </para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>ensure-writable</option> (array of strings)</term>
                    <listitem><para>The way the builder works is that files in the install directory
                    are hard-links to the cached files, so you're not allowed to modify them in-place.
                    If you list a file in this then the hardlink will be broken and you can modify it.
                    This is a workaround, ideally installing files should replace files, not modify
                    existing ones.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>only-arches</option> (array of strings)</term>
                    <listitem><para>If non-empty, only build the module on the arches listed.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>skip-arches</option> (array of strings)</term>
                    <listitem><para>Don't build on any of the arches listed.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>cleanup-platform</option> (array of strings)</term>
                    <listitem><para>Extra files to clean up in the platform.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>run-tests</option> (boolean)</term>
                    <listitem><para>If true this will run the tests after installing.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>test-rule</option> (string)</term>
                    <listitem><para>The target to build when running the tests. Defaults to "check" for make and "test" for ninja. Set to empty to disable.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>test-commands</option> (array of strings)</term>
                    <listitem><para>Array of commands to run during the tests.</para></listitem>
                </varlistentry>
                <varlistentry>
                    <term><option>modules</option> (array of objects or strings)</term>
                    <listitem><para>An array of objects specifying nested modules to be built before this one.
                    String members in the array are interpreted as names of a separate json or yaml file that contains a module.</para></listitem>
                </varlistentry>
            </variablelist>
        </refsect2>
        <refsect2>
            <title>Sources</title>
            <para>
                These contain a pointer to the source that will be extracted into the source directory before
                the build starts. They can be of several types, distinguished by the type property.
            </para>
            <para>
                Additionally, the sources list can contain a plain string, which is interpreted as the name
                of a separate json or yaml file that is read and inserted at this point. The file can contain
                a single source, or an array of sources.
            </para>
            <refsect3>
                <title>All sources</title>
                <variablelist>
                  <varlistentry>
                    <term><option>only-arches</option> (array of strings)</term>
                    <listitem><para>If non-empty, only build the module on the arches listed.</para></listitem>
                  </varlistentry>
                  <varlistentry>
                    <term><option>skip-arches</option> (array of strings)</term>
                    <listitem><para>Don't build on any of the arches listed.</para></listitem>
                  </varlistentry>
                    <varlistentry>
                        <term><option>dest</option> (string)</term>
                        <listitem><para>Directory inside the source dir where this source will be extracted.</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Archive sources (tar, zip)</title>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"archive"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>path</option> (string)</term>
                        <listitem><para>The path of the archive</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>url</option> (string)</term>
                        <listitem><para>The URL of a remote archive that will be downloaded. This overrides path if both are specified.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>mirror-urls</option> (array of strings)</term>
                        <listitem><para>A list of alternative urls that are used if the main url fails.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>git-init</option> (boolean)</term>
                        <listitem><para>Whether to initialise the repository as a git repository.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>archive-type</option> (string)</term>
                        <listitem><para>
                            The type of archive if it cannot be guessed from the path. Possible values are "rpm", "tar",
                            "tar-gzip", "tar-compress", "tar-bzip2", "tar-lzip", "tar-lzma", "tar-lzop", "tar-xz", "zip" and "7z".
                        </para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>md5</option> (string)</term>
                        <listitem><para>The md5 checksum of the file, verified after download</para>
                        <para>Note that md5 is no longer considered a safe checksum, we recommend you use at least sha256.</para>
                        </listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>sha1</option> (string)</term>
                        <listitem><para>The sha1 checksum of the file, verified after download</para>
                        <para>Note that sha1 is no longer considered a safe checksum, we recommend you use at least sha256.</para>
                        </listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>sha256</option> (string)</term>
                        <listitem><para>The sha256 checksum of the file, verified after download</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>sha512</option> (string)</term>
                        <listitem><para>The sha512 checksum of the file, verified after download</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>strip-components</option> (integer)</term>
                        <listitem><para>The number of initial pathname components to strip during extraction. Defaults to 1.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>dest-filename</option> (string)</term>
                        <listitem><para>Filename to for the downloaded file, defaults to the basename of url.</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Git sources</title>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"git"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>path</option> (string)</term>
                        <listitem><para>The path to a local checkout of the git repository. Due to how git-clone works, this will be much faster than specifying a URL of file:///...</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>url</option> (string)</term>
                        <listitem><para>URL of the git repository. This overrides path if both are specified. When using git via SSH, the correct syntax is ssh://user@domain/path/to/repo.git.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>branch</option> (string)</term>
                        <listitem><para>The branch to use from the git repository</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>tag</option> (string)</term>
                        <listitem><para>The tag to use from the git repository</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>commit</option> (string)</term>
                        <listitem><para>The commit to use from the git repository. If branch is also specified, then it is verified that the branch/tag is at this specific commit. This is
                        a readable way to document that you're using a particular tag, but verify that it does not change.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>disable-fsckobjects</option> (boolean)</term>
                        <listitem><para>Don't use transfer.fsckObjects=1 to mirror git repository. This may be needed for some (broken) repositories.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>disable-shallow-clone</option> (boolean)</term>
                        <listitem><para>Don't optimize by making a shallow clone when downloading the git repo.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>disable-submodules</option> (boolean)</term>
                        <listitem><para>Don't checkout the git submodules when cloning the repository.</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Bzr sources</title>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"bzr"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>url</option> (string)</term>
                        <listitem><para>URL of the bzr repository</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>revision</option> (string)</term>
                        <listitem><para>A specific revision to use in the branch</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Svn sources</title>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"svn"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>url</option> (string)</term>
                        <listitem><para>URL of the svn repository, including branch/tag part</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>revision</option> (string)</term>
                        <listitem><para>A specific revision number to use</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Directory sources</title>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"dir"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>path</option> (string)</term>
                        <listitem><para>The path of a local directory whose content will be copied into the source dir. Note that directory sources don't currently support caching, so they will be rebuilt each time.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>skip</option> (array of strings)</term>
                        <listitem><para>Source files to ignore in the directory.</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>File sources</title>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"file"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>path</option> (string)</term>
                        <listitem><para>The path of a local file that will be copied into the source dir</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>url</option> (string)</term>
                        <listitem><para>The URL of a remote file that will be downloaded and copied into the source dir. This overrides path if both are specified.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>mirror-urls</option> (array of strings)</term>
                        <listitem><para>A list of alternative urls that are used if the main url fails.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>md5</option> (string)</term>
                        <listitem><para>The md5 checksum of the file, verified after download. This is optional for local files.</para>
                        <para>Note that md5 is no longer considered a safe checksum, we recommend you use at least sha256.</para>
                        </listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>sha1</option> (string)</term>
                        <listitem><para>The sha1 checksum of the file, verified after download. This is optional for local files.</para>
                        <para>Note that sha1 is no longer considered a safe checksum, we recommend you use at least sha256.</para>
                        </listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>sha256</option> (string)</term>
                        <listitem><para>The sha256 checksum of the file, verified after download. This is optional for local files.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>sha512</option> (string)</term>
                        <listitem><para>The sha512 checksum of the file, verified after download. This is optional for local files.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>dest-filename</option> (string)</term>
                        <listitem><para>Filename to use inside the source dir, default to the basename of path.</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Script sources</title>
                <para>
                    This is a way to create a shell (/bin/sh) script from an inline set of commands.
                </para>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"script"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>commands</option> (array of strings)</term>
                        <listitem><para>An array of shell commands that will be put in a shellscript file</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>dest-filename</option> (string)</term>
                        <listitem><para>Filename to use inside the source dir, default to autogen.sh.</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Shell sources</title>
                <para>
                    This is a way to create/modify the sources by running shell commands.
                </para>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"shell"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>commands</option> (array of strings)</term>
                        <listitem><para>An array of shell commands that will be run during source extraction</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Patch sources</title>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"patch"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>path</option> (string)</term>
                        <listitem><para>The path of a patch file that will be applied in the source dir</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>paths</option> (array of strings)</term>
                        <listitem><para>An list of paths to a patch files that will be applied in the source dir, in order</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>strip-components</option> (integer)</term>
                        <listitem><para>The value of the -p argument to patch, defaults to 1.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>use-git</option> (boolean)</term>
                        <listitem><para>Whether to use "git apply" rather than "patch" to apply the patch, required when the patch file contains binary diffs.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>use-git-am</option> (boolean)</term>
                        <listitem><para>Whether to use "git am" rather than "patch" to apply the patch, required when the patch file contains binary diffs. You cannot use this at the same time as <option>use-git</option>.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>options</option> (array of strings)</term>
                        <listitem><para>Extra options to pass to the patch command.</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
            <refsect3>
                <title>Extra data sources</title>
                <variablelist>
                    <varlistentry>
                        <term><option>type</option></term>
                        <listitem><para>"extra-data"</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>filename</option> (string)</term>
                        <listitem><para>The name to use for the downloaded extra data</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>url</option> (string)</term>
                        <listitem><para>The url to the extra data.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>sha256</option> (string)</term>
                        <listitem><para>The sha256 of the extra data.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>size</option> (number)</term>
                        <listitem><para>The size of the extra data in bytes.</para></listitem>
                    </varlistentry>
                    <varlistentry>
                        <term><option>installed-size</option> (string)</term>
                        <listitem><para>The extra installed size this adds to the app (optional).</para></listitem>
                    </varlistentry>
                </variablelist>
            </refsect3>
        </refsect2>
    </refsect1>

    <refsect1>
      <title>Build environment</title>

      <para>
        When building the application each command is run in a separate sandbox with access
        to only the things required for it. This section describes the details of the sandbox.
        Any options here can be overridden globally or per-module with the <option>build-args</option>
        option (although such manifest will not work if you start flatpak-builder with <option>--sandbox</option>).
      </para>

      <refsect2>
        <title>Filesystem</title>
        <para>
          Each module is built in its own build directory, stored in a sub directory called
          <filename>build/$modulename-$count</filename> in the state dir (which is typically <filename>.flatpak-builder/</filename>).
          Additionally there is a symlink <filename>build/$modulename</filename> to the latest version.
          In order to generate reproducible builds this directory is also mounted as <filename>/run/build/$modulename</filename>
          in the sandbox (or <filename>/run/build-runtime/$modulename</filename> when building runtimes).
          This is used as current working directory for all build ops.
        </para>
        <para>
          The destination directory for installation is accessible for writing at the place it will seen at runtime.
          In the case of a regular application this will be /app. If building a runtime it will instead be /usr, and
          when building an extension it will be at the extensionpoint directory somewhere below /app (for app extension)
          or /usr (for runtime extensions).
        </para>
        <para>
          Additionally the there will be (as needed, depending on what is building) read-only mounts of the sdk at /usr,
          sdk extensions below that, and the application at /app. No other filesystem access is available.
        </para>
      </refsect2>

      <refsect2>
        <title>Environment</title>
        <para>
          The environment can be modified in several ways in the manifest, but the default values are:
        </para>
        <variablelist>
          <varlistentry>
            <term>FLATPAK_ID</term>
            <listitem><para>The id of the application currently building.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term>FLATPAK_ARCH</term>
            <listitem><para>The architecture currently building.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term>FLATPAK_DEST</term>
            <listitem><para>The path to where the current build should install into. This is <filename>/app</filename> for application builds.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term>FLATPAK_BUILDER_N_JOBS</term>
            <listitem><para>The number of jobs that flatpak-builder would normally use for make -j. Defaults to ncpus unless the module disabled parallel make.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term>FLATPAK_BUILDER_BUILDDIR</term>
            <listitem><para>The path to the build directory of the module currently building. This is normally <filename>/run/build/$MODULE</filename>.</para></listitem>
          </varlistentry>
          <varlistentry>
            <term>PATH</term>
            <listitem><para><filename>/app/bin:/usr/bin</filename></para></listitem>
          </varlistentry>
          <varlistentry>
            <term>LD_LIBRARY_PATH</term>
            <listitem><para><filename>/app/lib</filename></para></listitem>
          </varlistentry>
          <varlistentry>
            <term>PKG_CONFIG_PATH</term>
            <listitem><para><filename>/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig</filename></para></listitem>
          </varlistentry>
          <varlistentry>
            <term>ACLOCAL_PATH</term>
            <listitem><para><filename>/app/share/aclocal</filename></para></listitem>
          </varlistentry>
          <varlistentry>
            <term>C_INCLUDE_PATH</term>
            <listitem><para><filename>/app/include</filename></para></listitem>
          </varlistentry>
          <varlistentry>
            <term>CPLUS_INCLUDE_PATH</term>
            <listitem><para><filename>/app/include</filename></para></listitem>
          </varlistentry>
          <varlistentry>
            <term>LDFLAGS</term>
            <listitem><para>-L/app/lib </para></listitem>
          </varlistentry>
          <varlistentry>
            <term>LC_ALL</term>
            <listitem><para>en_US.utf8</para></listitem>
          </varlistentry>
        </variablelist>
      </refsect2>

      <refsect2>
        <title>Permissions</title>
        <para>
          Builds have the --allow=devel and --allow=multiarch permissions that regular flatpak runs don't have by default. This allows
          limits the syscall filtering that is normally done so development tools like debuggers work. Otherwise the build sandbox
          is very limited, for example there is no network access.
        </para>
      </refsect2>
    </refsect1>

    <refsect1>
        <title>Examples</title>

        <para>
            <command>$ flatpak-builder my-app-dir manifest.json</command>
        </para>

        <para>
            Example manifest file:
        </para>
<programlisting>
{
    "id": "org.test.TestApp",
    "runtime": "org.freedesktop.Platform",
    "runtime-version": "1.2",
    "sdk": "org.freedesktop.Sdk",
    "command": "test",
    "clean": [ "/include", "*.la" ],
    "build-options" : {
        "cflags": "-O2 -g",
        "cxxflags": "-O2 -g",
        "env": {
            "V": "1"
        },
        "arch": {
            "x86_64": {
                "cflags": "-O3 -g",
            }
        }
    },
    "modules": [
        {
            "name": "pygobject",
            "config-opts": [ "--disable-introspection" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.6.tar.xz",
                    "sha256": "fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8"
                },
                {
                    "type": "patch",
                    "path": "required-pygobject-fix.patch"
                },
                {
                    "type": "file",
                    "path": "pygobject-extra-file",
                    "dest-filename": "extra-file"
                }
            ]
        },
        {
            "name": "babl",
            "build-options" : { "cxxflags": "-O2 -g -std=c++11" },
            "cleanup": [ "/bin" ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://gitlab.gnome.org/GNOME/babl.git"
                }
            ]
        },
        {
            "name": "testapp",
            "sources": [
                {
                    "type": "bzr",
                    "url": "lp:testapp"
                }
            ]
        }
    ]
}
</programlisting>

    </refsect1>

    <refsect1>
        <title>See also</title>

        <para>
            <citerefentry><refentrytitle>flatpak-builder</refentrytitle><manvolnum>1</manvolnum></citerefentry>
        </para>

    </refsect1>

</refentry>