File tinymist.spec of Package tinymist
#
# spec file for package typst-lsp
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: tinymist
Version: 0.14.14
Release: 0
Summary: An integrated language service for Typst
License: Apache-2.0
URL: https://github.com/Myriad-Dreamin/tinymist
Source: %{name}-%{version}.tar.zst
Source1: vendor.tar.zst
BuildRequires: cargo-packaging
BuildRequires: zstd
%description
Tinymist [ˈtaɪni mɪst] is an integrated language service for Typst [taɪpst].
%prep
%autosetup -p1 -a1
%build
export DATE_FMT="+%%Y-%%m-%%dT%%H:%%M:%%SZ"
export VERGEN_BUILD_TIMESTAMP=$(date -u -d "@${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u "${DATE_FMT}")
export VERGEN_GIT_COMMIT_TIMESTAMP=${VERGEN_BUILD_TIMESTAMP}
export VERGEN_GIT_DESCRIBE=v%{version}
export VERGEN_GIT_SHA=${VERGEN_GIT_DESCRIBE}
export VERGEN_GIT_BRANCH=${VERGEN_GIT_DESCRIBE}
%{cargo_build}
%install
install -D -m 0755 -t %{buildroot}%{_bindir} target/release/tinymist
%check
target/release/tinymist --version
%files
%license LICENSE*
%doc *.md
%{_bindir}/tinymist
%changelog