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

210.1. freedoom-0.13.0

Free game data for Doom engines — Phase 1, Phase 2 and FreeDM IWADs built from their lumps

Version 0.13.0, release 1
Shelf games-shooter — First-person shooters, Doom and Quake engines, and their data
Phase 42_graphics (Graphics Stack), 105 of 189 in build order
Licence BSD-3-Clause
Homepage https://freedoom.github.io/
Build time 0.9 SBU
Installed size 76.2 MiB in 20 files
Recipe ports/core/games-shooter/freedoom/kpkgbuild

About

Freedoom is free game data for Doom engines: freedoom1.wad (Phase 1, four nine-level episodes in the form of the original Doom), freedoom2.wad (Phase 2, a 32-level campaign in the form of Doom II) and freedm.wad, a deathmatch set. Each IWAD is assembled here from the project’s PNG graphics, sound and map lumps by deutex; nothing in the package is a prebuilt WAD. It is the game data for the KDOS Doom engines: chocolate-doom, crispy-doom and dsda-doom each name this port in their depends.

Sources

Dependencies

Depends on: deutex, python3, python3-pillow, asciidoc, docbook-xsl, libxslt.

Required by (3): chocolate-doom, crispy-doom, dsda-doom.

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/42_graphics/phase.env && kpkg install freedoom'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/games-shooter/freedoom.

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/games-shooter/freedoom
echo '860edb005bcf0b2acf29d10fd9130c91025301764a4d0d6dcffc503fdf8d2c77  freedoom-0.13.0.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/freedoom
SRC=$SRC_ROOT/freedoom-0.13.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf freedoom-0.13.0.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:

make VERSION=v$version

export XML_CATALOG_FILES=/etc/xml/catalog
make -C dist freedoom1.6 freedoom2.6 freedm.6 \
	io.github.freedoom.Phase1.png io.github.freedoom.Phase2.png \
	io.github.freedoom.FreeDM.png

install -Dm644 wads/freedoom1.wad wads/freedoom2.wad wads/freedm.wad \
	-t "$PKG/usr/share/games/doom"
install -Dm755 dist/freedoom "$PKG/usr/bin/freedoom1"
install -Dm755 dist/freedoom "$PKG/usr/bin/freedoom2"
install -Dm755 dist/freedoom "$PKG/usr/bin/freedm"
install -Dm644 dist/freedoom1.6 dist/freedoom2.6 dist/freedm.6 \
	-t "$PKG/usr/share/man/man6"
for i in Phase1 Phase2 FreeDM; do
	install -Dm644 dist/io.github.freedoom.$i.png \
		"$PKG/usr/share/icons/hicolor/64x64/apps/io.github.freedoom.$i.png"
done
install -Dm644 CREDITS CREDITS-MUSIC README.adoc NEWS.adoc COPYING.adoc \
	-t "$PKG/usr/share/doc/freedoom"

install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/io.github.freedoom.Phase1.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Freedoom: Phase 1
GenericName=First Person Shooter
Comment=Battle monsters in four 9-level episodes
Exec=freedoom1
Icon=io.github.freedoom.Phase1
Terminal=false
StartupWMClass=crispy-doom
Categories=Game;ActionGame;
Keywords=first;person;shooter;doom;freedoom;
DESKTOP
cat > "$PKG/usr/share/applications/io.github.freedoom.Phase2.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Freedoom: Phase 2
GenericName=First Person Shooter
Comment=Battle monsters in a 32-level campaign
Exec=freedoom2
Icon=io.github.freedoom.Phase2
Terminal=false
StartupWMClass=crispy-doom
Categories=Game;ActionGame;
Keywords=first;person;shooter;doom;freedoom;
DESKTOP
chmod 644 "$PKG/usr/share/applications/"*.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/freedoom, 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 freedoom-0.13.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/freedoom, and runs the triggers its paths call for.

Contents

Installed programs: freedm, freedoom1, freedoom2.

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

Short descriptions

freedm Automatically launch Freedoom with an engine
freedoom1 Automatically launch Freedoom with an engine
freedoom2 Automatically launch Freedoom with an engine

Notes

make builds only the three WADs. make -C dist builds the three manual pages and the three 64×64 icons, which dist/pillow-resize and dist/pillow-compose cut from the game’s own graphics with python3-pillow. The PDF manuals are not built: they need asciidoctor-pdf, which is not a port.

The WADs go to /usr/share/games/doom, where every Doom engine in KDOS looks for freedoom1.wad and freedoom2.wad.

The three commands freedoom1, freedoom2 and freedm are one script, upstream’s dist/freedoom, installed under three names. It picks the IWAD from the name it was run by, sets DOOMWADPATH (unless it is already set) to $XDG_DATA_HOME/games/doom (~/.local/share/games/doom when XDG_DATA_HOME is unset), /usr/local/share/games/doom, /usr/local/share/doom, /usr/share/games/doom and /usr/share/doom, and runs the first engine it finds on PATH from its own list: doom, odamex, gzdoom, crispy-doom, chocolate-doom, prboom-plus. Of those, KDOS has crispy-doom and chocolate-doom, so Crispy Doom is the one that starts whenever it is installed, and the desktop entries say StartupWMClass=crispy-doom to match it. dsda-doom is not on the list; ~/.doomport, a symbolic link to an engine, or freedoom2 -p dsda-doom picks it instead.

build.sh writes its own desktop entries, for Phase 1 and Phase 2 only. FreeDM has an icon and a command but no desktop entry, although upstream ships one in dist/.