330.21. kalm-26.08.2
Breathing exercises — guided techniques with an animated pace to follow
| Version | 26.08.2, release 1 |
| Shelf | education — Learning software, offline encyclopedias and reference dictionaries |
| Phase | 44_apps (Applications), 106 of 422 in build order |
| Licence | LGPL-2.1-or-later |
| Homepage | https://apps.kde.org/kalm/ |
| Build time | 0.5 SBU |
| Installed size | 562.3 KiB in 8 files |
| Recipe | ports/core/education/kalm/kpkgbuild |
About
Kalm guides breathing exercises: box breathing, 4-7-8, resonant, coordinated, yogic and alternate-nostril breathing, each with an animated shape to follow at the technique’s pace. It is a small Kirigami application from KDE’s convergent set, on the education shelf as a teaching tool.
Sources
kalm-26.08.2.tar.xz(104.5 KiB)
sha256aeca52aa8e5c094df222dd29ac2b76711317b5f4a724a7255f7b1f51a3c5799d
upstream: https://download.kde.org/stable/release-service/26.08.2/src/kalm-26.08.2.tar.xz
archive copy: sources-2/education--kalm-26.08.2.tar.xz
Dependencies
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtdeclarative, kcoreaddons, kconfig, ki18n, kirigami, kcrash, kirigami-addons, qqc2-desktop-style.
Required by (1): kde-gear-utilities.
Patches
build.sh applies these; kpkg applies nothing by itself.
desktop-mime.patch drops MimeType=application/x-kalm; from the desktop entry. Nothing defines that type in the shared MIME database, so the claim matches no file (see Desktop entries belong to the port).
desktop-mime.patch— drop the undefined application/x-kalm type from the desktop entryNo shared MIME database file defines the type, so the claim matches no file.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install kalm'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/education/kalm.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/education/kalm
echo 'aeca52aa8e5c094df222dd29ac2b76711317b5f4a724a7255f7b1f51a3c5799d kalm-26.08.2.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/kalm
SRC=$SRC_ROOT/kalm-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf kalm-26.08.2.tar.xz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/desktop-mime.patch"
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KF_SKIP_PO_PROCESSING=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_KF6Crash=ON \
-Wno-dev
cmake --build build --target clang-format qml-format
cmake --build build
DESTDIR=$PKG cmake --install build
The switches, and why each is set:
-D CMAKE_REQUIRE_FIND_PACKAGE_KF6Crash=ON— Make kcrash a requirement. Upstream asks for it as an optional component and builds without crash handling when it is missing.-D KF_SKIP_PO_PROCESSING=ON— Skips building the interface translations, which the package-wide English-only rule would remove anyway (see Size and language policy).
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/kalm, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf kalm-26.08.2-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/kalm, and runs the triggers its paths call for.
Contents
Installed programs: kalm.
Installed directories: /usr/share/licenses/kalm.
Notes
Upstream’s top-level CMakeLists.txt adds two targets to all, clang-format-always and qml-format-always, which run clang-format -i and qmlformat -i over the unpacked sources while the rest of the build compiles them. Both tools are in the build root. build.sh builds the two formatting targets, clang-format and qml-format, before the full build, so every file is formatted once before anything compiles it; in the full build the -always targets find nothing left to change. Built in parallel, a QML file could be compiled into the program either before or after its reformat, and two builds of the same tree would differ.
kirigami-addons and qqc2-desktop-style are both REQUIRED by the configure, though upstream marks the style TYPE RUNTIME: the program links nothing of it and selects the org.kde.desktop Qt Quick style at start-up. kirigami is looked for only on Android; on Linux the interface imports its org.kde.kirigami QML module at run time, which is why it is in depends.