%define rustver 1.76.0 %define debug %nil %define debug_package %nil Name: typst Version: 0.11.0 Release: 1 Summary: Markup-based typesetting system URL: https://typst.app Source0: https://github.com/typst/typst/archive/v%{version}/%{name}-%{version}.tar.gz Source1000: %{name}.rpmlintrc License: ASL 2.0 Group: Development/Other %if %{mdvver} > 201610 BuildRequires: rust BuildRequires: cargo %else BuildRequires: curl %endif BuildRequires: upx %description Typst is a new markup-based typesetting system that is designed to be as powerful as LaTeX while being much easier to learn and use. Typst has: - Built-in markup for the most common formatting tasks - Flexible functions for everything else - A tightly integrated scripting system - Math typesetting, bibliography management, and more - Fast compile times thanks to incremental compilation - Friendly error messages in case something goes wrong %prep %setup -q %if %{mdvver} <= 201610 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |\ sh -s -- -y --profile default --default-toolchain %{rustver} %endif %build %if %{mdvver} <= 201610 source "$HOME/.cargo/env" %endif cargo build --release upx target/release/%{name} %install install -Dm0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} %files %doc README.md LICENSE docs %{_bindir}/%{name}