Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

334.3. skanlite-26.08.2

Image scanning application — preview, select and save scans through SANE

Version 26.08.2, release 1
Shelf printing — Printing, printer drivers, labels, scanning and OCR
Phase 44_apps (Applications), 345 of 422 in build order
Licence GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
Homepage https://apps.kde.org/skanlite/
Build time 3.0 SBU
Installed size 1.4 MiB in 26 files
Recipe ports/core/printing/skanlite/kpkgbuild

About

Skanlite is KDE’s image-scanning program: it previews a page, lets an area be selected, and saves the scan as an image. It drives the scanner through libksane and ksanecore over SANE, so any scanner sane-backends or sane-airscan can reach, including a network scanner that speaks eSCL or WSD, is one it can use.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtwayland, kcoreaddons, ki18n, kio, kxmlgui, kcrash, kdoctools, libksane, ksanecore, sane-backends, librsvg.

Required by (1): kde-gear-graphics.

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 skanlite'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/printing/skanlite.

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/printing/skanlite
echo '57789835a9bc488e7e8b204e77a636cf5316659229427e357654c85c221df5c2  skanlite-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/skanlite
SRC=$SRC_ROOT/skanlite-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf skanlite-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:

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_KF6DocTools=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

for s in 48 64 128; do
	install -d "$PKG/usr/share/icons/hicolor/${s}x$s/apps"
	rsvg-convert -w $s -h $s -o "$PKG/usr/share/icons/hicolor/${s}x$s/apps/org.kde.skanlite.png" \
		sc-apps-org.kde.skanlite.svg
done

cat > "$PKG/usr/share/applications/org.kde.skanlite.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Skanlite
GenericName=Image Scanning Application
Comment=Scan and save images
Exec=skanlite
Icon=org.kde.skanlite
Terminal=false
StartupWMClass=org.kde.skanlite
X-DocPath=skanlite/index.html
Categories=Qt;KDE;Graphics;Scanning;
Keywords=scan;scanner;sane;image;photo;document;
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.kde.skanlite.desktop"

The switches, and why each is set:

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/skanlite, 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 skanlite-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/skanlite, and runs the triggers its paths call for.

Contents

Installed programs: skanlite.

Installed directories: /usr/share/doc/HTML/en/skanlite, /usr/share/licenses/skanlite.

Notes

Upstream installs its icon as SVG only, which the panel’s icon lookup does not read. build.sh rasterises sc-apps-org.kde.skanlite.svg to PNG at 48, 64 and 128 pixels.

build.sh replaces upstream’s desktop entry. KAboutData sets the desktop file name, so the Wayland app id is org.kde.skanlite, not upstream’s skanlite, and the new entry names it in StartupWMClass.