Skip to content

Commit

Permalink
docs: add kde neon extensions reference
Browse files Browse the repository at this point in the history
  • Loading branch information
medubelko committed Jan 30, 2025
1 parent a30134d commit 9e648f0
Show file tree
Hide file tree
Showing 4 changed files with 567 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# Diff between snapcraft.yaml and `snapcraft expand-extensions`, showing the differences
# that the KDE Neon extension applies to a project file.
name: keysmith
base: core24
adopt-info: keysmith
confinement: strict
grade: stable

-build-packages:
- - libsodium-dev
- - libssl-dev
- - libproxy1v5

parts:
keysmith:
- parse-info:
- - usr/share/metainfo/org.kde.keysmith.appdata.xml
plugin: cmake
source: .
source-type: local
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DQT_MAJOR_VERSION=6
- -DBUILD_WITH_QT6=ON
- -DBUILD_TESTING=OFF
- -DCMAKE_INSTALL_SYSCONFDIR=/etc
- -DCMAKE_INSTALL_LOCALSTATEDIR=/var
- -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON
- -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF
- -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON
- -DCMAKE_INSTALL_RUNSTATEDIR=/run
- -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON
- -DCMAKE_VERBOSE_MAKEFILE=ON
- -DCMAKE_INSTALL_LIBDIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
- --log-level=STATUS
- -DCMAKE_LIBRARY_PATH=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
prime:
- -usr/lib/*/cmake/*
- -usr/include/*
- -usr/share/ECM/*
- -usr/share/man/*
- -usr/bin/X11
- -usr/lib/gcc/$CRAFT_ARCH_TRIPLET_BUILD_FOR/6.0.0
- -usr/lib/aspell/*
- -usr/share/lintian
+ build-environment:
+ - PATH: /snap/kde-qt6-core24-sdk/current/usr/bin:/snap/kf6-core24-sdk/current/usr/bin${PATH:+:$PATH}
+ - XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kde-qt6-core24-sdk/current/usr/share:/snap/kf6-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:/snap/kf6-core24-sdk/current/etc/xdg:/etc/xdg${XDG_CONFIG_HOME:+:$XDG_CONFIG_HOME}
+ - LD_LIBRARY_PATH: /snap/kde-qt6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:/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_ARCH_TRIPLET_BUILD_FOR}/blas:/snap/kf6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/lapack:/snap/kf6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/libproxy:/snap/kf6-core24-sdk/current/usr/lib:$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ - CMAKE_PREFIX_PATH: $CRAFT_STAGE;/snap/kde-qt6-core24-sdk/current;/snap/kf6-core24-sdk/current;/usr${CMAKE_PREFIX_PATH:+;$CMAKE_PREFIX_PATH}
+ - CMAKE_FIND_ROOT_PATH: $CRAFT_STAGE;/snap/kde-qt6-core24-sdk/current;/snap/kf6-core24-sdk/current;/usr${CMAKE_FIND_ROOT_PATH:+;$CMAKE_FIND_ROOT_PATH}
cleanup:
after:
- keysmith
plugin: nil
build-snaps:
- core24
- kf6-core24
- qt-common-themes
override-prime: |
# Remove duplicate files in the dependent snaps from the final snap.
for snap in "core24" "kf6-core24" "qt-common-themes"; do
cd "/snap/$snap/current" && find . -type f,l -print | sed 's|^./|/root/prime/|' | xargs rm -f
done
+ build-environment:
+ - PATH: /snap/kde-qt6-core24-sdk/current/usr/bin:/snap/kf6-core24-sdk/current/usr/bin${PATH:+:$PATH}
+ - XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kde-qt6-core24-sdk/current/usr/share:/snap/kf6-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:/snap/kf6-core24-sdk/current/etc/xdg:/etc/xdg${XDG_CONFIG_HOME:+:$XDG_CONFIG_HOME}
+ - LD_LIBRARY_PATH: /snap/kde-qt6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:/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_ARCH_TRIPLET_BUILD_FOR}/blas:/snap/kf6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/lapack:/snap/kf6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/libproxy:/snap/kf6-core24-sdk/current/usr/lib:$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ - CMAKE_PREFIX_PATH: $CRAFT_STAGE;/snap/kde-qt6-core24-sdk/current;/snap/kf6-core24-sdk/current;/usr${CMAKE_PREFIX_PATH:+;$CMAKE_PREFIX_PATH}
+ - CMAKE_FIND_ROOT_PATH: $CRAFT_STAGE;/snap/kde-qt6-core24-sdk/current;/snap/kf6-core24-sdk/current;/usr${CMAKE_FIND_ROOT_PATH:+;$CMAKE_FIND_ROOT_PATH}
+ snapcraft/core:
+ build-packages:
+ - libsodium-dev
+ - libssl-dev
+ - libproxy1v5
+ plugin: nil
+ build-environment:
+ - PATH: /snap/kde-qt6-core24-sdk/current/usr/bin:/snap/kf6-core24-sdk/current/usr/bin${PATH:+:$PATH}
+ - XDG_DATA_DIRS: $CRAFT_STAGE/usr/share:/snap/kde-qt6-core24-sdk/current/usr/share:/snap/kf6-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:/snap/kf6-core24-sdk/current/etc/xdg:/etc/xdg${XDG_CONFIG_HOME:+:$XDG_CONFIG_HOME}
+ - LD_LIBRARY_PATH: /snap/kde-qt6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:/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_ARCH_TRIPLET_BUILD_FOR}/blas:/snap/kf6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/lapack:/snap/kf6-core24-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/libproxy:/snap/kf6-core24-sdk/current/usr/lib:$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ - CMAKE_PREFIX_PATH: $CRAFT_STAGE;/snap/kde-qt6-core24-sdk/current;/snap/kf6-core24-sdk/current;/usr${CMAKE_PREFIX_PATH:+;$CMAKE_PREFIX_PATH}
+ - CMAKE_FIND_ROOT_PATH: $CRAFT_STAGE;/snap/kde-qt6-core24-sdk/current;/snap/kf6-core24-sdk/current;/usr${CMAKE_FIND_ROOT_PATH:+;$CMAKE_FIND_ROOT_PATH}
+ kde-neon-6/sdk:
+ source: /snap/snapcraft/current/share/snapcraft/extensions/desktop/command-chain-kde
+ plugin: make
+ build-snaps:
+ - kde-qt6-core24-sdk
+ - kf6-core24-sdk
+ build-packages:
+ - gettext
+ - doxygen
+ - graphviz
+ - libxml2-utils
+ - docbook-xml
+ - docbook-xsl
+ - libglx-dev
+ - libgl-dev
+ - libglvnd-dev
+ make-parameters:
+ - GPU_WRAPPER=gpu-2404-wrapper
+compression: lzo

+layout:
+ /usr/share/X11:
+ symlink: $SNAP/kf6/usr/share/X11
+ /usr/share/qt6:
+ symlink: $SNAP/kf6/usr/share/qt6
+ /usr/share/libdrm:
+ bind: $SNAP/gpu-2404/libdrm
+ /usr/share/drirc.d:
+ symlink: $SNAP/gpu-2404/drirc.d

+assumes:
+ - snapd2.58.3
+hooks:
+ configure:
+ command-chain:
+ - snap/command-chain/hooks-configure-desktop
+ plugs:
+ - desktop

apps:
keysmith:
command: usr/bin/keysmith
common-id: org.kde.keysmith.desktop
desktop: usr/share/applications/org.kde.keysmith.desktop
plugs:
+ - desktop
+ - desktop-legacy
+ - opengl
+ - wayland
+ - x11
+ - audio-playback
+ - unity7
+ - network
+ - network-bind
- home
+ command-chain:
+ - snap/command-chain/gpu-2404-wrapper
+ - snap/command-chain/desktop-launch

+plugs:
+ desktop:
+ mount-host-font-cache: false
+ gtk-2-themes:
+ interface: content
+ target: $SNAP/data-dir/themes
+ default-provider: gtk-common-themes
+ 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
+ kf6-core24:
+ content: kf6-core24-all
+ interface: content
+ target: $SNAP/kf6
+ default-provider: kf6-core24
+ gpu-2404:
+ interface: content
+ target: $SNAP/gpu-2404
+ default-provider: mesa-2404

slots:
session-dbus-interface:
interface: dbus
name: org.kde.keysmith
bus: session

+environment:
+ SNAP_DESKTOP_RUNTIME: $SNAP/kf6
+ GTK_USE_PORTAL: "1"
+ QT_VERSION: "6"
105 changes: 105 additions & 0 deletions docs/reference/code/extensions/kde-neon-extension-kcalc-expanded.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Diff between snapcraft.yaml and `snapcraft expand-extensions`, showing the differences
# that the KDE Neon extension applies to a project file.
name: kcalc
version: "19.08.0"
grade: stable
adopt-info: kcalc

confinement: strict
base: core18

apps:
kcalc:
command: kcalc
- extensions: [kde-neon]
common-id: org.kde.kcalc.desktop
plugs:
+ - desktop
+ - desktop-legacy
+ - opengl
+ - wayland
+ - x11
- kde-frameworks-5-plug
- home
- - opengl
- network
- network-bind
- pulseaudio

+ command-chain:
+ - snap/command-chain/desktop-launch
slots:
session-dbus-interface:
interface: dbus
name: org.kde.kcalc.desktop
bus: session

parts:
kcalc:
plugin: cmake
source: https://download.kde.org/stable/applications/19.08.0/src/kcalc-19.08.0.tar.xz
parse-info:
- usr/share/metainfo/org.kde.kcalc.appdata.xml
build-snaps:
- kde-frameworks-5-core18-sdk
- kde-frameworks-5-core18
build-packages:
- libmpfr-dev
- libgmp-dev
- kdoctools-dev
stage-packages:
- libmpfr6
- libgmp10
configflags:
- - "-DKDE_INSTALL_USE_QT_SYS_PATHS=ON"
- - "-DCMAKE_INSTALL_PREFIX=/usr"
- - "-DCMAKE_BUILD_TYPE=Release"
- - "-DENABLE_TESTING=OFF"
- - "-DBUILD_TESTING=OFF"
- - "-DKDE_SKIP_TEST_SETTINGS=ON"
+ - -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
+ - -DCMAKE_INSTALL_PREFIX=/usr
+ - -DCMAKE_BUILD_TYPE=Release
+ - -DENABLE_TESTING=OFF
+ - -DBUILD_TESTING=OFF
+ - -DKDE_SKIP_TEST_SETTINGS=ON
+ kde-neon-extension:
+ build-packages:
+ - g++
+ build-snaps:
+ - kde-frameworks-5-core18-sdk/latest/stable
+ make-parameters:
+ - PLATFORM_PLUG=kde-frameworks-5-core18
+ plugin: make
+ source: $SNAPCRAFT_EXTENSIONS_DIR/desktop
+ source-subdir: kde-neon
+assumes:
+ - snapd2.43
+compression: lzo
+plugs:
+ desktop:
+ mount-host-font-cache: false
+ icon-themes:
+ default-provider: gtk-common-themes
+ interface: content
+ target: $SNAP/data-dir/icons
+ kde-frameworks-5-core18:
+ content: kde-frameworks-5-core18-all
+ default-provider: kde-frameworks-5-core18
+ interface: content
+ target: $SNAP/kf5
+ sound-themes:
+ default-provider: gtk-common-themes
+ interface: content
+ target: $SNAP/data-dir/sounds
+environment:
+ SNAP_DESKTOP_RUNTIME: $SNAP/kf5
+hooks:
+ configure:
+ command-chain:
+ - snap/command-chain/hooks-configure-desktop
+ plugs:
+ - desktop
+layout:
+ /usr/share/X11:
+ symlink: $SNAP/kf5/usr/share/X11
1 change: 1 addition & 0 deletions docs/reference/extensions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ For guidance on specific extensions, see :ref:`use-extensions`.

env-injector-extension
gnome-extension
kde-neon-extensions
Loading

0 comments on commit 9e648f0

Please sign in to comment.