mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
add: typst (#4945)
* add: typst * Update rust-typst.spec Signed-off-by: madomado <madonuko@outlook.com> * ? Signed-off-by: madomado <madonuko@outlook.com> * let's try this cursed way of packaging stuff * Update rust-typst.spec * a * Update rust-typst.spec Signed-off-by: madomado <madonuko@outlook.com> * remove crate file * no more devel Signed-off-by: madomado <madonuko@outlook.com> * no defasult devel Signed-off-by: madomado <madonuko@outlook.com> * Update rust-typst.spec Signed-off-by: madomado <madonuko@outlook.com> * Update rust-typst.spec Signed-off-by: madomado <madonuko@outlook.com> --------- Signed-off-by: madomado <madonuko@outlook.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "rust-typst.spec"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
# Generated by rust2rpm 27
|
||||
%bcond check 0
|
||||
|
||||
%global crate typst
|
||||
|
||||
Name: rust-typst
|
||||
Version: 0.13.1
|
||||
Release: %autorelease
|
||||
Summary: New markup-based typesetting system that is powerful and easy to learn
|
||||
|
||||
License: Apache-2.0
|
||||
URL: https://typst.app
|
||||
Source: https://github.com/typst/typst/archive/refs/tags/v%version.tar.gz
|
||||
Packager: madonuko <mado@fyralabs.com>
|
||||
|
||||
BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
|
||||
%global _description %{expand:
|
||||
A new markup-based typesetting system that is powerful and easy to
|
||||
learn.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n %crate
|
||||
Summary: %{summary}
|
||||
License: ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND (MIT AND (MIT OR Apache-2.0)) AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT)
|
||||
Provides: %crate-cli = %version-%release
|
||||
|
||||
%description -n %crate %{_description}
|
||||
|
||||
%files -n %crate
|
||||
%license LICENSE
|
||||
%license LICENSE.dependencies
|
||||
%doc README.md
|
||||
%_bindir/typst
|
||||
%_mandir/man1/typst-compile.1.gz
|
||||
%_mandir/man1/typst-fonts.1.gz
|
||||
%_mandir/man1/typst-init.1.gz
|
||||
%_mandir/man1/typst-query.1.gz
|
||||
%_mandir/man1/typst-update.1.gz
|
||||
%_mandir/man1/typst-watch.1.gz
|
||||
%_mandir/man1/typst.1.gz
|
||||
|
||||
|
||||
%package bash-completion
|
||||
Summary: Bash completion for %{crate}
|
||||
Requires: %{crate} = %{version}-%{release}
|
||||
Requires: bash-completion
|
||||
Supplements: (%{crate} and bash-completion)
|
||||
|
||||
%description bash-completion
|
||||
Bash command line completion support for %{crate}.
|
||||
|
||||
%package fish-completion
|
||||
Summary: Fish completion for %{crate}
|
||||
Requires: %{crate} = %{version}-%{release}
|
||||
Requires: fish
|
||||
Supplements: (%{crate} and fish)
|
||||
|
||||
%description fish-completion
|
||||
Fish command line completion support for %{crate}.
|
||||
|
||||
%package zsh-completion
|
||||
Summary: Zsh completion for %{crate}
|
||||
Requires: %{crate} = %{version}-%{release}
|
||||
Requires: zsh
|
||||
Supplements: (%{crate} and zsh)
|
||||
|
||||
%description zsh-completion
|
||||
Zsh command line completion support for %{crate}.
|
||||
|
||||
|
||||
%files bash-completion
|
||||
%{bash_completions_dir}/%{crate}
|
||||
|
||||
%files fish-completion
|
||||
%{fish_completions_dir}/%{crate}.fish
|
||||
|
||||
%files zsh-completion
|
||||
%{zsh_completions_dir}/_%{crate}
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version} -p1
|
||||
%cargo_prep_online
|
||||
pushd crates/%{crate}-cli
|
||||
%cargo_prep_online
|
||||
popd
|
||||
|
||||
%build
|
||||
pushd crates/%{crate}-cli
|
||||
%{cargo_license_summary_online}
|
||||
%{cargo_license_online} > ../../LICENSE.dependencies
|
||||
popd
|
||||
export TYPST_VERSION="%version"
|
||||
export GEN_ARTIFACTS=artifacts/
|
||||
export OPENSSL_NO_VENDOR=true
|
||||
%{cargo_build} -p typst-cli
|
||||
|
||||
%install
|
||||
#? https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=typst-git#n60
|
||||
_artifacts='crates/typst-cli/artifacts'
|
||||
install -Dm755 -t %buildroot%_bindir target/rpm/%crate
|
||||
install -Dm644 -t %buildroot%_mandir/man1 $_artifacts/%{crate}*.1
|
||||
install -Dm644 -t %buildroot%zsh_completions_dir $_artifacts/_%crate
|
||||
install -Dm644 -t %buildroot%fish_completions_dir $_artifacts/%crate.fish
|
||||
# no .bash suffix
|
||||
install -Dm644 $_artifacts/%crate.bash %buildroot%bash_completions_dir/%crate
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
@@ -0,0 +1 @@
|
||||
rpm.version(crates("typst"));
|
||||
Reference in New Issue
Block a user