Skip to content

Commit

Permalink
chore(snap): add snapcraft.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
hrzlgnm committed Oct 18, 2024
1 parent ee8d836 commit 44dc040
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: mdns-browser
base: core22
version: "0.8.14"
summary: mDNS-Browser app
description: |
A cross platform mDNS-Browser app written in Rust using tauri and leptos
grade: stable
confinement: strict

layout:
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1

apps:
mdns-browser:
command: usr/bin/mdns-browser
desktop: usr/share/applications/mdns-browser.desktop
extensions: [gnome]
plugs:
- network
- network-bind
- x11
- wayland

package-repositories:
- type: apt
components: [main]
suites: [noble]
key-id: 78E1918602959B9C59103100F1831DDAFC42E99D
url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu

parts:
build-app:
plugin: dump
build-snaps:
- rustup/latest/stable
build-packages:
- libwebkit2gtk-4.1-dev
- build-essential
- curl
- wget
- file
- libxdo-dev
- libssl-dev
- libayatana-appindicator3-dev
- librsvg2-dev
- dpkg
stage-packages:
- libwebkit2gtk-4.1-0
- libayatana-appindicator3-1
source: .
override-build: |
set -eu
cargo --locked install trunk --version ^0.21.1
cargo --locked install tauri-cli --version ^2.0.3
cargo --locked install cargo-auditable
cargo --locked auditable tauri build -- --bundles deb
dpkg -x src-tauri/target/release/bundle/deb/*.deb $SNAPCRAFT_PART_INSTALL/
sed -i -e "s|Icon=mdns-browser|Icon=/usr/share/icons/hicolor/32x32/apps/mdns-browser.png|g" $SNAPCRAFT_PART_INSTALL/usr/share/applications/mdns-browser.desktop

0 comments on commit 44dc040

Please sign in to comment.