snapcraft: Fix libsecret support! BUndle gnomekeychain. Set XDG variables so it finds keychain. Update qtkeychain.

This commit is contained in:
Scarlett Moore
2023-11-01 09:21:50 -07:00
parent 1c9487df7e
commit a4020a7def

View File

@@ -46,15 +46,17 @@ plugs:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes
kf5-5-110-qt-5-15-11-core22:
content: kf5-5-110-qt-5-15-11-core22-all
kf5-5-111-qt-5-15-11-core22:
content: kf5-5-111-qt-5-15-11-core22-all
interface: content
default-provider: kf5-5-110-qt-5-15-11-core22
default-provider: kf5-5-111-qt-5-15-11-core22
target: $SNAP/kf5
environment:
SNAP_DESKTOP_RUNTIME: $SNAP/kf5
QML2_IMPORT_PATH: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qml:$SNAP/kf5/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qml:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/qml"
QT_QUICK_CONTROLS_STYLE: org.kde.desktop
XDG_DATA_DIRS: "$SNAP/.local"
XDG_CONFIG_DIRS: "$SNAP/etc/xdg"
hooks:
configure:
plugs:
@@ -69,6 +71,18 @@ slots:
interface: dbus
name: org.kde.neochat
bus: session
notifications:
interface: dbus
name: org.freedesktop.Notifications
bus: session
kwallet:
interface: dbus
name: org.kde.kwalletd5
bus: session
statusnotifierwatcher:
interface: dbus
name: org.kde.StatusNotifierWatcher
bus: session
package-repositories:
- type: apt
components:
@@ -84,45 +98,52 @@ parts:
source-type: local
plugin: make
make-parameters:
- PLATFORM_PLUG=kf5-5-110-qt-5-15-11-core22
- PLATFORM_PLUG=kf5-5-111-qt-5-15-11-core22
build-snaps:
- kf5-5-110-qt-5-15-11-core22-sdk
- kf5-5-111-qt-5-15-11-core22-sdk
build-environment:
- &id001
PATH: /snap/kf5-5-110-qt-5-15-11-core22-sdk/current/usr/bin${PATH:+:$PATH}
PATH: /snap/kf5-5-111-qt-5-15-11-core22-sdk/current/usr/bin${PATH:+:$PATH}
- &id002
XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kf5-5-110-qt-5-15-11-core22-sdk/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}
XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kf5-5-111-qt-5-15-11-core22-sdk/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}
- &id003
XDG_CONFIG_HOME: $CRAFT_STAGE/etc/xdg:/snap/kf5-5-110-qt-5-15-11-core22-sdk/current/etc/xdg:/etc/xdg${XDG_CONFIG_HOME:+:$XDG_CONFIG_HOME}
XDG_CONFIG_HOME: $CRAFT_STAGE/etc/xdg:/snap/kf5-5-111-qt-5-15-11-core22-sdk/current/etc/xdg:/etc/xdg${XDG_CONFIG_HOME:+:$XDG_CONFIG_HOME}
- &id004
CRAFT_CMAKE_ARGS: -DCMAKE_FIND_ROOT_PATH=/snap/kf5-5-110-qt-5-15-11-core22-sdk/current${CRAFT_CMAKE_ARGS:+:$CRAFT_CMAKE_ARGS}
CRAFT_CMAKE_ARGS: -DCMAKE_FIND_ROOT_PATH=/snap/kf5-5-111-qt-5-15-11-core22-sdk/current${CRAFT_CMAKE_ARGS:+:$CRAFT_CMAKE_ARGS}
qtkeychain:
after:
- kde-neon
source: https://github.com/frankosterfeld/qtkeychain.git
source-tag: v0.13.2
source-tag: v0.14.0
source-depth: 0
plugin: cmake
build-packages:
- libsecret-1-dev
stage-packages:
- libsecret-1-0
- gnome-keyring
cmake-parameters:
- "-DKDE_INSTALL_USE_QT_SYS_PATHS=FALSE"
- "-DCMAKE_INSTALL_PREFIX=/usr"
- "-DCMAKE_BUILD_TYPE=Release"
- "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
- "-DENABLE_TESTING=OFF"
- "-DBUILD_TESTING=OFF"
- "-DKDE_SKIP_TEST_SETTINGS=ON"
- "-DCMAKE_FIND_ROOT_PATH=$SNAPCRAFT_STAGE\\;/snap/kf5-5-110-qt-5-15-11-core22/current"
- "-DBUILD_TRANSLATIONS=NO"
- -DKEYCHAIN_DBUS=0
- "-DCMAKE_FIND_ROOT_PATH=$CRAFT_STAGE\\;/snap/kf5-5-111-qt-5-15-11-core22/current"
- "-DBUILD_TRANSLATIONS=OFF"
- "-DLIBSECRET_SUPPORT=ON"
- "-DKEYCHAIN_DBUS=1"
prime:
- "-usr/include/qt5keychain"
- "-usr/lib/$CRAFT_ARCH_TRIPLET/libqt5keychain.so"
- "-usr/mkspecs"
- "-usr/lib/$CRAFT_ARCH_TRIPLET/cmake"
libmatrixclient:
after:
- kde-neon
- qtkeychain
source: https://github.com/quotient-im/libQuotient.git
source-tag: 0.7.2
source-tag: 0.8.1.2
source-depth: 0
plugin: cmake
build-packages:
@@ -131,12 +152,13 @@ parts:
- libssl-dev
cmake-parameters:
- "-DCMAKE_INSTALL_PREFIX=/usr"
- "-DCMAKE_BUILD_TYPE=Release"
- "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
- "-DENABLE_TESTING=OFF"
- "-DBUILD_TESTING=OFF"
- "-DKDE_SKIP_TEST_SETTINGS=ON"
- -DQuotient_ENABLE_E2EE=true
- "-DCMAKE_FIND_ROOT_PATH=$SNAPCRAFT_STAGE\\;/snap/kf5-5-110-qt-5-15-11-core22/current"
- "-DQuotient_ENABLE_E2EE=ON"
- "-DBUILDING_SHARED_QUOTIENT=ON"
- "-DCMAKE_FIND_ROOT_PATH=$CRAFT_STAGE\\;/snap/kf5-5-111-qt-5-15-11-core22/current"
neochat:
after:
- kde-neon
@@ -144,13 +166,13 @@ parts:
- libmatrixclient
parse-info:
- usr/share/metainfo/org.kde.neochat.appdata.xml
source: http://download.kde.org/stable/release-service/23.08.1/src/neochat-23.08.1.tar.xz
source: .
source-type: local
plugin: cmake
build-packages:
- cmark
- gcc-10
- g++-10
- kirigami2-dev
- libcmark-dev
- kquickimageeditor-dev
- libkf5qqc2desktopstyle-dev
@@ -173,7 +195,6 @@ parts:
- kirigami-addons-data
- qml-module-org-kde-kirigamiaddons
- qml-module-org-kde-quickcharts
- libkf5kirigami2-5
- qml-module-org-kde-kirigami2
- reuse
- libsqlite3-0
@@ -186,7 +207,7 @@ parts:
- "-DBUILD_TESTING=OFF"
- "-DKDE_SKIP_TEST_SETTINGS=ON"
- "-DNEOCHAT_FLATPAK=ON"
- "-DCMAKE_FIND_ROOT_PATH=$CRAFT_STAGE\\;/snap/kf5-5-110-qt-5-15-11-core22-sdk/current"
- "-DCMAKE_FIND_ROOT_PATH=$CRAFT_STAGE\\;/snap/kf5-5-111-qt-5-15-11-core22-sdk/current"
- "-DKDE_INSTALL_PLUGINDIR=/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/plugins/"
prime:
- "-usr/lib/*/cmake/*"