-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add files to allow generation of Flatpak packages. #600
Open
tmiw
wants to merge
2
commits into
master
Choose a base branch
from
ms-flatpak-packaging
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 1600871..613cb09 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -169,10 +169,10 @@ set(LPCNET_ROOT http://rowetel.com/downloads/deep/) | ||
set(LPCNET_FILE lpcnet_191005_v1.0.tgz) | ||
set(LPCNET_URL ${LPCNET_ROOT}${LPCNET_FILE}) | ||
|
||
-if(EXISTS ${CMAKE_BINARY_DIR}/${LPCNET_FILE}) | ||
+if(EXISTS ${CMAKE_SOURCE_DIR}/${LPCNET_FILE}) | ||
set(lpcnet_SOURCE_DIR ${CMAKE_BINARY_DIR}/src) | ||
file(MAKE_DIRECTORY ${lpcnet_SOURCE_DIR}) | ||
- execute_process(COMMAND tar -xzf ${CMAKE_BINARY_DIR}/${LPCNET_FILE} -C ${CMAKE_BINARY_DIR}/src) | ||
+ execute_process(COMMAND tar -xzf ${CMAKE_SOURCE_DIR}/${LPCNET_FILE} -C ${CMAKE_BINARY_DIR}/src) | ||
|
||
# Work around not having the FetchContent module. | ||
elseif(CMAKE_VERSION VERSION_LESS 3.11.4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Flatpak packaging | ||
|
||
This folder contains the files necessary to generate a Flatpak package for FreeDV. Flatpak | ||
is a container-based packaging scheme available on most common Linux distros that enables | ||
the generation of a single package that works on multiple systems with no modifications | ||
required. | ||
|
||
## Setting up a Flatpak build environment | ||
|
||
Execute the following command (Debian/Ubuntu): | ||
|
||
``` | ||
$ git config --global protocol.file.allow always | ||
$ sudo apt install flatpak flatpak-builder gnome-software-plugin-flatpak | ||
$ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | ||
$ flatpak install flathub org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08 | ||
``` | ||
|
||
On other distros, the packages should be similar. | ||
|
||
## Generating a Flatpak package | ||
|
||
``` | ||
$ flatpak-builder flatpak-build org.freedv.freedv.yml | ||
``` | ||
|
||
## Installing and testing the generated package | ||
|
||
``` | ||
$ flatpak-builder --user --install --force-clean flatpak-build org.freedv.freedv.yml | ||
$ flatpak run org.freedv.freedv | ||
``` | ||
|
||
## Additional notes | ||
|
||
The Flatpak build container has no network access, so any new dependencies added to FreeDV will | ||
need to be downloaded and built as a separate module to ensure that the package can still be built. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
app-id: org.freedv.freedv | ||
runtime: org.freedesktop.Platform | ||
runtime-version: '23.08' | ||
sdk: org.freedesktop.Sdk | ||
command: freedv | ||
finish-args: | ||
- --share=network | ||
- --socket=wayland | ||
- --share=ipc | ||
- --socket=fallback-x11 | ||
- --socket=pulseaudio | ||
- --filesystem=home | ||
modules: | ||
- name: wxWidgets | ||
buildsystem: cmake | ||
builddir: true | ||
sources: | ||
- type: git | ||
url: https://github.com/wxWidgets/wxWidgets | ||
tag: v3.2.3 | ||
- name: LPCNet | ||
buildsystem: cmake | ||
builddir: true | ||
sources: | ||
- type: git | ||
url: https://github.com/drowe67/LPCNet.git | ||
tag: v0.5 | ||
- type: file | ||
url: http://rowetel.com/downloads/deep/lpcnet_191005_v1.0.tgz | ||
sha256: 509440924751fdd87ffaa5683ee3dddd937af5c833b9104ccce65d51614926c8 | ||
- type: patch | ||
path: LPCNet-flatpak-support.patch | ||
- name: codec2 | ||
buildsystem: cmake | ||
builddir: true | ||
modules: | ||
- LPCNet | ||
sources: | ||
- type: git | ||
url: https://github.com/drowe67/codec2.git | ||
tag: 1.2.0 | ||
config-opts: | ||
- -DLPCNET=ON | ||
- name: hamlib | ||
buildsystem: autotools | ||
sources: | ||
- type: git | ||
url: https://github.com/Hamlib/Hamlib.git | ||
tag: 4.5.5 | ||
- name: socketio-cpp | ||
buildsystem: cmake | ||
sources: | ||
- type: git | ||
url: https://github.com/socketio/socket.io-client-cpp.git | ||
tag: master | ||
config-opts: | ||
- -DBUILD_TESTING=OFF | ||
- name: freedv | ||
buildsystem: cmake | ||
builddir: true | ||
modules: | ||
- wxWidgets | ||
- LPCNet | ||
- codec2 | ||
- hamlib | ||
- socketio-cpp | ||
sources: | ||
- type: git | ||
url: https://github.com/drowe67/freedv-gui.git | ||
tag: v1.9.4 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per current project policy, having
flatpak-builder
patch LPCNet is preferable to opening a PR in this project as it will eventually become deprecated/obsolete.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Flatpak does not appear to provide the ability to copy
lpcnet_191005_v1.0.tgz
to the correct location in the unpatched version. Without this patch, CMake will attempt to download this file, which as mentioned in the PR's README, will fail in the Flatpak environment.)