[moserial: 1/11] Add Flatpak manifest
- From: Michael J. Chudobiak <mjc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [moserial: 1/11] Add Flatpak manifest
- Date: Fri, 23 Jul 2021 18:47:21 +0000 (UTC)
commit 7a9f3547f98d5d806e0447dc49733d8691ce3377
Author: Jordan Williams <jordan jwillikers com>
Date: Fri Jul 9 13:01:38 2021 -0500
Add Flatpak manifest
This commit adds a Flatpak manifest file for packaging moserial.
The manifest is meant for making nightly builds in CI and local builds.
It's based on the workflow used in GNOME Podcasts.
Additional work will need to be done to implement nightly builds.
Given GNOME's infrastructure, this will probably be easier using Meson.
I have left that bit out for now.
More steps may be necessary to add moserial to GNOME's Flatpak repo.
A similar manifest should be submitted to the Flathub repository.
This will make it more widely accessible for users to install.
The desktop file, icon, and AppStream metadata are patched.
Flatpak expects these files to be named with the full Flatpak name.
So moserial.png becomes org.gnome.moserial.png and etc.
This is not the ideal solution, nor is it complete.
It should be able to configure names with the optional '.Devel' suffix.
GNOME Podcasts does this with an application_id variable with Meson.
For development, the id would become org.gnome.moserial.Devel.
All file names would likewise follow suite.
This responsibility ultimately belongs to the build system, though.
The build system should be expanded to configure things appropriately.
The README file has been updated accordingly.
It now contains the instructions necessary for building the Flatpak.
This commit also had to workaround issues building the configure script.
The file gnome-autogen.sh is not present in the repository.
It is downloaded by the manifest.
The autogen.sh file does not call the script correctly.
This is also patched in the manifest
These issues should be fixed in the future.
.gitmodules | 3 +++
README | 42 ++++++++++++++++++++++++++++++++++++++----
org.gnome.moserial.Devel.yaml | 37 +++++++++++++++++++++++++++++++++++++
shared-modules | 1 +
4 files changed, 79 insertions(+), 4 deletions(-)
---
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..1e7a990
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "shared-modules"]
+ path = shared-modules
+ url = https://github.com/flathub/shared-modules.git
diff --git a/README b/README
index 3e9e8d5..a58bb2f 100644
--- a/README
+++ b/README
@@ -16,7 +16,41 @@ For more information see [GNOME wiki](https://wiki.gnome.org/Apps/Moserial).
## Build
-### Dependencies
+### Flatpak
+
+Add the Flathub repository.
+```
+flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
+```
+
+Add the GNOME Nightly repository.
+```
+flatpak remote-add --user --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo
+```
+
+Install the GNOME Platform and SDK.
+```
+flatpak install --user gnome-nightly org.gnome.Sdk//master org.gnome.Platform//master
+```
+
+Install Flatpak Builder.
+```
+sudo apt-get install flatpak-builder
+```
+
+Build the Flatpak.
+```
+flatpak-builder --user --install --force-clean --repo=repo moserial org.gnome.moserial.Devel.yaml
+```
+
+Run the Flatpak.
+```
+flatpak run org.gnome.moserial
+```
+
+### Build from Source
+
+#### Dependencies
Install the following build dependencies:
@@ -34,7 +68,7 @@ make
sudo make install
```
-### Manually build
+#### Manually build
```
git clone https://github.com/Mictronics/moserial
@@ -47,13 +81,13 @@ make
```
On 64 bit systems:
```
-./autogen.sh --prefix=/usr --libdir '/usr/lib64' --build x86_64
+./autogen.sh --prefix=/usr --libdir '/usr/lib64' --build x86_64
make
```
Optional:
`sudo make install`
-### Build issues
+#### Build issues
A. If you see this error:
src/SerialConnection.c:31:21: fatal error: stropts.h: No such file or directory
diff --git a/org.gnome.moserial.Devel.yaml b/org.gnome.moserial.Devel.yaml
new file mode 100644
index 0000000..dfa17db
--- /dev/null
+++ b/org.gnome.moserial.Devel.yaml
@@ -0,0 +1,37 @@
+id: org.gnome.moserial
+runtime: org.gnome.Platform
+runtime-version: master
+sdk: org.gnome.Sdk
+command: moserial
+tags:
+ - nightly
+finish-args:
+ # Need access to serial devices connected to the host.
+ - --device=all
+ - --filesystem=home
+ - --socket=x11
+ - --socket=wayland
+cleanup:
+ - /share/man
+ - /share/aclocal
+ - /share/intltool
+modules:
+ - shared-modules/intltool/intltool-0.51.json
+ - name: moserial
+ buildsystem: autotools
+ sources:
+ - type: git
+ url: https://gitlab.gnome.org/GNOME/moserial.git
+ - type: shell
+ commands:
+ - sed -i 's/. gnome-autogen.sh/sh gnome-autogen.sh/' autogen.sh
+ - type: file
+ url:
https://gitlab.gnome.org/GNOME/gnome-common/-/raw/3f52961bcc8828e33535466d60ca3edcdf5175c6/macros2/gnome-autogen.sh
+ sha256: c3406a48b0defd63d35f7f61850409ea75bee6d245526bcee901e35a69f5c22f
+ dest-filename: gnome-autogen.sh
+ post-install:
+ - mv /app/share/applications/moserial.desktop /app/share/applications/org.gnome.moserial.desktop
+ - sed -i 's/Icon=/Icon=org.gnome./' /app/share/applications/org.gnome.moserial.desktop
+ - mv /app/share/icons/hicolor/48x48/apps/moserial.png
/app/share/icons/hicolor/48x48/apps/org.gnome.moserial.png
+ - mv /app/share/metainfo/moserial.appdata.xml /app/share/metainfo/org.gnome.moserial.appdata.xml
+ - sed -i 's/moserial.desktop/org.gnome.moserial.desktop/'
/app/share/metainfo/org.gnome.moserial.appdata.xml
diff --git a/shared-modules b/shared-modules
new file mode 160000
index 0000000..ccb58f2
--- /dev/null
+++ b/shared-modules
@@ -0,0 +1 @@
+Subproject commit ccb58f2c69950bfbd5df0bc9960070afdbab2a3e
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]