aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Keshav Bhatt <keshavnrj@gmail.com>2022-02-19 19:14:43 +0530
committerLibravatar Keshav Bhatt <keshavnrj@gmail.com>2022-02-19 19:14:43 +0530
commit1dfb6bb3c7c7db8facbf7a9ce5ffda27b0cef744 (patch)
tree3cf3a94a7325e28722e786dd393cc91d81a4f340
parentc00ba3371fa0f04f56c3ad643c242ae3131a21ce (diff)
downloadwhatsie-1dfb6bb3c7c7db8facbf7a9ce5ffda27b0cef744.tar.gz
whatsie-1dfb6bb3c7c7db8facbf7a9ce5ffda27b0cef744.zip
use core20 and qt515-core20 content snap
-rw-r--r--snap/snapcraft.yaml62
1 files changed, 49 insertions, 13 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 63b2495..6ea2b01 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -6,19 +6,28 @@ description: |
grade: stable
confinement: strict
icon: snap/gui/icon.png
-base: core18
-
+base: core20
compression: lzo
architectures:
- build-on: amd64
run-on: amd64
+environment:
+ SNAP_DESKTOP_RUNTIME: $SNAP/qt515-core20
+
+package-repositories:
+ - type: apt
+ formats: [deb]
+ components: [main]
+ suites: [focal]
+ key-id: C65D51784EDC19A871DBDBB710C56D0DE9977759
+ url: https://ppa.launchpadcontent.net/beineri/opt-qt-5.15.2-focal/ubuntu
+
apps:
whatsie:
- command: desktop-launch whatsie
+ command: bin/desktop-launch $SNAP/usr/bin/whatsie
environment:
- DISABLE_WAYLAND: 1
XDG_CURRENT_DESKTOP: $XDG_CURRENT_DESKTOP:Unity:Unity7
desktop: usr/share/applications/whatsie.desktop
plugs:
@@ -40,12 +49,6 @@ apps:
- hardware-observe #might help geoclue & qtpositioning
- network-observe #might help geoclue & qtpositioning
- network-bind #might help geoclue & qtpositioning
- #- upower-observe
- #- avahi-observe
- #- u2f-devices
- #- hostname-control
- #- mount-observe
- #- network-control
plugs:
gsettings:
@@ -61,12 +64,45 @@ plugs:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes
- qt513:
+ qt515-core20:
interface: content
- target: $SNAP/qt513
- default-provider: qt513
+ target: $SNAP/qt515-core20
+ default-provider: qt515-core20
parts:
+ build-src:
+ plugin: nil
+ source: https://github.com/keshavbhatt/whatsie.git
+ source-subdir: src/
+ override-build: |
+ snapcraftctl build
+
+ apt install -y build-essential qt515base qt515tools qt515webengine qt515location qt515xmlpatterns libgl1-mesa-dev
+
+ QT_BASE_DIR=/opt/qt515
+ export QTDIR=$QT_BASE_DIR
+ export PATH=$QT_BASE_DIR/bin:$PATH
+
+ if [[ $(uname -m) == "x86_64" ]]; then
+ export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ else
+ export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/i386-linux-gnu:$QT_BASE_DIR/lib:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ fi
+
+ export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
+
+ which qmake
+
+ mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/bin/
+
+ /opt/qt515/bin/qmake src
+
+ make -j4
+
+ /opt/qt515/bin/qmake -install qinstall -exe whatsie ${SNAPCRAFT_PART_INSTALL}/usr/bin/whatsie
+
+ strip ${SNAPCRAFT_PART_INSTALL}/usr/bin/whatsie
+
snap-launcher:
plugin: dump
source: snap_launcher/