|
1 | | -This repository contains commonly shared modules and is intended to be used as a git submodule. |
| 1 | +## Flathub shared modules |
2 | 2 |
|
3 | | -Each submodule may include additional instructions to be used properly. Please check the folder containing that module to see if anything extra needs to be done. |
| 3 | +This repository contains Flatpak build recipes of commonly shared |
| 4 | +modules and is intended to be used as a git submodule. Each submodule |
| 5 | +may include additional instructions to be used properly. Please check |
| 6 | +the folder containing that module to see if anything extra needs to be |
| 7 | +done. |
4 | 8 |
|
5 | | -## Adding |
| 9 | +### Adding |
6 | 10 |
|
7 | 11 | To use shared modules for packaging an application, add the submodule: |
8 | 12 |
|
9 | | -``` |
| 13 | +```sh |
10 | 14 | git submodule add https://github.com/flathub/shared-modules.git |
11 | 15 | ``` |
12 | 16 |
|
13 | | -## Usage |
| 17 | +### Usage |
14 | 18 |
|
15 | 19 | Then modules from this repository can be specified in an application |
16 | 20 | manifest. |
17 | 21 |
|
18 | 22 | ```json |
19 | 23 | "modules": [ |
20 | 24 | "shared-modules/SDL/SDL-1.2.15.json", |
21 | | - { |
22 | | - "name": "foo" |
23 | | - } |
24 | 25 | ] |
25 | 26 | ``` |
26 | 27 | And for a YAML manifest: |
27 | | -```YAML |
| 28 | + |
| 29 | +```yaml |
28 | 30 | modules: |
29 | 31 | - shared-modules/SDL/SDL-1.2.15.json |
30 | | - |
31 | | - - name: foo |
32 | 32 | ``` |
33 | 33 |
|
34 | | -## Updating |
| 34 | +### Updating |
35 | 35 |
|
36 | 36 | To update the submodule: |
37 | 37 |
|
38 | | -``` |
| 38 | +```sh |
39 | 39 | git submodule update --remote --merge |
40 | 40 | ``` |
41 | 41 |
|
42 | | -## Removing |
| 42 | +To automate updates, [dependabot](https://docs.github.com/en/code-security/getting-started/dependabot-quickstart-guide) |
| 43 | +can be used but please limit the update frequency to not more than once |
| 44 | +or twice a week. |
| 45 | + |
| 46 | +### Removing |
43 | 47 |
|
44 | 48 | To remove the submodule: |
45 | 49 |
|
46 | | -``` |
| 50 | +```sh |
47 | 51 | git submodule deinit -f -- shared-modules |
48 | 52 | rm -rf .git/modules/shared-modules |
49 | 53 | git rm -f shared-modules |
50 | 54 | rm .gitmodules |
51 | 55 | ``` |
52 | 56 |
|
53 | | -We provide an automatic updating mechanism for submodules located here. In order to utilize it: |
| 57 | +### External data checker |
| 58 | + |
| 59 | +We provide an automatic updating mechanism for submodules located here. |
| 60 | +In order to utilize it [set up x-checker-data](https://github.com/flathub/flatpak-external-data-checker) |
| 61 | +for your sources and they will be checked for updates in a weekly basis. |
| 62 | + |
| 63 | +### Inclusion criteria |
| 64 | + |
| 65 | +- The module must be widely used on [Flathub](https://github.com/flathub) |
| 66 | + by actively maintained applications. |
| 67 | + |
| 68 | +- The module must not be provided by any current branch of the runtimes. |
54 | 69 |
|
55 | | -- Set up x-checker-data for your sources: https://github.com/flathub/flatpak-external-data-checker#url-checker |
| 70 | +- The module manifest must be in JSON format. |
56 | 71 |
|
57 | | -And it will check for updates in a weekly basis. |
| 72 | +### Inclusion process |
58 | 73 |
|
59 | | -Please do not request adding modules unless they are widely used in |
60 | | -the Flathub repository. |
| 74 | +Please open a [pull request](https://github.com/flathub/shared-modules/pulls) |
| 75 | +with the module manifest and add yourself as a [codeowner](https://github.com/flathub/shared-modules/blob/master/CODEOWNERS) |
| 76 | +of that module. |
61 | 77 |
|
62 | | -All shared modules manifests in this repository are, and need to be, in the JSON format, |
63 | | -which is supported by both Flatpak manifest formats, JSON and YAML. |
| 78 | +The manifest must be buildable with the latest Freedesktop SDK runtime. |
0 commit comments