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

330.6. kwordquiz-26.08.2

KDE flashcard trainer — flashcards, multiple choice and question-and-answer quizzes on KVTML decks

Version 26.08.2, release 1
Shelf education — Learning software, offline encyclopedias and reference dictionaries
Phase 44_apps (Applications), 91 of 422 in build order
Licence GPL-2.0-or-later AND LGPL-2.0-or-later AND GPL-3.0-or-later
Homepage https://apps.kde.org/kwordquiz/
Build time 0.8 SBU
Installed size 2.1 MiB in 189 files
Recipe ports/core/education/kwordquiz/kpkgbuild

About

KWordQuiz is KDE’s flashcard trainer: it drills a vocabulary deck as flashcards, multiple choice or typed question-and-answer, and edits the decks. Decks are KVTML files, read and written through libkeduvocdocument. The interface is Kirigami.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtsvg, qt6-qtdeclarative, qt6-qtmultimedia, ki18n, kcrash, kconfig, knewstuff, kirigami, kirigami-addons, kdbusaddons, kitemmodels, kdoctools, libkeduvocdocument.

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

Patches

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

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

What kpkg does

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

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/kwordquiz
echo 'ada960c3474f7c909de04d20605cc970e9ac317e00a215a063498e4fb23cd088  kwordquiz-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/kwordquiz
SRC=$SRC_ROOT/kwordquiz-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf kwordquiz-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/kiosk-get-new.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 \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

install -Dm644 /dev/stdin "$PKG/usr/share/mime/packages/kdos-kvtml.xml" <<'MIMEXML'
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-kvtml">
    <comment>KDE vocabulary document</comment>
    <sub-class-of type="application/xml"/>
    <glob pattern="*.kvtml"/>
  </mime-type>
</mime-info>
MIMEXML
cat > "$PKG/usr/share/applications/org.kde.kwordquiz.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=KWordQuiz
GenericName=Flash Card Trainer
Comment=Learn vocabulary with flashcards and quizzes
TryExec=kwordquiz
Exec=kwordquiz %u
Icon=kwordquiz
Terminal=false
StartupWMClass=org.kde.kwordquiz
X-DocPath=kwordquiz/index.html
MimeType=application/x-kvtml;
Categories=Qt;KDE;Education;Languages;
Keywords=flashcard;vocabulary;quiz;learn;language;kvtml;kwordquiz;
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.kde.kwordquiz.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/kwordquiz, 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 kwordquiz-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/kwordquiz, and runs the triggers its paths call for.

Contents

Installed programs: kwordquiz.

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

Notes

The translation catalogues are not built (KF_SKIP_PO_PROCESSING), and the package prune removes the translated handbooks; see Size and language policy.

KVTML is not in the shared MIME database, so build.sh installs kdos-kvtml.xml, which defines application/x-kvtml for *.kvtml; KWordQuiz is the one entry that claims it. The menu entry is replaced: KAboutData makes the Wayland app_id org.kde.kwordquiz, which the entry gives as StartupWMClass. Upstream’s entry names the icon org.kde.kwordquiz, which exists only as a scalable SVG the panel does not read; the hicolor PNGs upstream installs are named kwordquiz, and the replacement entry names those.

KNewStuff is off on KDOS ([KDE Action Restrictions][$i] ghns=false in /usr/share/kdos/xdg/kdeglobals). The welcome page’s “Download Deck” card would stay on the page with its action disabled under it, a card that does nothing; kiosk-get-new.patch hides the card under the kiosk check the action reads.