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

301.8. pim-sieve-editor-26.08.2

Editor for Sieve mail-filter scripts on ManageSieve servers

Version 26.08.2, release 1
Shelf mail — Email clients, fetch and send tools, mail libraries, and feed readers
Phase 44_apps (Applications), 282 of 422 in build order
Licence GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND CC0-1.0 AND MIT
Homepage https://apps.kde.org/sieveeditor/
Build time 1.1 SBU
Installed size 1.0 MiB in 25 files
Recipe ports/core/mail/pim-sieve-editor/kpkgbuild

About

Sieve Editor writes and manages Sieve scripts, the mail filters that run on an IMAP server rather than in the client. It connects to servers over ManageSieve, lists, activates, imports and exports their scripts, and edits them as text with completion and syntax checking or through a graphical rule editor, all from libksieve’s KSieveUi. kmail embeds the same editor for its own IMAP accounts; this program is the standalone one, with its own list of servers whose passwords it keeps through qtkeychain.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, kbookmarks, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, kiconthemes, kio, kwindowsystem, kxmlgui, ktextaddons, qtkeychain, kimap, kmailtransport, libksieve, pimcommon.

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

Patches

build.sh applies these; kpkg applies nothing by itself.

autogen-include.patch is what lets the editor build with that option off. Every use of the text-generation manager is under HAVE_TEXT_AUTOGENERATE_TEXT, but sieveeditormainwidget.cpp includes its header unconditionally, and the header’s directory reaches the compile only through the KF6::TextAutoGenerateText target, which is linked only when the option finds the library. The patch puts the include under the same condition; a release whose include is already guarded needs no patch.

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 pim-sieve-editor'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/mail/pim-sieve-editor.

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/mail/pim-sieve-editor
echo 'f7f24d4c0496ee4565abc6821a3b353f7d6b7d5994f247820427243ecafd551c  pim-sieve-editor-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/pim-sieve-editor
SRC=$SRC_ROOT/pim-sieve-editor-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf pim-sieve-editor-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/autogen-include.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_KF6DocTools=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_KF6UserFeedback=ON \
	-D OPTION_ADD_AUTOGENERATETEXT=OFF \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

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

Contents

Installed programs: sieveeditor.

Installed libraries: libsieveeditor.so.

Installed directories: /usr/share/doc/HTML/en/sieveeditor, /usr/share/licenses/pim-sieve-editor.

Notes

libksieve is built with the same option off, and it has to be. Its installed header config-libksieveui.h defines HAVE_TEXT_AUTOGENERATE_TEXT too, with no include guard, so a libksieve built with the option on sets the macro to 1 inside the editor’s sources wherever its headers are included after the editor’s own configuration header, and the build then reaches the text-generation headers it has no path to and stops.

USE_DBUS defaults to on for Linux, and the build then keeps a second start of the editor in the first through D-Bus with kdbusaddons; off, it would need KDSingleApplication instead. The default stands, so the recipe does not name it. qtkeychain and ktextaddons’ TextAddonsWidgets are marked TYPE REQUIRED, and the feature summary stops the configure without them.

The program sets org.kde.sieveeditor as its desktop file name, the name of the entry upstream installs, which carries no StartupWMClass, so the task manager matches the window to it with no change.

KF_SKIP_PO_PROCESSING stops only ki18n_install(): kdoctools_install() still builds the handbook in every translated language, and kpkg’s language rule removes /usr/share/doc/HTML/<lang>/ from the package.