mirror of
https://abf.rosa.ru/djam/typst.git
synced 2025-02-22 17:03:00 +00:00
63 lines
1.5 KiB
RPMSpec
63 lines
1.5 KiB
RPMSpec
%define rustver 1.80.0
|
|
%define debug %nil
|
|
%define debug_package %nil
|
|
|
|
Name: typst
|
|
Version: 0.13.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
|
|
#BuildRequires: pkgconfig(openssl)
|
|
BuildRequires: pkgconfig(openssl3.3)
|
|
|
|
%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
|
|
|
|
export OPENSSL_DIR=/opt/openssl3.3/
|
|
export LD_LIBRARY_PATH=/opt/openssl3.3/lib:${LD_LIBRARY_PATH}
|
|
|
|
cargo build --release
|
|
upx target/release/%{name}
|
|
|
|
%install
|
|
install -Dm0755 target/release/%{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
%files
|
|
%doc README.md LICENSE docs
|
|
%{_bindir}/%{name}
|
|
|