Files
lua-language-server/lua-language-server.spec
Matej Cepl be449e9359 - Update to 3.4.0:
- NEW diagnostics:
        cast-local-type
        assign-type-mismatch
        param-type-mismatch
        unknown-cast-variable
        cast-type-mismatch
        missing-return-value
        redundant-return-value
        missing-return
        return-type-mismatch
  - NEW settings:
        diagnostics.groupSeverity
        diagnostics.groupFileStatus
        type.castNumberToInteger
        type.weakUnionCheck
        hint.semicolon
  - CHG infer nil as redundant return value
    local function f() end
    local x = f() -- `x` is `nil` instead of `unknown`
  - CHG infer called function by params num
    ---@overload fun(x: number, y: number):string
    ---@overload fun(x: number):number
    ---@return boolean
    local function f() end
    local n1 = f()     -- `n1` is `boolean`
    local n2 = f(0)    -- `n2` is `number`
    local n3 = f(0, 0) -- `n3` is `string`
  - CHG semicolons and parentheses can be used in DocTable
    ---@type { (x: number); (y: boolean) }

OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-language-server?expand=0&rev=21
2022-06-29 21:21:37 +00:00

78 lines
2.3 KiB
RPMSpec

#
# spec file for package lua-language-server
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2021 Andreas Schneider <asn@cryptomilk.org>
#
# 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: lua-language-server
Version: 3.4.0
Release: 0
Summary: Lua Language Server coded by Lua
License: MIT
URL: https://github.com/sumneko/lua-language-server
# Checkout from git is required because of gh#sumneko/lua-language-server#878
# Source0: %%{name}-%%{version}.tar.gz
Source0: https://github.com/sumneko/%{name}/releases/download/%{version}/%{name}-%{version}-submodules.zip
Source1: https://github.com/sumneko/%{name}/archive/%{version}.tar.gz
Source2: lua-lsp-launcher.sh
Source3: README.suse-maint.md
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: ninja
BuildRequires: unzip
ExcludeArch: s390x ppc64le ppc64
%description
This package provides a Language Server Protocol (LSP) implementation for Lua.
%prep
%autosetup -p1 -c
%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
ninja -C 3rd/luamake -f compile/ninja/linux.ninja
./3rd/luamake/luamake rebuild
%install
install -d -m 0755 %{buildroot}%{_libdir}/%{name}
cp -av bin/* %{buildroot}%{_libdir}/%{name}
install -d -m 0755 %{buildroot}%{_datadir}/%{name}
cp -av \
debugger.lua \
main.lua \
locale \
script \
meta \
%{buildroot}%{_datadir}/%{name}/
install -d -m 0755 %{buildroot}%{_bindir}
sed -e 's#@LIBDIR@#%{_libdir}#' %{SOURCE2} > %{buildroot}%{_bindir}/%{name}
chmod 0755 %{buildroot}%{_bindir}/%{name}
%fdupes %{buildroot}%{_libdir}/%{name}
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_libdir}/%{name}/
%{_datadir}/%{name}/
%changelog