322.9. plasma-camera-26.08.2
Camera app — photos and video from libcamera devices such as laptop webcams
| Version | 26.08.2, release 1 |
| Shelf | video-tools — Video editing, transcoding, muxing, recording, streaming and webcam apps |
| Phase | 44_apps (Applications), 417 of 422 in build order |
| Licence | GPL-2.0-or-later AND GPL-3.0-or-later AND (LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only) AND LGPL-2.1-or-later AND BSD-3-Clause AND CC0-1.0 |
| Homepage | https://apps.kde.org/plasma.camera/ |
| Build time | 0.6 SBU |
| Installed size | 664.7 KiB in 12 files |
| Recipe | ports/core/video-tools/plasma-camera/kpkgbuild |
About
Plasma Camera is the Plasma Mobile camera: it takes photos and records video from any camera libcamera drives, laptop UVC webcams included, and tags photos with EXIF data through exiv2. The interface is Kirigami, made for a phone held either way up, and it follows the device’s orientation through qt6-qtsensors.
Sources
plasma-camera-26.08.2.tar.xz(109.3 KiB)
sha256773eebdb3a09bb9a5750e2c5f8dbdd5e88298a3edf458f4ae2ac413899e46549
upstream: https://download.kde.org/stable/release-service/26.08.2/src/plasma-camera-26.08.2.tar.xz
archive copy: sources-4/video-tools--plasma-camera-26.08.2.tar.xz
Dependencies
Depends on: cmake, ninja, extra-cmake-modules, pkgconf, qt6-qtbase, qt6-qtdeclarative, qt6-qtsvg, qt6-qtsensors, qt6-qtmultimedia, kirigami, kirigami-addons, kcoreaddons, ki18n, kconfig, exiv2, libcamera.
Required by (1): kde-gear-multimedia.
Patches
build.sh applies these; kpkg applies nothing by itself.
app-id.patch is KDOS’s own and adds StartupWMClass=org.kde.plasma-camera to upstream’s desktop entry. KAboutData builds the window’s Wayland app_id from the organisation domain and the component name, org.kde.plasma-camera, while the entry is org.kde.plasma.camera.desktop, so without the line the task manager cannot match the window to its entry. The fix that belongs upstream is the program naming its desktop file, which would make the line unnecessary.
app-id.patch— name the window app_id org.kde.plasma-camera in the desktop entryKAboutData derives the Wayland app_id from the component name, plasma-camera, while the entry is org.kde.plasma.camera.desktop, so the task manager can only match the window to its entry through StartupWMClass.
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 plasma-camera'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/video-tools/plasma-camera.
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/video-tools/plasma-camera
echo '773eebdb3a09bb9a5750e2c5f8dbdd5e88298a3edf458f4ae2ac413899e46549 plasma-camera-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/plasma-camera
SRC=$SRC_ROOT/plasma-camera-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf plasma-camera-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/app-id.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 \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
The switches, and why each is set:
-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/plasma-camera, 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 plasma-camera-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/plasma-camera, and runs the triggers its paths call for.
Contents
Installed programs: plasma-camera.
Installed directories: /usr/share/licenses/plasma-camera.
Notes
The program opens the camera through libcamera, which reads /dev/media* and /dev/video* itself; it goes through neither PipeWire nor the camera portal. The user therefore needs read and write access to those device nodes, which udev gives the video group; the default account, kdos, is a member (fs/etc/group).
main.cpp sets QT_MEDIA_BACKEND=ffmpeg before Qt Multimedia starts, so video is encoded by the FFmpeg backend qt6-qtmultimedia builds, in software. libcamera is found through pkg_check_modules(... REQUIRED), which needs pkgconf.
The entry’s icon is camera-photo, a Breeze icon; upstream installs no icon of its own.