281.1. kdos-sounds-1.0.0
KDOS sound theme — the machine's synthesised voices under their freedesktop names
| Version | 1.0.0, release 1 |
| Source tree | src/art/kdos-sounds/ |
| Phase | 43_toolkits (Toolkits), 320 of 344 in build order |
| Licence | MIT |
| Homepage | https://github.com/kunaldawn/kdos |
| Build time | 0.1 SBU |
| Installed size | 51.5 KiB in 9 files |
| Recipe | src/art/kdos-sounds/kpkgbuild |
About
kdos-sounds is the KDOS sound theme, /usr/share/sounds/kdos/. It holds the machine’s own voices — the login chime, the notification blip, the error buzz — under the freedesktop sound names libcanberra looks up: desktop-login, desktop-logout, message-new-instant, dialog-error, dialog-warning, complete, device-added and device-removed. Every other name falls through Inherits=ocean,freedesktop to Plasma’s Ocean theme and then to the freedesktop one, so a KDE event KDOS has no voice for still sounds.
Nothing here is recorded. build.sh runs kdos-sfx render, which synthesises each voice with the same square and triangle tones kdos-sfx plays at a console and encodes it to Ogg Vorbis through oggenc from vorbis-tools; see kdos-sfx. The theme is selected by [Sounds] Theme=kdos in the distribution’s kdeglobals, which KNotifications and the System Sounds settings page both read.
Why it is in KDOS
The comment above it in script/phases/43_toolkits/packages.d/src-art.txt:
The KDOS sound theme: the machine's synthesised voices under their freedesktop names, rendered at build time by kdos-sfx from kdos-tools. It inherits Plasma's Ocean theme, whose build reaches Qt through ECM.
Sources
None: the port builds from its own directory, /kdos/src/art/kdos-sounds.
Dependencies
Depends on: kdos-tools, vorbis-tools, ocean-sound-theme, sound-theme-freedesktop.
Required by (1): kde-plasma.
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/43_toolkits/phase.env && kpkg install kdos-sounds'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /kdos/src/art/kdos-sounds.
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.
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/kdos-sounds
SRC=$SRC_ROOT/kdos-sounds-1.0.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
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:
kdos-sfx render "$PKG/usr/share/sounds/kdos/stereo"
install -Dm644 "$PORT_SRC/index.theme" "$PKG/usr/share/sounds/kdos/index.theme"
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/kdos-sounds, 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 kdos-sounds-1.0.0-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/kdos-sounds, and runs the triggers its paths call for.
Other files in the port directory, read by build.sh: index.theme.
Contents
Installed directories: /usr/share/sounds/kdos.
Notes
index.theme names Example=desktop-login, the sound the System Sounds page plays to preview the theme. Without it the page asks for theme-demo first, which this theme does not carry, and the inherited name answers with Ocean’s demo, so the KDOS theme would preview as Ocean.
The voices are mono at 44.1 kHz and live in the stereo directory anyway: the directory is the output profile a sound is written for, libcanberra plays a mono file through a stereo output, and stereo is the profile it asks for first.
render encodes with a fixed Ogg serial number, so the same voices give the same files on every build; an encoder left to pick its own serial writes a different file each time and the package never reproduces.
ocean-sound-theme is in depends because it is what the inherited names resolve to. Its configure needs Qt’s qtpaths through ECM, which puts it, and this port with it, in 43_toolkits; kdos-sfx, from kdos-tools, is built a phase earlier.