Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Building Packages

Datui can be packaged for Debian/Ubuntu (.deb), Fedora/RHEL (.rpm), and Arch Linux (AUR).

Prerequisites

  • Rust: Install via rustup
  • Python 3: For running the build script
  • Cargo packaging tools: Install as needed:
cargo install cargo-deb           # For .deb packages
cargo install cargo-generate-rpm  # For .rpm packages
cargo install cargo-aur           # For AUR packages

Building Packages

Run from the repository root:

# Build a .deb package (Debian/Ubuntu)
python3 scripts/build_package.py deb

# Build a .rpm package (Fedora/RHEL)
python3 scripts/build_package.py rpm

# Build AUR package (Arch Linux)
python3 scripts/build_package.py aur

The script automatically:

  1. Runs cargo build --release
  2. Generates and compresses the manpage
  3. Invokes the appropriate cargo packaging tool
  4. Reports the output file locations

Options

  • --no-build: Skip cargo build --release (use when artifacts already exist)
  • --repo-root PATH: Specify repository root (default: auto-detected via git)
# Example: build .deb without rebuilding (artifacts must exist)
python3 scripts/build_package.py deb --no-build

Output Locations

PackageOutput DirectoryExample Filename
debtarget/debian/datui_0.2.11-dev-1_amd64.deb
rpmtarget/generate-rpm/datui-0.2.11-dev-1.x86_64.rpm
aurtarget/cargo-aur/PKGBUILD, datui-0.2.11-dev-x86_64.tar.gz

CI and Releases

The same script is used in GitHub Actions:

  • CI (ci.yml): Builds and uploads dev packages (.deb, .rpm, .tar.gz) on push to main
  • Release (release.yml): Attaches .deb, .rpm, and Arch .tar.gz to GitHub releases

Arch Linux Installation

Arch users can install from the release tarball:

# Download the tarball from a release, then extract and install
tar xf datui-X.Y.Z-x86_64.tar.gz
sudo install -Dm755 datui /usr/bin/datui
sudo install -Dm644 target/release/datui.1.gz /usr/share/man/man1/datui.1.gz

Or use the included PKGBUILD with makepkg.

AUR Release Workflow

To update the AUR package when you release a new version:

  1. Checkout the release tag and build the AUR package:

    git checkout vX.Y.Z
    cargo build --release --locked
    python3 scripts/build_package.py aur --no-build
    
  2. Generate .SRCINFO and copy to your AUR repo:

    cd target/cargo-aur
    makepkg --printsrcinfo > .SRCINFO
    cp PKGBUILD .SRCINFO /path/to/aur-datui-bin/
    
  3. Commit and push to the AUR:

    cd /path/to/aur-datui-bin
    git add PKGBUILD .SRCINFO
    git commit -m "Upstream update: X.Y.Z"
    git push
    

Use stable release tags only (e.g. v0.2.11); the AUR package fetches the tarball from the GitHub release. Dev builds are available from the dev release tag.

More Information

For detailed information about packaging metadata, policies, and AUR submission, see plans/packaging-deb-rpm-aur-plan.md.