Skip to content

Commit

Permalink
Add native deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Jul 22, 2024
1 parent 14a6d2c commit 1bc4c3e
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "shared-modules"]
path = shared-modules
url = https://github.com/flathub/shared-modules
126 changes: 90 additions & 36 deletions distribution/dev.overlayed.Overlayed.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,104 @@
id: dev.overlayed.Overlayed

runtime: org.gnome.Platform
runtime-version: "45"
runtime-version: "46"
sdk: org.gnome.Sdk

rename-icon: overlayed
command: overlayed
finish-args:
# NOTE: not sure if this is for both IPC and Websockets transports
- --filesystem=xdg-run/app/com.discordapp.Discord:create # allows for discord rpc
- --device=all
- --socket=wayland
- --socket=fallback-x11
- --share=ipc
- --share=network
- --socket=x11
- --socket=wayland
- --filesystem=home
- --talk-name=org.freedesktop.Notifications

modules:
- name: overlayed
buildsystem: simple
build-commands:
- chmod +x Overlayed.AppImage
- ./Overlayed.AppImage --appimage-extract

- |
desktop-file-edit \
--set-name="Overlayed App" \
--set-comment="Overlayed's game launcher" \
--set-icon="$FLATPAK_ID" \
--set-key="StartupNotify" --set-value="true" \
--set-key="Categories" --set-value="Game;ActionGame;AdventureGame;Simulation;" \
--set-key="Keywords" --set-value="game;minecraft;mc;" \
--set-key="StartupWMClass" --set-value="Overlayed" \
squashfs-root/usr/share/applications/overlayed.desktop
- mkdir -p /app/{bin,share}
- cp -r squashfs-root/usr/share/icons /app/share/icons
- install -Dm755 squashfs-root/usr/bin/overlayed /app/bin/overlayed
- install -Dm644 squashfs-root/usr/share/applications/overlayed.desktop /app/share/applications/dev.overlayed.Overlayed.desktop
- install -Dm644 dev.overlayed.Overlayed.metainfo.xml /app/share/metainfo/dev.overlayed.OverlayedApp.metainfo.xml
- shared-modules/libappindicator/libappindicator-gtk3-12.10.json

- name: webkit2gtk-4.0
sources:
- type: file
path: dev.overlayed.Overlayed.metainfo.xml

- type: file
url: https://github.com/overlayeddev/overlayed/releases/download/v0.5.0/overlayed_0.5.0_amd64.AppImage
dest-filename: Overlayed.AppImage
sha256: bbcc773e89ba6cdbf4b3e91156b2702b2a82a91b5df7a8bbd2e274d5104a9725
only-arches: [x86_64]
- type: archive
url: https://webkitgtk.org/releases/webkitgtk-2.44.0.tar.xz
sha256: c66530e41ba59b1edba4ee89ef20b2188e273bed0497e95084729e3cfbe30c87
x-checker-data:
type: html
url: https://webkitgtk.org/releases/
version-pattern: LATEST-STABLE-(\d[\.\d]+\d)
url-template: https://webkitgtk.org/releases/webkitgtk-$version.tar.xz
buildsystem: cmake-ninja
config-opts:
- -DPORT=GTK
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DENABLE_DOCUMENTATION=OFF
- -DENABLE_MINIBROWSER=OFF
- -DENABLE_WEBDRIVER=OFF
- -DENABLE_GAMEPAD=OFF
- -DUSE_LIBBACKTRACE=OFF
- -DUSE_GTK4=OFF
- -DUSE_SOUP2=ON
- -DENABLE_BUBBLEWRAP_SANDBOX=OFF
modules:
- shared-modules/libsoup/libsoup-2.4.json

- name: unifdef
no-autogen: true
make-install-args:
- prefix=${FLATPAK_DEST}
sources:
- type: archive
url: https://dotat.at/prog/unifdef/unifdef-2.12.tar.xz
sha256: 43ce0f02ecdcdc723b2475575563ddb192e988c886d368260bc0a63aee3ac400
cleanup:
- "*"

- name: libjxl
buildsystem: cmake
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_TESTING=OFF
sources:
- type: git
url: https://github.com/libjxl/libjxl.git
tag: v0.10.2
commit: e1489592a770b989303b0edc5cc1dc447bbe0515
disable-shallow-clone: true
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$
- name: overlayed
buildsystem: simple
build-commands:
- chmod +x Overlayed.AppImage
- ./Overlayed.AppImage --appimage-extract

- |
desktop-file-edit \
--set-name="Overlayed App" \
--set-comment="Overlayed's game launcher" \
--set-icon="$FLATPAK_ID" \
--set-key="StartupNotify" --set-value="true" \
--set-key="Categories" --set-value="Game;ActionGame;AdventureGame;Simulation;" \
--set-key="Keywords" --set-value="game;minecraft;mc;" \
--set-key="StartupWMClass" --set-value="Overlayed" \
squashfs-root/usr/share/applications/overlayed.desktop
- mkdir -p /app/{bin,share}
- cp -r squashfs-root/usr/share/icons /app/share/icons
- install -Dm755 squashfs-root/usr/bin/overlayed /app/bin/overlayed
- install -Dm644 squashfs-root/usr/share/applications/overlayed.desktop /app/share/applications/dev.overlayed.Overlayed.desktop
- install -Dm644 dev.overlayed.Overlayed.metainfo.xml /app/share/metainfo/dev.overlayed.OverlayedApp.metainfo.xml

sources:
- type: file
url: https://raw.githubusercontent.com/overlayeddev/overlayed/14a6d2c8b022f7d44de4a57350e8f30ff35ef7dc/distribution/dev.overlayed.Overlayed.metainfo.xml
sha256: 35773ae27a47753852aac2ace795675cef222d5d9681e5cdd93d92b6d16831c5

# NOTE: we are skipping building from source as there is no direct pnpm support as of yet
# i saw this PR has some work to begin efforts on that https://github.com/flathub/flathub/pull/3876
- type: file
url: https://github.com/overlayeddev/overlayed/releases/download/v0.5.0/overlayed_0.5.0_amd64.AppImage
dest-filename: Overlayed.AppImage
sha256: bbcc773e89ba6cdbf4b3e91156b2702b2a82a91b5df7a8bbd2e274d5104a9725
only-arches: [x86_64]
1 change: 1 addition & 0 deletions shared-modules
Submodule shared-modules added at 29a1c0

0 comments on commit 1bc4c3e

Please sign in to comment.