diff --git a/flatpak/.gitignore b/flatpak/.gitignore new file mode 100644 index 00000000..96ec1433 --- /dev/null +++ b/flatpak/.gitignore @@ -0,0 +1,2 @@ +build-dir +.flatpak-builder diff --git a/flatpak/README.md b/flatpak/README.md new file mode 100644 index 00000000..fc6998d1 --- /dev/null +++ b/flatpak/README.md @@ -0,0 +1,13 @@ +# Flatpak packaging for Cyd + +## Build and install + +```sh +./flatpak/build-flatpak.sh +``` + +## Run + +```sh +flatpak run social.cyd.Cyd +``` diff --git a/flatpak/build-flatpak.sh b/flatpak/build-flatpak.sh new file mode 100755 index 00000000..63a0f4e1 --- /dev/null +++ b/flatpak/build-flatpak.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +cd "$(dirname "$0")/.." +npm install +CYD_ENV=prod npx electron-forge package +cd flatpak +flatpak-builder --user --install --force-clean build-dir social.cyd.Cyd.yml diff --git a/flatpak/cyd-wrapper.sh b/flatpak/cyd-wrapper.sh new file mode 100644 index 00000000..9e8b4162 --- /dev/null +++ b/flatpak/cyd-wrapper.sh @@ -0,0 +1,3 @@ +#!/bin/sh +export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID" +exec zypak-wrapper /app/cyd/cyd "$@" diff --git a/flatpak/social.cyd.Cyd.desktop b/flatpak/social.cyd.Cyd.desktop new file mode 100644 index 00000000..b326d5d0 --- /dev/null +++ b/flatpak/social.cyd.Cyd.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Cyd +Comment=Backup, delete, and migrate your data from tech platforms +Exec=cyd %U +Icon=social.cyd.Cyd +Terminal=false +Type=Application +Categories=Utility;Network; +StartupWMClass=cyd +MimeType=x-scheme-handler/social.cyd.api; diff --git a/flatpak/social.cyd.Cyd.metainfo.xml b/flatpak/social.cyd.Cyd.metainfo.xml new file mode 100644 index 00000000..7cdd72e2 --- /dev/null +++ b/flatpak/social.cyd.Cyd.metainfo.xml @@ -0,0 +1,19 @@ + + + social.cyd.Cyd + Cyd + Backup, delete, and migrate your data from tech platforms + CC0-1.0 + LicenseRef-proprietary=https://cyd.social/terms/ + +

Cyd lets you regain control of your data on tech platforms. Back up your data locally, delete tweets, likes, and DMs, and migrate your content to open platforms like Bluesky.

+

Cyd runs directly on your computer - your accounts and data stay private.

+
+ https://cyd.social + https://github.com/lockdown-systems/cyd/issues + + Lockdown Systems Collective + + social.cyd.Cyd.desktop + +
diff --git a/flatpak/social.cyd.Cyd.yml b/flatpak/social.cyd.Cyd.yml new file mode 100644 index 00000000..147227b0 --- /dev/null +++ b/flatpak/social.cyd.Cyd.yml @@ -0,0 +1,38 @@ +app-id: social.cyd.Cyd +runtime: org.freedesktop.Platform +runtime-version: '24.08' +sdk: org.freedesktop.Sdk +base: org.electronjs.Electron2.BaseApp +base-version: '24.08' +command: cyd +finish-args: + - --share=ipc + - --share=network + - --socket=x11 + - --socket=wayland + - --socket=pulseaudio + - --device=dri + - --filesystem=xdg-download + - --talk-name=org.freedesktop.Notifications + - --talk-name=org.kde.StatusNotifierWatcher + - --env=ELECTRON_OZONE_PLATFORM_HINT=auto +modules: + - name: cyd + buildsystem: simple + sources: + - type: dir + path: ../out/Cyd-linux-x64 + dest: cyd-archive + - type: file + path: social.cyd.Cyd.desktop + - type: file + path: social.cyd.Cyd.metainfo.xml + - type: file + path: cyd-wrapper.sh + build-commands: + - install -d /app/cyd + - cp -r cyd-archive/* /app/cyd/ + - install -Dm755 cyd-wrapper.sh /app/bin/cyd + - install -Dm644 social.cyd.Cyd.desktop /app/share/applications/social.cyd.Cyd.desktop + - install -Dm644 social.cyd.Cyd.metainfo.xml /app/share/metainfo/social.cyd.Cyd.metainfo.xml + - install -Dm644 cyd-archive/resources/icon.png /app/share/icons/hicolor/512x512/apps/social.cyd.Cyd.png