File lsp-ai.spec of Package lsp-ai

#
# spec file for package lsp-ai
#
# Copyright (c) 2025 Boian Berberov
#
# 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/
#

%global         git_branch  main



Name:           lsp-ai
Version:        0.7.1
Release:        0%{?dist}
Summary:        Language server with an LLM-powered backend
License:        MIT
URL:            https://github.com/ifiokjr/lsp-ai

Source0:        %{url}/archive/refs/heads/%{git_branch}.tar.gz
Source1:        vendor.tar.zst

# Rust 2024 to force devel:languages:rust repo packages
# Rust 2024 required by package
BuildRequires:  cargo >= 1.85.0

%if 0%{?is_opensuse}
BuildRequires:  cargo-packaging
%endif

%if 0%{?fedora} || 9 <= 0%{?rhel} || 0%{?mageia}
BuildRequires:  cargo-rpm-macros >= 24
%endif

BuildRequires:  gcc-c++

%description
Language server with an LLM-powered backend



%prep
# Run before setup so it does not clobber the vendor tarball
%if 0%{?fedora} || 9 <= 0%{?rhel} || 0%{?mageia}
%cargo_prep
%endif

%setup -q -n %{name}-%{git_branch} -a 1



%build
%cargo_build



# %%check
# %%cargo_test



%install
%if 0%{?is_opensuse}
%cargo_install -p crates/%{name}
%endif

%if 0%{?fedora} || 9 <= 0%{?rhel} || 0%{?mageia}
%{__cargo} install %{__cargo_common_opts} --profile rpm --no-track --path crates/%{name}
%endif



%files
%license        LICENSE
%{_bindir}/%{name}



%changelog

* Sat Jul 12 2025 Boian Berberov
- Added changelog for openSUSE Leap 16
openSUSE Build Service is sponsored by