commit 9fde5e0db99c9182276cdaf732736e4d4bf2c4ac Author: Sergey Zhemoytel Date: Tue Jul 4 13:31:40 2023 +0300 Imported from SRPM diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..def848d --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + typst-0.5.0.tar.gz: fb2b854d8b77f92e91d70c98174f7d21b6bd7134 diff --git a/typst.rpmlintrc b/typst.rpmlintrc new file mode 100644 index 0000000..00b1e15 --- /dev/null +++ b/typst.rpmlintrc @@ -0,0 +1,2 @@ +addFilter("E: shared-lib-without-dependency-information") + diff --git a/typst.spec b/typst.spec new file mode 100644 index 0000000..b358688 --- /dev/null +++ b/typst.spec @@ -0,0 +1,56 @@ +%define rustver 1.70.0 +%define debug %nil +%define debug_package %nil + +Name: typst +Version: 0.5.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 +%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} +