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

287.2. sqlitebrowser-3.13.1

DB Browser for SQLite — create, browse, edit and query SQLite databases

Version 3.13.1, release 1
Shelf database — Database engines, embedded key-value stores, database servers, clients and full-text indexes
Phase 44_apps (Applications), 43 of 422 in build order
Licence (MPL-2.0 OR GPL-3.0-or-later) AND GPL-3.0-only AND LGPL-2.1-only AND MIT
Homepage https://sqlitebrowser.org/
Build time 15.9 SBU
Installed size 9.9 MiB in 11 files
Recipe ports/core/database/sqlitebrowser/kpkgbuild

About

DB Browser for SQLite (sqlitebrowser) is a graphical editor for SQLite database files: it creates and alters tables and indexes, browses and edits rows, runs SQL with a highlighting editor, plots query results and imports and exports CSV and SQL. It is a Qt 5 application built against the system sqlite.

Sources

Dependencies

Depends on: cmake, ninja, sqlite, qt5-qtbase, qt5-qttools, qt5-qtwayland.

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

What kpkg does

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

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/database/sqlitebrowser
echo '1044ba67d649cabc459eb887c016f70d6a404ad651390ab33bf7859dc7f1b67b  sqlitebrowser-3.13.1.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/sqlitebrowser
SRC=$SRC_ROOT/sqlitebrowser-3.13.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf sqlitebrowser-3.13.1.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:

cmake -S . -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DBUILD_STABLE_VERSION=ON \
	-DENABLE_TESTING=OFF \
	-DFORCE_INTERNAL_QSCINTILLA=ON \
	-DFORCE_INTERNAL_QCUSTOMPLOT=ON \
	-DFORCE_INTERNAL_QHEXEDIT=ON \
	-Dsqlcipher=OFF
cmake --build build
DESTDIR=$PKG cmake --install build
test -x "$PKG/usr/bin/sqlitebrowser"

install -Dm644 distri/mime/packages/db4s-sqbpro.xml \
	"$PKG/usr/share/mime/packages/db4s-sqbpro.xml"

cat > "$PKG/usr/share/applications/sqlitebrowser.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=DB Browser for SQLite
GenericName=Database Browser
Comment=Create, browse, edit and query SQLite databases
TryExec=sqlitebrowser
Exec=sqlitebrowser %f
Icon=sqlitebrowser
Terminal=false
StartupWMClass=sqlitebrowser
Categories=Development;Utility;Database;
MimeType=application/vnd.db4s-project+xml;application/vnd.sqlite3;application/x-sqlite2;
Keywords=sqlite;database;sql;table;query;browser;db4s;
DESKTOP
chmod 644 "$PKG/usr/share/applications/sqlitebrowser.desktop"
test -e "$PKG"/usr/share/icons/hicolor/256x256/apps/sqlitebrowser.png

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/sqlitebrowser, 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 sqlitebrowser-3.13.1-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/sqlitebrowser, and runs the triggers its paths call for.

Contents

Installed programs: sqlitebrowser.

Installed directories: /usr/share/licenses/sqlitebrowser.

Notes

build.sh installs the MIME type for DB4S project files (.sqbpro) from distri/mime, which the CMake install leaves out, writes its own sqlitebrowser.desktop over upstream’s, associating the program with SQLite files and project files, and checks that the program and its 256-pixel icon were installed.