Skip to content

Commit

Permalink
update preset flatpak packaging docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vchernin committed Apr 23, 2024
1 parent 35b69a7 commit f926c0f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions COMMUNITY_PRESETS_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ associated to the installed package. In example:

Flatpak extension packages do not use `$XDG_DATA_DIRS`, and instead place and search for files under a different directory (detailed in examples below). Besides this detail, flatpak and distribution packages should behave the same in regard to community presets.

In order to package a flatpak on flathub you do the following general steps:
In order to publish a Flatpak preset package on Flathub you do the following general steps:

1. Create AppStream metainfo file (should be stored in your preset repository as it is not flatpak-specific).
2. Create flatpak json file
3. Submit to flathub, described following [flathub's guide](https://docs.flathub.org/docs/for-app-authors/submission/).
1. Create AppStream MetaInfo file (should be stored in your preset repository as it is not flatpak-specific).
2. Create Flatpak json manifest file
3. Submit to Flathub, described following [Flathub's guide](https://docs.flathub.org/docs/for-app-authors/submission/).

#### Step by step instructions

1. Decide on a name. It should be e.g. `io.github.wwmm.easyeffects.Presets.PRESET_PACKAGE_NAME`. The name must be consistent across the files used for flatpak otherwise the package will not build/work properly.
1. Decide on a name. It should be e.g. `io.github.wwmm.easyeffects.Presets.PRESET_PACKAGE_NAME`. For example `io.github.wwmm.easyeffects.Presets.LoudnessEqualizer` for a specific preset or `io.github.wwmm.easyeffects.Presets.wwmm` for a group of presets without a particular "theme". The name must be consistent across the files used for Flatpak otherwise the package will not build/work properly.

> [!NOTE]
> flatpak uses `io.github.wwmm.easyeffects.Presets` as the extension point name (which preset packages must use), while `com.github.wwmm.easyeffects` is the name of the easyeffects package itself. This is necessary since `com.github.*` is only allowed for backwards compatibility reasons on flathub, and newer packages must use `io.github.*`.
> Flatpak uses `io.github.wwmm.easyeffects.Presets` as the extension point name (which preset packages must use), while `com.github.wwmm.easyeffects` is the name of the Easy Effects package itself. This is necessary since `com.github.*` is only allowed for backwards compatibility reasons on Flathub, and newer packages must use `io.github.*`.
2. Clone the flathub repo following [flathub's guide](https://docs.flathub.org/docs/for-app-authors/submission/).
2. Clone the Flathub repo for new submissions following [Flathub's guide](https://docs.flathub.org/docs/for-app-authors/submission/).

3. Create the AppStream metainfo file, which should go in your preset repository, not the flathub repository. Name it `io.github.wwmm.easyeffects.Presets.PRESET_PACKAGE_NAME.metainfo.xml`. Replace `PRESET_PACKAGE_NAME`, `PRESET_PACKAGE_NAME_PRETTY`, `DEVELOPER_NAME_ID`, `DEVELOPER_NAME`, `REPO_URL`. You may add more information to this file (which may help improve visibility of the package on flathub/software stores) as described in the [appstream docs](https://www.freedesktop.org/software/appstream/docs/).
3. Create the AppStream MetaInfo file, which should go in your preset repository, not the Flathub repository. Name it `io.github.wwmm.easyeffects.Presets.PRESET_PACKAGE_NAME.metainfo.xml`. Replace `PRESET_PACKAGE_NAME`, `PRESET_PACKAGE_NAME_PRETTY`, `DEVELOPER_NAME_ID`, `DEVELOPER_NAME`, and `REPO_URL`. You may optionally add more information to this file (which may help improve visibility of the package on Flathub/software stores) as described in the [appstream docs](https://www.freedesktop.org/software/appstream/docs/).

```xml
<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -88,7 +88,7 @@ In order to package a flatpak on flathub you do the following general steps:
</component>
```

4. Create the flatpak manifest file named `io.github.wwmm.easyeffects.Presets.PRESET_PACKAGE_NAME.json`, this should go in your flathub repository. Replace `PRESET_PACKAGE_NAME`, `PRESET_FILE_NAME`, `REPO_NAME` (e.g. `wwmm/easyeffects` is the name for `github.com/wwmm/easyeffects`). You can add more `install` commands in `build-commands` if you want to install multiple presets. Make sure you carefully install to the correct directory for each type of preset, with the options of `input`, `output`, `irs`, and `rnnoise`. If the preset repo is not on github remove or replace the `x-checker-data` section.
4. Create the Flatpak manifest file named `io.github.wwmm.easyeffects.Presets.PRESET_PACKAGE_NAME.json`, this should go in your Flathub repository. Replace `PRESET_PACKAGE_NAME`, `PRESET_FILE_NAME`, `REPO_NAME`, `REPO_URL`, and `LATEST_COMMIT`. An example of `REPO_NAME` is `wwmm/easyeffects` and `REPO_URL` could be `https://github.com/wwmm/easyeffects.git` You can add more `install` commands in `build-commands` if you want to install multiple presets. Make sure you carefully install to the correct directory for each type of preset, with the options of `input`, `output`, `irs`, and `rnnoise`. If the preset repo is not on GitHub remove or replace the `x-checker-data` section.

```json
{
Expand All @@ -113,7 +113,7 @@ In order to package a flatpak on flathub you do the following general steps:
"sources": [
{
"type": "git",
"url": "REPO_NAME",
"url": "REPO_URL",
"commit": "LATEST_COMMIT",
"x-checker-data": {
"type": "json",
Expand All @@ -130,7 +130,7 @@ In order to package a flatpak on flathub you do the following general steps:

```

5. It is also necessary to add the following file called `flathub.json` in the flathub repo. The skip icons check is stricly necessary, since unlike a normal app we are not providing icons. We also recommended enabled a bot to automatically merge PRs with updates from the upstream repo. Given these are only preset files, this should not be a very risky thing to do and avoids manual maintenance hassle.
5. It is also necessary to add the following file called `flathub.json` in the Flathub repo. The skip icons check is stricly necessary, since unlike a normal app we are not providing icons. We also recommend enabling a Flathub bot to automatically merge PRs with updates from the upstream repo. Given these are only preset files, this should not be a very risky thing to do and avoids manual maintenance hassle.

```json
{
Expand All @@ -140,7 +140,7 @@ In order to package a flatpak on flathub you do the following general steps:

```

6. Now you can submit this to flathub via a PR, following [flathub's instructions](https://docs.flathub.org/docs/for-app-authors/submission/).
6. Now you can submit this to Flathub via a PR, following [Flathub's instructions](https://docs.flathub.org/docs/for-app-authors/submission/).


## Guidelines for package directories structure
Expand Down

0 comments on commit f926c0f

Please sign in to comment.