add files to build flatpak
This commit is contained in:
parent
7110533af3
commit
1738c1bf00
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
# Exit if any command fails
|
||||
set -e
|
||||
|
||||
# Echo all commands for debug purposes
|
||||
set -x
|
||||
|
||||
|
||||
# No spaces in project name.
|
||||
projectName=freezer
|
||||
projectId=f.f.freezer
|
||||
executableName=freezer
|
||||
|
||||
|
||||
# ------------------------------- Build Flatpak ----------------------------- #
|
||||
|
||||
# Extract portable Flutter build.
|
||||
mkdir -p $projectName
|
||||
tar -xf $projectName-linux.tar.gz -C $projectName
|
||||
|
||||
# Copy the portable app to the Flatpak-based location.
|
||||
cp -r $projectName /app/
|
||||
chmod +x /app/$projectName/$executableName
|
||||
mkdir -p /app/bin
|
||||
ln -s /app/$projectName/$executableName /app/bin/$executableName
|
||||
|
||||
# Install the icon.
|
||||
iconDir=/app/share/icons/hicolor/scalable/apps
|
||||
mkdir -p $iconDir
|
||||
cp -r "$projectName/data/flutter_assets/assets/icon.ico" "$iconDir/freezer.ico"
|
||||
|
||||
# Install the desktop file.
|
||||
desktopFileDir=/app/share/applications
|
||||
cat <<EOF > "$desktopFileDir/$projectId.desktop"
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=freezer
|
||||
GenericName=No DRM Deezer client
|
||||
Comment=No DRM Deezer client to listen and download your songs
|
||||
Exec=$executableName
|
||||
Icon=freezer
|
||||
Categories=Audio;Music;Player;AudioVideo;
|
||||
Keywords=Music;Player;Streaming;Online;
|
||||
Terminal=false
|
||||
EOF
|
||||
|
||||
# Install the AppStream metadata file.
|
||||
metadataDir=/app/share/metainfo
|
||||
mkdir -p $metadataDir
|
||||
cp -v $projectId.metainfo.xml $metadataDir/
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"app-id": "f.f.freezer",
|
||||
"runtime": "org.freedesktop.Platform",
|
||||
"runtime-version": "22.08",
|
||||
"sdk": "org.freedesktop.Sdk",
|
||||
"command": "freezer",
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--device=dri",
|
||||
"--share=network",
|
||||
"--socket=pulseaudio"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "ffmpeg",
|
||||
"cleanup": ["/include", "/lib/pkgconfig", "/share/ffmpeg/examples"],
|
||||
"config-opts": [
|
||||
"--enable-shared",
|
||||
"--disable-static",
|
||||
"--enable-gnutls",
|
||||
"--disable-doc",
|
||||
"--disable-programs",
|
||||
"--disable-encoders",
|
||||
"--disable-muxers",
|
||||
"--enable-encoder=png",
|
||||
"--enable-libv4l2",
|
||||
"--enable-libdav1d"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://git.ffmpeg.org/ffmpeg.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libass",
|
||||
"cleanup": ["/include", "/lib/*.la", "/lib/pkgconfig"],
|
||||
"config-opts": ["--disable-static"],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://github.com/libass/libass/releases/download/0.14.0/libass-0.14.0.tar.xz",
|
||||
"sha256": "881f2382af48aead75b7a0e02e65d88c5ebd369fe46bc77d9270a94aa8fd38a2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libmpv",
|
||||
"cleanup": ["/include", "/lib/pkgconfig", "/share/man"],
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"python3 waf configure --prefix=/app --enable-libmpv-shared --disable-cplayer --disable-build-date --disable-alsa",
|
||||
"python3 waf build",
|
||||
"python3 waf install"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/mpv-player/mpv.git"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"url": "https://waf.io/waf-2.0.19",
|
||||
"sha256": "ba63c90a865a9bcf46926c4e6776f9a3f73d29f33d49b7f61f96bc37b7397cef",
|
||||
"dest-filename": "waf"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "freezer",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": ["./build-flatpak.sh"],
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"path": "freezer-linux.tar.gz"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "build-flatpak.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
Generator for metainfo & .desktop files:
|
||||
https://www.freedesktop.org/software/appstream/metainfocreator/#/
|
||||
-->
|
||||
<component type="desktop-application">
|
||||
<id>f.f.freezer</id>
|
||||
<name>Freezer</name>
|
||||
<summary>A DRM-free Deezer client</summary>
|
||||
<developer_name>Pato05</developer_name>
|
||||
<url type="homepage">https://fem.mint.lgbt/pato05/freezer</url>
|
||||
<supports>
|
||||
<control>pointing</control>
|
||||
<control>keyboard</control>
|
||||
<control>touch</control>
|
||||
</supports>
|
||||
<description>
|
||||
<p>DRM-free Deezer music player.</p>
|
||||
</description>
|
||||
<launchable type="desktop-id">f.f.freezer.desktop</launchable>
|
||||
<releases>
|
||||
<release version="0.6.14" date="2022-02-25" />
|
||||
</releases>
|
||||
</component>
|
Loading…
Reference in New Issue