Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
chore: package example as a snap (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupi007 authored Jun 30, 2023
1 parent 95a812d commit 67d5e40
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.10)
project(runner LANGUAGES CXX)

set(BINARY_NAME "example")
set(APPLICATION_ID "com.example.example")
set(BINARY_NAME "yaru_icons_example")
set(APPLICATION_ID "com.ubuntu.yaru_icons_example")

cmake_policy(SET CMP0063 NEW)

Expand Down
1 change: 1 addition & 0 deletions snap/gui/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions snap/gui/yaru-icons-example.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Yaru Icons Example
Comment=Yaru Icons Example
Exec=bin/yaru_icons_example
Icon=${SNAP}/meta/gui/icon.svg
Terminal=false
56 changes: 56 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: yaru-icons-example
version: git
summary: Yaru Icons
description: Yaru Icons Example
confinement: strict
base: core22
grade: stable
icon: snap/gui/icon.svg
architectures:
- build-on: amd64
- build-on: arm64

parts:
flutter-git:
source: https://github.com/flutter/flutter.git
source-branch: stable
source-depth: 1
plugin: nil
override-build: |
mkdir -p $CRAFT_PART_INSTALL/usr/bin
mkdir -p $CRAFT_PART_INSTALL/usr/libexec
cp -r $CRAFT_PART_SRC $CRAFT_PART_INSTALL/usr/libexec/flutter
ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter $CRAFT_PART_INSTALL/usr/bin/flutter
ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/dart $CRAFT_PART_INSTALL/usr/bin/dart
build-packages:
- clang
- cmake
- curl
- ninja-build
- unzip
- xz-utils
- zip
override-prime: ""

yaru-icons-example:
after: [flutter-git]
plugin: nil
source: .
override-build: |
set -eux
cd example
flutter channel stable
flutter upgrade
flutter doctor
dart pub get
flutter build linux --release -v
mkdir -p $CRAFT_PART_INSTALL/bin/
cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/
apps:
yaru-icons-example:
command: bin/yaru_icons_example
desktop: snap/gui/yaru-icons-example.desktop
extensions: [gnome]
plugs:
- gsettings

0 comments on commit 67d5e40

Please sign in to comment.