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

300.3. transmission-4.1.3

BitTorrent daemon with a web UI, command-line tools and a Qt 6 client

Version 4.1.3, release 1
Shelf transfer — File transfer, synchronisation, backup and BitTorrent
Phase 44_apps (Applications), 390 of 422 in build order
Licence GPL-2.0-only OR GPL-3.0-only
Homepage https://transmissionbt.com/
Build time 28.5 SBU
Installed size 34.7 MiB in 87 files
Recipe ports/core/transfer/transmission/kpkgbuild

About

Transmission is a BitTorrent client in several front ends over one engine, libtransmission. The port builds transmission-daemon with its web interface, transmission-remote, which drives a daemon, transmission-cli, which downloads on its own, the transmission-create, -edit and -show tools for torrent files, and transmission-qt, the Qt 6 desktop client.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, curl, openssl, libevent, libdeflate, libpsl, miniupnpc, qt6-qtbase, qt6-qtsvg, qt6-qttools, qt6-qtwayland, librsvg, hicolor-icon-theme.

Required by: no port names it.

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

What kpkg does

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

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/transmission
echo 'ce7d2d8b101f7eb54bc3cf0bc55f52f7ebd4a25fa48e00bdca9a7e0fc02617da  transmission-4.1.3.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/transmission
SRC=$SRC_ROOT/transmission-4.1.3
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf transmission-4.1.3.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_POLICY_VERSION_MINIMUM=3.5 \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D BUILD_SHARED_LIBS=OFF \
	-D ENABLE_DAEMON=ON \
	-D ENABLE_CLI=ON \
	-D ENABLE_UTILS=ON \
	-D ENABLE_QT=ON \
	-D USE_QT_VERSION=6 \
	-D ENABLE_GTK=OFF \
	-D ENABLE_MAC=OFF \
	-D REBUILD_WEB=OFF \
	-D INSTALL_WEB=ON \
	-D INSTALL_DOC=ON \
	-D INSTALL_LIB=OFF \
	-D ENABLE_NLS=ON \
	-D ENABLE_TESTS=OFF \
	-D ENABLE_UTP=ON \
	-D ENABLE_WERROR=OFF \
	-D RUN_CLANG_TIDY=OFF \
	-D WITH_CRYPTO=openssl \
	-D WITH_SYSTEMD=OFF \
	-D WITH_INOTIFY=ON \
	-D WITH_APPINDICATOR=OFF \
	-D USE_SYSTEM_EVENT2=ON \
	-D USE_SYSTEM_DEFLATE=ON \
	-D USE_SYSTEM_PSL=ON \
	-D USE_SYSTEM_MINIUPNPC=ON \
	-D USE_SYSTEM_DHT=OFF \
	-D USE_SYSTEM_UTP=OFF \
	-D USE_SYSTEM_B64=OFF \
	-D USE_SYSTEM_NATPMP=OFF \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

find "$PKG/usr/share/transmission/translations" -name '*.qm' ! -name '*_en*.qm' -delete

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

cat > "$PKG/usr/share/applications/transmission-qt.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Transmission
GenericName=BitTorrent Client
Comment=Download and share files over BitTorrent
Exec=transmission-qt %U
Icon=transmission-qt
Terminal=false
StartupWMClass=transmission-qt
Categories=Network;FileTransfer;P2P;Qt;
Keywords=bittorrent;torrent;magnet;download;p2p;transmission;
DESKTOP
chmod 644 "$PKG/usr/share/applications/transmission-qt.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/transmission, 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 transmission-4.1.3-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/transmission, and runs the triggers its paths call for.

Contents

Installed programs: transmission-cli, transmission-create, transmission-daemon, transmission-edit, transmission-qt, transmission-remote, transmission-show.

Installed directories: /usr/share/doc/transmission, /usr/share/licenses/transmission, /usr/share/transmission.

Short descriptions

transmission-cli a bittorrent client
transmission-create command-line utility to create .torrent files
transmission-daemon a bittorrent client
transmission-edit command-line utility to modify .torrent files' announce URLs
transmission-qt a bittorrent client
transmission-remote a remote control utility for
transmission-show command-line utility to show .torrent file metadata

Notes

Upstream installs the logo as SVG only. The recipe rasterises icons/hicolor_apps_scalable_transmission.svg to PNGs from 48 to 256 pixels named transmission-qt, and writes its own transmission-qt.desktop: the window’s app id is the binary’s name, transmission-qt, which the entry repeats in StartupWMClass. The entry claims no MIME type; qBittorrent is the client that claims .torrent files and magnet: links.