From 100fcf7bdf7a5e711475e6173f28ca6d407483bd Mon Sep 17 00:00:00 2001 From: Rubén Beltrán del Río Date: Sun, 5 Apr 2026 21:25:35 +0200 Subject: Move rest of Makefile and scripts to the justfile --- README.md | 85 ++++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 31 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 19b1b2d..64c4582 100644 --- a/README.md +++ b/README.md @@ -4,69 +4,92 @@ A wardley mapping tool for linux: Write some text, get a diagram. ## Building -For default settings, `just build` +### Dependencies -This project uses meson and ninja on top of the rust tools. +This project uses the following: -1. Run `meson setup _build` +* `rust`, the language the project is written in. Required. >= 1.92. +* `meson`, the build system used to compile everything. Required. >= 1.0.0 +* `gettext`, the tooling to compile translations. Required. >= 1.0.0 +* `just` to run tasks. Recommended if you plan on doing anything more complex + than compiling. +* `appstream-util`, work with and validate appstream. Required. +* `desktop-file-utils`, work with and validate desktop file. Required. +* You will need the development libraries for `glib-2.0 >= 2.84.0`, + `gio-2.0 >= 2.84.0`, `gtk4 >= 4.18.0`, `libadwaita-1 >= 1.7.0`, + `gtksourceview-5 >= 5.16.0`. +* `podman`, if you plan on building appimage, rpm, deb, or arch packages. -## Installing +### Compiling + +For default settings useful for development, `just build` + +### Installing For a quick local install without packaging: -* `make install` - installs to `/usr/local` (may require sudo) -* `make uninstall` - removes installed files +* `just install` - installs using meson's install command. Might require `sudo`. +* `just uninstall` - removes installed files -To install to a different prefix: `make install prefix=/opt/map` +To install to a different prefix: `just install prefix=/opt/map` -## Testing +## Code Quality -Run `make test` +### Testing -## Formatting and Linting +Run `just test` -* To format: `make format` -* To lint: `make lint` +### Formatting and Linting + +* To format: `just format` +* To lint: `just lint` ## Notes for Developers. -`meson.build` is the source of truth for the version. A script will update all -other sources to make sure they're in sync. +`meson.build` is the source of truth for the version. To sync versions to +Cargo.toml, rpm spec, etc. use `just sync-versions` ## Distributing -Available package formats: deb, rpm, tar.gz, flatpak +Available package formats: deb, rpm, tar.gz, flatpak. ### Main Targets -* `make package` - creates all package types for the current architecture (no upload) -* `make distribute` - signs and uploads existing packages -* `make release` - full workflow (package + distribute) +* `just package` - creates all package types for the current architecture (no upload) +* `just distribute` - signs and uploads existing packages +* `just release` - full workflow (package + distribute) ### Individual Targets For more control, use individual package or distribute targets: -* `make package-deb` - create .deb package -* `make package-rpm` - create .rpm package -* `make package-tar` - create .tar.gz archive -* `make package-flatpak` - create .flatpak bundle +* `just package-deb-all` - create .deb packages +* `just package-rpm-all` - create .rpm packages +* `just package-arch` - create .pkg.tar.gz package +* `just package-appimage` - create .AppImage archive +* `just package-flatpak` - create .flatpak bundle + +* `just distribute-deb-all` - sign and upload .deb +* `just distribute-rpm-all` - sign and upload .rpm +* `just distribute-arch` - sign and upload .pkg.tar.gz package +* `just distribute-appimage` - sign and upload .AppImage +* `just distribute-flatpak` - sign and upload .flatpak -* `make distribute-deb` - sign and upload .deb -* `make distribute-rpm` - sign and upload .rpm -* `make distribute-tar` - sign and upload .tar.gz -* `make distribute-flatpak` - sign and upload .flatpak +For `.deb` targets we build for `trixie` and `forky`, while for `.rpm` targets +we build for `fedora43`, `fedora44`, and `fedora-rawhide`. You can build +individual packages by running `just package-deb DISTRO` or +`just package-rpm DISTRO` ### Flatpak Notes Since flatpak expects offline building, we use `flatpak-cargo-generator` to -generate the sources. This will be done every time you run `make package-flatpak`. +generate the sources. This will be done every time you run `just package-flatpak`. The project assumes `flatpak-cargo-generator.py` lives in `~/projects/vendor/flatpak-builder-tools/cargo`, but you can override this with -the environment variable `flatpak_cargo_generator` (eg. -`make -e flatpak_cargo_generator=~/your/path/to/flatpak_cargo_generator`). It -expects this directory to have the poetry configuration, as it enables the +the variable `flatpak_cargo_generator` (eg. +`just flatpak_cargo_generator=~/your/path/to/flatpak_cargo_generator package-flatpak` +). It expects this directory to have the poetry configuration, as it enables the virtualenv using poetry. ## Localization / Internationalization @@ -75,7 +98,7 @@ This project uses gettext for translations. You can update the template files with: ``` -make extract_strings +just extract_strings ``` This updates the available POTFILES by checking for the presence of the tr! -- cgit