build: Install flutter via git in snapcraft
This commit is contained in:
parent
45b14ece2e
commit
cd12f773fe
1 changed files with 28 additions and 5 deletions
|
|
@ -61,18 +61,41 @@ parts:
|
||||||
build-packages:
|
build-packages:
|
||||||
- g++
|
- g++
|
||||||
|
|
||||||
|
flutter-git:
|
||||||
|
source: https://github.com/flutter/flutter.git
|
||||||
|
source-tag: 3.27.4
|
||||||
|
plugin: nil
|
||||||
|
override-build: |
|
||||||
|
set -eux
|
||||||
|
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 -sf $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter $CRAFT_PART_INSTALL/usr/bin/flutter
|
||||||
|
export PATH="$CRAFT_PART_INSTALL/usr/bin:$PATH"
|
||||||
|
flutter doctor
|
||||||
|
build-packages:
|
||||||
|
- clang
|
||||||
|
- cmake
|
||||||
|
- curl
|
||||||
|
- ninja-build
|
||||||
|
- unzip
|
||||||
|
override-prime: ''
|
||||||
|
|
||||||
fluffychat:
|
fluffychat:
|
||||||
plugin: flutter
|
after: [ flutter-git ]
|
||||||
|
plugin: nil
|
||||||
source: .
|
source: .
|
||||||
override-build: |
|
override-build: |
|
||||||
# Workaround for Flutter build error:
|
flutter pub get || true
|
||||||
rm -rf build
|
flutter build linux --release -v
|
||||||
craftctl default
|
mkdir -p $CRAFT_PART_INSTALL/bin
|
||||||
|
cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/
|
||||||
build-packages:
|
build-packages:
|
||||||
- libsecret-1-dev
|
- libsecret-1-dev
|
||||||
- libjsoncpp-dev
|
- libjsoncpp-dev
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- curl
|
- curl
|
||||||
|
- jq
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- libsecret-1-0
|
- libsecret-1-0
|
||||||
- libjsoncpp25
|
- libjsoncpp25
|
||||||
|
|
@ -85,7 +108,7 @@ slots:
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
fluffychat:
|
fluffychat:
|
||||||
command: fluffychat
|
command: bin/fluffychat
|
||||||
extensions: [ gnome ]
|
extensions: [ gnome ]
|
||||||
plugs:
|
plugs:
|
||||||
- audio-playback
|
- audio-playback
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue