forked from pool/helix
- Add shell completions for bash, fish and zsh.
- Add desktop application entry and icon. OBS-URL: https://build.opensuse.org/package/show/editors/helix?expand=0&rev=36
This commit is contained in:
parent
e9d4f4b030
commit
55d759f4a3
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Oct 15 10:16:46 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
|
||||||
|
|
||||||
|
- Add shell completions for bash, fish and zsh.
|
||||||
|
- Add desktop application entry and icon.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 15 00:35:16 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
|
Thu Sep 15 00:35:16 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
|
||||||
|
|
||||||
|
66
helix.spec
66
helix.spec
@ -39,6 +39,36 @@ ExclusiveArch: %{rust_arches}
|
|||||||
A kakoune/neovim inspired modal text editor with built-in LSP and
|
A kakoune/neovim inspired modal text editor with built-in LSP and
|
||||||
has treesitter support for syntax highlighting and improved navigation
|
has treesitter support for syntax highlighting and improved navigation
|
||||||
|
|
||||||
|
%package bash-completion
|
||||||
|
Summary: Bash Completion for %{name}
|
||||||
|
Group: System/Shells
|
||||||
|
Supplements: (%{name} and bash-completion)
|
||||||
|
Requires: bash-completion
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description bash-completion
|
||||||
|
Bash command-line completion support for %{name}.
|
||||||
|
|
||||||
|
%package fish-completion
|
||||||
|
Summary: Fish Completion for %{name}
|
||||||
|
Group: System/Shells
|
||||||
|
Supplements: (%{name} and fish)
|
||||||
|
Requires: fish
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description fish-completion
|
||||||
|
Fish command-line completion support for %{name}.
|
||||||
|
|
||||||
|
%package zsh-completion
|
||||||
|
Summary: Zsh Completion for %{name}
|
||||||
|
Group: System/Shells
|
||||||
|
Supplements: (%{name} and zsh)
|
||||||
|
Requires: zsh
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description zsh-completion
|
||||||
|
Zsh command-line completion support for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -a1 -c -n %{name}-%{version}
|
%autosetup -a1 -c -n %{name}-%{version}
|
||||||
mkdir -p .cargo
|
mkdir -p .cargo
|
||||||
@ -59,6 +89,12 @@ export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=true
|
|||||||
%{cargo_build}
|
%{cargo_build}
|
||||||
HELIX_RUNTIME="$PWD/runtime" ./target/release/hx --grammar build
|
HELIX_RUNTIME="$PWD/runtime" ./target/release/hx --grammar build
|
||||||
|
|
||||||
|
# Shell completions
|
||||||
|
sed -i "s|hx|helix|g" contrib/completion/hx.*
|
||||||
|
|
||||||
|
# Desktop file
|
||||||
|
sed -i "s|hx|helix|g" contrib/Helix.desktop
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_libdir}/%{name}
|
mkdir -p %{buildroot}%{_libdir}/%{name}
|
||||||
mkdir -p %{buildroot}%{_helix_runtimedir}
|
mkdir -p %{buildroot}%{_helix_runtimedir}
|
||||||
@ -72,14 +108,33 @@ ln -sv %{_helix_runtimedir} %{buildroot}%{_libdir}/%{name}/runtime
|
|||||||
install -D -d -m 0755 %{buildroot}%{_bindir}
|
install -D -d -m 0755 %{buildroot}%{_bindir}
|
||||||
ln -sv %{_libdir}/%{name}/hx %{buildroot}%{_bindir}/%{name}
|
ln -sv %{_libdir}/%{name}/hx %{buildroot}%{_bindir}/%{name}
|
||||||
|
|
||||||
|
# Desktop application file
|
||||||
|
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/Helix.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||||
|
|
||||||
|
# Icon
|
||||||
|
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||||
|
|
||||||
|
# Shell completions
|
||||||
|
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/completion/hx.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name}
|
||||||
|
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/completion/hx.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
|
||||||
|
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/completion/hx.zsh %{buildroot}%{_datadir}/zsh/site-functions/_%{name}
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md CHANGELOG.md languages.toml docs/CONTRIBUTING.md docs/architecture.md docs/vision.md
|
%doc README.md CHANGELOG.md languages.toml docs/CONTRIBUTING.md docs/architecture.md docs/vision.md
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
|
|
||||||
|
# Desktop application file
|
||||||
|
%{_datadir}/pixmaps/*
|
||||||
|
%{_datadir}/applications/*
|
||||||
|
|
||||||
# hx symlinked as helix
|
# hx symlinked as helix
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
|
|
||||||
# The real hx binary
|
# The real hx binary
|
||||||
%{_libdir}/%{name}/hx
|
%{_libdir}/%{name}/hx
|
||||||
|
|
||||||
# Tutor
|
# Tutor
|
||||||
%{_helix_runtimedir}/tutor.txt
|
%{_helix_runtimedir}/tutor.txt
|
||||||
|
|
||||||
@ -103,4 +158,15 @@ ln -sv %{_libdir}/%{name}/hx %{buildroot}%{_bindir}/%{name}
|
|||||||
# Symlinked runtime directory
|
# Symlinked runtime directory
|
||||||
%{_libdir}/%{name}/runtime
|
%{_libdir}/%{name}/runtime
|
||||||
|
|
||||||
|
%files bash-completion
|
||||||
|
%{_datadir}/bash-completion/*
|
||||||
|
|
||||||
|
%files fish-completion
|
||||||
|
%dir %{_datadir}/fish
|
||||||
|
%{_datadir}/fish/*
|
||||||
|
|
||||||
|
%files zsh-completion
|
||||||
|
%dir %{_datadir}/zsh
|
||||||
|
%{_datadir}/zsh/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user