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

300.1. syncthingtray-2.1.7

Status, folders, devices and control of a local Syncthing from the panel tray (Qt 6)

Version 2.1.7, release 1
Shelf transfer — File transfer, synchronisation, backup and BitTorrent
Phase 44_apps (Applications), 388 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://martchus.github.io/syncthingtray/
Build time 18.3 SBU
Installed size 4.6 MiB in 135 files
Recipe ports/core/transfer/syncthingtray/kpkgbuild

About

Syncthing Tray shows the state of a local Syncthing in the panel tray: which folders and devices are in sync, what is transferring, and the recent changes, and it can pause, rescan and restart Syncthing. It is a Qt 6 Widgets program built on Martchus’s cpp-utilities, qtutilities and qtforkawesome. The port also installs syncthingctl, the command-line client the desktop entry’s “Rescan all folders” action runs.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, cpp-utilities, qtutilities, qtforkawesome, qt6-qtbase, qt6-qtsvg, qt6-qttools, qt6-qtdeclarative, qt6-qtwayland, extra-cmake-modules, libplasma, kconfig, kio, syncthing, librsvg, hicolor-icon-theme.

Required by: no port names it.

Patches

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

plasmoid-no-quick-gui.patch guards the one use of the Qt Quick interface in the Plasmoid’s showIgnorePatterns() with the same SYNCTHINGWIDGETS_GUI_QTQUICK_MODE_DESKTOP check as every other use in the applet, so the Plasmoid compiles with -D QUICK_GUI=OFF and opens the Widgets ignore-patterns dialog. It is to be offered upstream.

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

What kpkg does

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

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/transfer/syncthingtray
echo '9448768fb490a4a625d410c3b4b709256b60dc608c6180bd9b4fcbc57cd473ec  syncthingtray-2.1.7.tar.gz' | 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/syncthingtray
SRC=$SRC_ROOT/syncthingtray-2.1.7
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf syncthingtray-2.1.7.tar.gz -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/plasmoid-no-quick-gui.patch"

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D BUILD_SHARED_LIBS=ON \
	-D BUILD_TESTING=OFF \
	-D QT_PACKAGE_PREFIX=Qt6 \
	-D KF_PACKAGE_PREFIX=KF6 \
	-D WEBVIEW_PROVIDER=none \
	-D JS_PROVIDER=qml \
	-D WIDGETS_GUI=ON \
	-D QUICK_GUI=OFF \
	-D NO_LIBSYNCTHING=ON \
	-D NO_PLASMOID=OFF \
	-D NO_FILE_ITEM_ACTION_PLUGIN=OFF \
	-D SETUP_TOOLS=OFF \
	-D SYSTEMD_SUPPORT=OFF \
	-D USE_BOOST_PROCESS=OFF \
	-D DBUS_BASED_POWER_MONITORING=ON \
	-D NO_DOXYGEN=ON \
	-D NO_SPHINX=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 tray/resources/icons/hicolor/scalable/apps/syncthingtray.svg \
		-o "$PKG/usr/share/icons/hicolor/${s}x$s/apps/syncthingtray.png"
done
install -Dm644 tray/resources/icons/hicolor/256x256/apps/syncthingtray.png \
	"$PKG/usr/share/icons/hicolor/256x256/apps/syncthingtray.png"

cat > "$PKG/usr/share/applications/syncthingtray.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Syncthing Tray
GenericName=Syncthing Status
Comment=Status and control of the local Syncthing from the panel tray
Exec=syncthingtray
Icon=syncthingtray
Terminal=false
StartupWMClass=syncthingtray
Categories=Network;FileTransfer;
Keywords=syncthing;sync;folder;device;share;
Actions=ShowSyncthing;RescanAll;

[Desktop Action ShowSyncthing]
Name=Open the Syncthing web UI
Exec=syncthingtray qt-widgets-gui --webui

[Desktop Action RescanAll]
Name=Rescan all folders
Exec=syncthingctl rescan-all
DESKTOP
chmod 644 "$PKG/usr/share/applications/syncthingtray.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/syncthingtray, 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 syncthingtray-2.1.7-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/syncthingtray, and runs the triggers its paths call for.

Contents

Installed programs: syncthingctl, syncthingtray.

Installed libraries: libsyncthingconnector.so, libsyncthingmodel.so, libsyncthingwidgets.so.

Installed directories: /usr/include/syncthingconnector, /usr/include/syncthingmodel, /usr/include/syncthingwidgets, /usr/share/licenses/syncthingtray, /usr/share/plasma/plasmoids/martchus.syncthingplasmoid, /usr/share/syncthingconnector, /usr/share/syncthingfileitemaction, /usr/share/syncthingmodel, /usr/share/syncthingplasmoid, /usr/share/syncthingtray, /usr/share/syncthingwidgets.

Short descriptions

syncthingconnector.pc Connection backend of Syncthing Tray
syncthingfileitemaction.pc KIO file item action for Syncthing
syncthingmodel.pc Data models of Syncthing Tray
syncthingplasmoid.pc Plasmoid to interact with Syncthing
syncthingwidgets.pc Tray application for Syncthing

Notes

Upstream installs the logo as SVG only. The recipe rasterises it to 48, 64 and 128 pixel PNGs and installs the 256-pixel PNG the source carries under tray/resources/icons. Upstream’s desktop entry has no StartupWMClass; the recipe writes its own, naming the window’s app id, syncthingtray, the program’s name.