303.8. inlyne-0.5.3
GPU-drawn Markdown and HTML viewer with live reload and no browser engine
| Version | 0.5.3, release 1 |
| Shelf | browsers — Web, Gemini and text-mode browsers |
| Phase | 44_apps (Applications), 19 of 422 in build order |
| Licence | MIT |
| Homepage | https://github.com/Inlyne-Project/inlyne |
| Build time | 4.9 SBU |
| Installed size | 24.5 MiB in 7 files |
| Recipe | ports/core/browsers/inlyne/kpkgbuild |
About
Inlyne is a Markdown and HTML viewer that draws the document itself on the GPU through wgpu, with no browser engine underneath, and reloads it when the file changes on disk. It is a Rust program built with cargo from its vendor bundle, the second sha256 = line (see Vendoring). The desktop entry build.sh writes opens a file with inlyne view. It claims text/markdown and is NoDisplay=true: with no file inlyne view prints its usage and exits, so it is offered under Open With and has no Start row. Kate stays the type’s default in kde-mimeapps.list.
Sources
inlyne-0.5.3.tar.gz(667.0 KiB)
sha256ee96cafd254e50290ff64da80bf3240002cfc1d8d204defcfa7243e6fe86c47f
upstream: https://github.com/Inlyne-Project/inlyne/archive/refs/tags/v0.5.3.tar.gz
archive copy: sources-1/browsers--inlyne-0.5.3.tar.gzinlyne-vendor-0.5.3.tar.xz(58.1 MiB)
sha256f8b1f34ded8aad91ec85b940e67e803e8e2252a667bdf6f275d3be0e3596f859
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-1/browsers--inlyne-vendor-0.5.3.tar.xz
Dependencies
Depends on: rust, pkgconf, libxkbcommon, wayland, vulkan-loader, mesa, oniguruma.
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 inlyne'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/browsers/inlyne.
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/browsers/inlyne
echo 'ee96cafd254e50290ff64da80bf3240002cfc1d8d204defcfa7243e6fe86c47f inlyne-0.5.3.tar.gz' | sha256sum -c -
echo 'f8b1f34ded8aad91ec85b940e67e803e8e2252a667bdf6f275d3be0e3596f859 inlyne-vendor-0.5.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/inlyne
SRC=$SRC_ROOT/inlyne-0.5.3
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf inlyne-0.5.3.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:
tar xf $PORT_SRC/${name}-vendor-${version}.tar.xz
export CARGO_HOME="$SRC_ROOT/.cargo"
export RUSTFLAGS="-C target-feature=-crt-static"
export LIBCLANG_PATH=/usr/lib
export CARGO_NET_OFFLINE=true
cargo build --release --frozen --offline -p inlyne
readelf -d target/release/inlyne | grep -q 'NEEDED.*\[libonig\.so\.5\]'
install -Dm755 target/release/inlyne "$PKG/usr/bin/inlyne"
install -Dm644 completions/inlyne.bash "$PKG/usr/share/bash-completion/completions/inlyne"
install -Dm644 completions/_inlyne "$PKG/usr/share/zsh/site-functions/_inlyne"
install -Dm644 completions/inlyne.fish "$PKG/usr/share/fish/vendor_completions.d/inlyne.fish"
install -Dm644 inlyne.default.toml "$PKG/usr/share/doc/inlyne/inlyne.default.toml"
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/inlyne.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Inlyne
GenericName=Markdown Viewer
Comment=View Markdown and HTML documents, reloaded as they change
TryExec=inlyne
Exec=inlyne view %f
Icon=text-markdown
Terminal=false
NoDisplay=true
MimeType=text/markdown;
StartupWMClass=inlyne
Categories=Office;Viewer;
Keywords=markdown;md;readme;viewer;preview;
DESKTOP
chmod 644 "$PKG/usr/share/applications/inlyne.desktop"
The switches, and why each is set:
-p inlyne— build theinlynepackage alone. The source is a cargo workspace whose other member,xtask, is a helper that regenerates the shell completions (cargo xtask gen); the completions it writes are already in the release undercompletions/, andbuild.shinstalls those as they are.
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/inlyne, 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 inlyne-0.5.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/inlyne, and runs the triggers its paths call for.
Contents
Installed programs: inlyne.
Installed directories: /usr/share/doc/inlyne, /usr/share/licenses/inlyne.
Notes
Syntax highlighting goes through syntect, which binds Oniguruma by way of the onig_sys crate. From 40_lang on the tree exports RUSTONIG_SYSTEM_LIBONIG, which makes that crate link the oniguruma port instead of compiling the copy it carries (see rust). The readelf line after cargo build checks that the binary needs libonig.so.5, so a build that falls back to the bundled copy stops instead of shipping it.
inlyne.default.toml, upstream’s example configuration, is installed as documentation under /usr/share/doc/inlyne. Inlyne reads its settings from ~/.config/inlyne/inlyne.toml, which a user copies it to; nothing is installed under /etc.