Update to version 5.1.1
This commit is contained in:
parent
f4251c6589
commit
e1266c4239
5 changed files with 84 additions and 64 deletions
|
|
@ -3,21 +3,22 @@
|
|||
%define pkg_name bash-language-server
|
||||
|
||||
Name: nodejs-bash-language-server
|
||||
Version: 4.10.0
|
||||
Release: 2%{?dist}
|
||||
Version: 5.1.1
|
||||
Release: 1%{?dist}
|
||||
Summary: A language server for Bash
|
||||
License: MIT
|
||||
Url: https://github.com/bash-lsp/bash-language-server
|
||||
Source0: %{url}/archive/server-%{version}/%{pkg_name}-%{version}.tar.gz
|
||||
# Create with `bash prepare_vendor.sh`
|
||||
Source1: %{pkg_name}-%{version}-vendor.tar.xz
|
||||
Source1: %{pkg_name}-%{version}-vendor.tar.zst
|
||||
# Create with: nodejs-packaging-bundler bash-language-server 5.1.1
|
||||
Source2: bash-language-server-%{version}-bundled-licenses.txt
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: nodejs-typescript
|
||||
BuildRequires: nodejs-packaging
|
||||
BuildRequires: nodejs-npm
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: rsync
|
||||
BuildRequires: yarnpkg
|
||||
BuildRequires: pnpm
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
Recommends: ShellCheck
|
||||
|
|
@ -29,21 +30,20 @@ Bash with explainshell integration.
|
|||
%prep
|
||||
%autosetup -n %{pkg_name}-server-%{version} -a1 -p1
|
||||
|
||||
cp %{SOURCE2} .
|
||||
|
||||
%build
|
||||
export YARN_CACHE_FOLDER="$(pwd)/.package-cache"
|
||||
yarn install --offline --frozen-lockfile
|
||||
pnpm install --offline --frozen-lockfile --store-dir="$(pwd)/.pnpm-store"
|
||||
|
||||
npm run compile
|
||||
|
||||
%install
|
||||
export YARN_CACHE_FOLDER="$(pwd)/.package-cache"
|
||||
|
||||
# Only install production dependencies in node_modules
|
||||
yarn install --production --offline --frozen-lockfile
|
||||
rm -rf node_modules/
|
||||
pnpm install --production --offline --frozen-lockfile --package-import-method copy --store-dir="$(pwd)/.pnpm-store"
|
||||
|
||||
for S in $(grep -l '#!.*node' \
|
||||
server/bin/* \
|
||||
server/node_modules/acorn/bin/* \
|
||||
server/out/cli.js \
|
||||
server/node_modules/ajv/scripts/* \
|
||||
server/node_modules/escodegen/bin/* \
|
||||
server/node_modules/esprima/bin/* \
|
||||
|
|
@ -53,43 +53,57 @@ for S in $(grep -l '#!.*node' \
|
|||
server/node_modules/uuid/bin/* \
|
||||
server/node_modules/vscode-languageserver/bin/* \
|
||||
) ; do
|
||||
SB="${S}.backup"
|
||||
cp ${S} ${SB}
|
||||
perl -p -i -e 's|#!/usr/bin/env node|#!%{_bindir}/node|g' $S
|
||||
diff -urN ${SB} ${S} || :
|
||||
rm ${SB}
|
||||
SB="${S}.backup"
|
||||
cp ${S} ${SB}
|
||||
perl -p -i -e 's|#!/usr/bin/env node|#!%{_bindir}/node|g' $S
|
||||
diff -urN ${SB} ${S} || :
|
||||
rm ${SB}
|
||||
done
|
||||
|
||||
install -d -m 0755 %{buildroot}%{_bindir}
|
||||
install -d -m 0755 %{buildroot}%{nodejs_sitelib}/%{pkg_name}/
|
||||
|
||||
cp -av server %{buildroot}%{nodejs_sitelib}/%{pkg_name}/
|
||||
cp -av node_modules %{buildroot}%{nodejs_sitelib}/%{pkg_name}/
|
||||
|
||||
install -d -m 0755 %{buildroot}%{_bindir}
|
||||
cat << EOF > %{buildroot}%{_bindir}/%{pkg_name}
|
||||
#!/bin/sh
|
||||
export NODE_ENV=production
|
||||
|
||||
exec /usr/bin/node %{nodejs_sitelib}/%{pkg_name}/out/cli.js "\$@"
|
||||
exec /usr/bin/node %{nodejs_sitelib}/%{pkg_name}/server/out/cli.js "\$@"
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_bindir}/%{pkg_name}
|
||||
|
||||
install -d -m 0755 %{buildroot}%{nodejs_sitelib}/%{pkg_name}/
|
||||
rsync -av server/ %{buildroot}%{nodejs_sitelib}/%{pkg_name}/
|
||||
|
||||
rm -rf %{buildroot}%{nodejs_sitelib}/%{pkg_name}/node_modules/performance-now/test/
|
||||
chmod 0644 %{buildroot}%{nodejs_sitelib}/%{pkg_name}/tree-sitter-bash.wasm \
|
||||
%{buildroot}%{nodejs_sitelib}/%{pkg_name}/node_modules/web-tree-sitter/tree-sitter.wasm
|
||||
|
||||
find %{buildroot}%{nodejs_sitelib}/%{pkg_name} -name "*.bak" -delete
|
||||
find %{buildroot}%{nodejs_sitelib}/%{pkg_name} -type f -name "\.*" -delete
|
||||
find %{buildroot}%{nodejs_sitelib}/%{pkg_name} -type d -name "\.bin" -print0 | xargs -0 rm -rf
|
||||
find %{buildroot}%{nodejs_sitelib}/%{pkg_name} -type d -name "\.github" -print0 | xargs -0 rm -rf
|
||||
|
||||
rm -rf %{buildroot}%{nodejs_sitelib}/%{pkg_name}/server/node_modules/ajv/scripts/
|
||||
rm -rf %{buildroot}%{nodejs_sitelib}/%{pkg_name}/server/node_modules/dashdash/etc/
|
||||
rm -rf %{buildroot}%{nodejs_sitelib}/%{pkg_name}/server/node_modules/performance-now/test/
|
||||
|
||||
rm %{buildroot}%{nodejs_sitelib}/%{pkg_name}/server/src/get-options.sh
|
||||
|
||||
# dangling symlinks
|
||||
rm %{buildroot}%{nodejs_sitelib}/%{pkg_name}/server/node_modules/@types/fuzzy-search
|
||||
rm %{buildroot}%{nodejs_sitelib}/%{pkg_name}/server/node_modules/@types/node-fetch
|
||||
rm %{buildroot}%{nodejs_sitelib}/%{pkg_name}/server/node_modules/@types/turndown
|
||||
rm %{buildroot}%{nodejs_sitelib}/%{pkg_name}/server/node_modules/@types/urijs
|
||||
|
||||
%fdupes %{buildroot}%{nodejs_sitelib}/%{pkg_name}
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%license LICENSE bash-language-server-%{version}-bundled-licenses.txt
|
||||
%doc README.md
|
||||
%{_bindir}/%{pkg_name}
|
||||
%{nodejs_sitelib}/%{pkg_name}/
|
||||
|
||||
%changelog
|
||||
* Tue Jan 02 2024 Andreas Schneider <asn@redhat.com> - 5.1.1-1
|
||||
- Update to version 5.1.1
|
||||
* https://github.com/bash-lsp/bash-language-server/blob/server-5.1.1/server/CHANGELOG.md
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue