173 lines
5.2 KiB
YAML
173 lines
5.2 KiB
YAML
# SPDX-FileCopyrightText: 2024-2025 Scarlett Moore <sgmoore@kde.org>
|
|
#
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
---
|
|
name: neochat
|
|
base: core24
|
|
adopt-info: neochat
|
|
grade: stable
|
|
confinement: strict
|
|
apps:
|
|
neochat:
|
|
extensions:
|
|
- kde-neon-6
|
|
command: usr/bin/neochat
|
|
common-id: org.kde.neochat
|
|
desktop: usr/share/applications/org.kde.neochat.desktop
|
|
plugs:
|
|
- home
|
|
- removable-media
|
|
- audio-playback
|
|
- unity7
|
|
- network
|
|
- network-bind
|
|
- network-manager-observe
|
|
- password-manager-service
|
|
- accounts-service
|
|
environment:
|
|
QT_PLUGIN_PATH: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/plugins:/snap/kf6-core24/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/plugins"
|
|
QML_IMPORT_PATH: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qml:/snap/kf6-core24/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qml"
|
|
|
|
compression: lzo
|
|
|
|
package-repositories:
|
|
- type: apt
|
|
ppa: ubuntu-toolchain-r/test
|
|
|
|
slots:
|
|
session-dbus-interface:
|
|
interface: dbus
|
|
name: org.kde.neochat
|
|
bus: session
|
|
|
|
parts:
|
|
olm:
|
|
source: https://gitlab.matrix.org/matrix-org/olm.git
|
|
source-depth: 1
|
|
source-tag: '3.2.16'
|
|
plugin: cmake
|
|
cmake-parameters:
|
|
- -DCMAKE_BUILD_TYPE=Release
|
|
- -DCMAKE_INSTALL_PREFIX=/usr
|
|
- -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
|
prime:
|
|
- -usr/include
|
|
- -usr/lib/*/pkgconfig
|
|
- -usr/lib/*/cmake
|
|
|
|
libquotient:
|
|
after:
|
|
- olm
|
|
source: https://github.com/quotient-im/libQuotient.git
|
|
source-branch: 0.9.5
|
|
source-depth: 1
|
|
plugin: cmake
|
|
build-environment:
|
|
- PATH: /snap/bin:${PATH}
|
|
build-snaps:
|
|
- cmake
|
|
build-packages:
|
|
- libssl-dev
|
|
- curl
|
|
cmake-parameters:
|
|
- -DCMAKE_INSTALL_PREFIX=/usr
|
|
- -DCMAKE_BUILD_TYPE=Release
|
|
- -DBUILD_TESTING=OFF
|
|
- -DQuotient_ENABLE_E2EE=ON
|
|
- -DBUILD_WITH_QT6=ON
|
|
override-pull: |
|
|
craftctl default
|
|
curl https://github.com/quotient-im/libQuotient/commit/ea83157eed37ff97ab275a5d14c971f0a5a70595.diff | patch -p1
|
|
prime:
|
|
- -usr/include
|
|
- -usr/lib/*/pkgconfig
|
|
- -usr/lib/*/cmake
|
|
|
|
kquickimageeditor:
|
|
source: https://invent.kde.org/libraries/kquickimageeditor.git
|
|
source-tag: 'v0.6.0'
|
|
source-depth: 1
|
|
plugin: cmake
|
|
build-environment: &build-environment
|
|
- LD_LIBRARY_PATH: "/snap/kde-qt6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:/snap/kde-qt6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libproxy:/snap/kde-qt6-core24-sdk/current/usr/lib:/snap/kf6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:/snap/kf6-core24-sdk/current/usr/lib:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/lib/:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
|
- PATH: /snap/kde-qt6-core24-sdk/current/usr/bin${PATH:+:$PATH}
|
|
- PKG_CONFIG_PATH: /snap/kde-qt6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
|
|
- PYTHONPATH: ${CRAFT_STAGE}/lib/python3.12/site-packages:${CRAFT_STAGE}/usr/lib/python3/dist-packages
|
|
- XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kde-qt6-core24-sdk/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}
|
|
- XDG_CONFIG_HOME: $CRAFT_STAGE/etc/xdg:/snap/kde-qt6-core24-sdk/current/etc/xdg:/etc/xdg${XDG_CONFIG_HOME:+:$XDG_CONFIG_HOME}
|
|
cmake-parameters: &cmake-parameters
|
|
- -DCMAKE_INSTALL_PREFIX=/usr
|
|
- -DCMAKE_BUILD_TYPE=Release
|
|
- -DQT_MAJOR_VERSION=6
|
|
- -DBUILD_WITH_QT6=ON
|
|
- -DBUILD_TESTING=OFF
|
|
- "-DCMAKE_FIND_ROOT_PATH=$CRAFT_STAGE\\;/snap/kde-qt6-core24-sdk/current\\;/snap/kf6-core24-sdk/current/usr"
|
|
- "-DCMAKE_PREFIX_PATH=$CRAFT_STAGE\\;/snap/kde-qt6-core24-sdk/current\\;/snap/kf6-core24-sdk/current/usr"
|
|
prime: &prime
|
|
- -usr/include
|
|
- -usr/lib/*/pkgconfig
|
|
- -usr/lib/*/cmake
|
|
|
|
kunifiedpush:
|
|
source: https://invent.kde.org/libraries/kunifiedpush.git
|
|
source-branch: release/24.12
|
|
plugin: cmake
|
|
build-environment: *build-environment
|
|
cmake-parameters: *cmake-parameters
|
|
prime: *prime
|
|
|
|
neochat:
|
|
after:
|
|
- libquotient
|
|
- kquickimageeditor
|
|
- kunifiedpush
|
|
parse-info:
|
|
- usr/share/metainfo/org.kde.neochat.appdata.xml
|
|
source: .
|
|
plugin: cmake
|
|
build-environment: *build-environment
|
|
build-packages:
|
|
- cmark
|
|
- duktape-dev
|
|
- libcmark-dev
|
|
- libsqlite3-dev
|
|
- libvulkan-dev
|
|
- libxkbcommon-dev
|
|
- libicu-dev
|
|
- libpulse0
|
|
cmake-parameters: *cmake-parameters
|
|
prime: *prime
|
|
|
|
deps:
|
|
after: [neochat]
|
|
plugin: nil
|
|
stage-packages:
|
|
- libcmark0.30.2
|
|
prime:
|
|
- usr/lib/*/libcmark.so*
|
|
|
|
gpu-2404:
|
|
after: [neochat]
|
|
source: https://github.com/canonical/gpu-snap.git
|
|
plugin: dump
|
|
override-prime: |
|
|
craftctl default
|
|
${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404
|
|
prime:
|
|
- bin/gpu-2404-wrapper
|
|
|
|
cleanup:
|
|
after:
|
|
- neochat
|
|
plugin: nil
|
|
build-snaps:
|
|
- core24
|
|
- kde-qt6-core24-sdk/latest/edge
|
|
- kf6-core24-sdk/latest/edge
|
|
override-prime: |
|
|
set -eux
|
|
for snap in "core24" "kf6-core24"; do
|
|
cd "/snap/$snap/current" && find . -type f,l -exec rm -rf "${CRAFT_PRIME}/{}" \;
|
|
done
|
|
|