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

321.3. smplayer-26.8.29

Qt front end for mpv that remembers where every file stopped

Version 26.8.29, release 1
Shelf video-players — Video players and media centres, and their front-end add-ons
Phase 44_apps (Applications), 402 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://www.smplayer.info/
Build time 1.6 SBU
Installed size 5.4 MiB in 33 files
Recipe ports/core/video-players/smplayer/kpkgbuild

About

SMPlayer is a Qt front end for mpv that remembers the settings of each file it has played, so a file played again resumes at the point it stopped, with the same settings. It runs mpv as a child process and has it draw into SMPlayer’s own window by X11 window id, so on Linux main.cpp sets QT_QPA_PLATFORM=xcb for itself: SMPlayer runs under Xwayland, and the mpv it starts uses its X11 video output.

Sources

Dependencies

Depends on: qt5-qtbase, qt5-qtsvg, qt5-qttools, libX11, zlib, mpv.

Required by: no port names it.

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

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/video-players/smplayer.

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/video-players/smplayer
echo '64a04328396069b4d8e1c1bca9aebf11f771707a4a1cb49125377d3ecca68450  smplayer-26.8.29.tar.bz2' | 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/smplayer
SRC=$SRC_ROOT/smplayer-26.8.29
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf smplayer-26.8.29.tar.bz2 -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/offline.patch"

_qmake_opts="DEFINES+=NO_MPLAYER QMAKE_CFLAGS_RELEASE=\"$CFLAGS\" QMAKE_CXXFLAGS_RELEASE=\"$CXXFLAGS\" QMAKE_LFLAGS_RELEASE=\"$LDFLAGS\""
make PREFIX=/usr QMAKE=qmake-qt5 LRELEASE=/usr/lib/qt5/bin/lrelease \
	QMAKE_OPTS="$_qmake_opts" CFLAGS_EXTRA=-Wno-error
make PREFIX=/usr QMAKE=qmake-qt5 LRELEASE=/usr/lib/qt5/bin/lrelease \
	QMAKE_OPTS="$_qmake_opts" CFLAGS_EXTRA=-Wno-error \
	DESTDIR=$PKG install

rm -f "$PKG/usr/bin/simple_web_server"

find "$PKG/usr/share/smplayer/translations" -name '*.qm' ! -name 'smplayer_en*.qm' -delete
find "$PKG/usr/share/doc/packages/smplayer" -mindepth 1 -maxdepth 1 -type d ! -name en -exec rm -rf {} +

gunzip "$PKG/usr/share/man/man1/smplayer.1.gz"

rm -f "$PKG/usr/share/applications/smplayer_enqueue.desktop"
cat > "$PKG/usr/share/applications/smplayer.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=SMPlayer
GenericName=Media Player
Comment=Play videos and music with mpv, remembering where each file stopped
TryExec=smplayer
Exec=smplayer %U
Icon=smplayer
Terminal=false
StartupWMClass=smplayer
Categories=Qt;AudioVideo;Player;Video;
Keywords=video;movie;player;mpv;subtitles;smplayer;
DESKTOP
chmod 644 "$PKG/usr/share/applications/smplayer.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/smplayer, 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 smplayer-26.8.29-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/smplayer, and runs the triggers its paths call for.

Contents

Installed programs: smplayer.

Installed directories: /usr/share/doc/packages, /usr/share/licenses/smplayer, /usr/share/smplayer.

Short descriptions

smplayer The best GUI frontend for MPlayer

Notes