Accepting request 906549 from home:gladiac

Add lua-language-server which could be use with neovim ...

OBS-URL: https://build.opensuse.org/request/show/906549
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-language-server?expand=0&rev=1
This commit is contained in:
2021-07-16 09:23:12 +00:00
committed by Git OBS Bridge
commit a6c6b5b3a6
8 changed files with 153 additions and 0 deletions

74
lua-language-server.spec Normal file
View File

@@ -0,0 +1,74 @@
#
# spec file for package lua-language-server
#
# 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 http://bugs.opensuse.org/
#
%define pkg_name lua-language-server
Name: lua-language-server
Version: 2.2.3
Release: 0
Summary: Lua Language Server coded by Lua
License: MIT
Url: https://github.com/sumneko/lua-language-server
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Source1: lua-lsp-launcher.sh
Source2: README.suse-maint.md
BuildRequires: gcc-c++
BuildRequires: ninja
BuildRequires: fdupes
%description
This package provides the lua-language-server.
%prep
%autosetup -p1
%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/Linux/* %{buildroot}%{_libdir}/%{name}
install -d -m 0755 %{buildroot}%{_datadir}/%{name}
cp -av \
main.lua \
platform.lua \
debugger.lua \
locale \
script \
meta \
%{buildroot}%{_datadir}/%{name}/
install -d -m 0755 %{buildroot}%{_bindir}
sed -e 's#@LIBDIR@#%{_libdir}#' %{SOURCE1} > %{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