name: whatsie version: '2.0' summary: Qt Based WhatsApp Client description: | Fast Light weight WhatsApp Client based on Qt's WebEngine, With lots of settings and packed goodies. grade: stable confinement: strict icon: snap/gui/icon.png 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: bin/desktop-launch $SNAP/usr/bin/whatsie environment: XDG_CURRENT_DESKTOP: $XDG_CURRENT_DESKTOP:Unity:Unity7 desktop: usr/share/applications/whatsie.desktop plugs: - browser-support - camera - desktop - desktop-legacy - gsettings - home - opengl - audio-playback - audio-record - removable-media - screen-inhibit-control - unity7 - x11 - network - wayland - hardware-observe #might help geoclue & qtpositioning - network-observe #might help geoclue & qtpositioning - network-bind #might help geoclue & qtpositioning plugs: gsettings: gtk-3-themes: interface: content target: $SNAP/data-dir/themes default-provider: gtk-common-themes icon-themes: interface: content target: $SNAP/data-dir/icons default-provider: gtk-common-themes sound-themes: interface: content target: $SNAP/data-dir/sounds default-provider: gtk-common-themes qt515-core20: interface: content 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 cp -r ${SNAPCRAFT_PART_BUILD}/qtwebengine_dictionaries ${SNAPCRAFT_PART_INSTALL}/usr/bin/ strip ${SNAPCRAFT_PART_INSTALL}/usr/bin/whatsie snap-launcher: plugin: dump source: snap_launcher/ after: [build-src] override-build: | snapcraftctl build sed -i 's|Icon=.*|Icon=${SNAP}/meta/gui/icon.png|g' ${SNAPCRAFT_PART_SRC}/whatsie.desktop mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/ cp -rf ${SNAPCRAFT_PART_SRC}/whatsie.desktop ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/whatsie.desktop