SHA256
1
0
forked from pool/helix
helix/helix.spec

177 lines
5.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package helix
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
# Workaround for quilt to work
%if "x%{?rust_arches}" == "x"
%global rust_arches x86_64
%endif
%global _helix_runtimedir %{_libdir}/%{name}/runtime
Name: helix
- Update to version 23.05: * Features: - Add a config option to exclude declaration from LSP references request - Enable injecting languages based on their file extension and shebang - Sort the buffer picker by most recent access - Perform syntax highlighting in the picker asynchronously * Commands: - :update is now aliased as :u - Add extend_to_first_nonwhitespace which acts the same as goto_first_nonwhitespace but always extends - Add :clear-register for clearing the given register or all registers - Add :write-buffer-close and :write-buffer-close! * Fixes: - Normalize LSP workspace paths - Robustly handle invalid LSP ranges - Fix line number display for LSP goto pickers - Fix toggling of soft-wrap.enable option (#6656, 58e457a, #6742) - Handle workspace/configuration requests from stopped language servers - Fix possible crash from opening the jumplist picker - Fix theme preview returning to current theme on line and word deletions - Re-run crate build scripts on changes to revision and grammar repositories - Fix crash on opening from suspended state - Fix unwrap bug in DAP - Always build tree-sitter parsers with C++14 and C11 (#6792, #6834, #6845) - Exit with a non-zero statuscode when tree-sitter parser builds fail - Flip symbol range in LSP goto commands - Fix runtime toggling of the mouse option - Fix panic in inlay hint computation when view anchor is out of bounds - Significantly improve performance of git discovery on slow file systems - Downgrade gix log level to info - Conserve BOM and properly support saving UTF16 files - Correctly handle completion re-request - Fix offset encoding in LSP didChange notifications - Change gix logging level to info - Improve error message when writes fail because parent directories do not exist - Replace DAP variables popup instead of pushing more popups - Disable tree-sitter for files after parsing for 500ms - Fix crash when deleting with multiple cursors - Fix selection sliding when deleting forwards in append mode - Fix completion on paths containing spaces * CHANGELOG information is too large. For more info, go to https://github.com/helix-editor/helix/blob/master/CHANGELOG.md#2305-2023-05-18 OBS-URL: https://build.opensuse.org/package/show/editors/helix?expand=0&rev=66
2023-05-22 10:37:10 +02:00
Version: 23.05
Release: 0
Summary: A post-modern modal text editor written in Rust
- Update to version 22.03 * Breaking changes: - Select diagnostic range in goto_*_diag commands - Remove jump behavior from increment/decrement - Select change range in goto_*_change commands - Split file modification indicator from filename statusline elements - Jump to symbol ranges in LSP goto commands - Workspace detection now stops at the first .helix/ directory (merging multiple .helix/languages.toml configurations is no longer supported) * Features: - Dynamic workspace symbol picker - Soft-wrap - Initial support for LSP snippet completions - Add a statusline element for showing the current version control HEAD - Display LSP type hints - Enable the Kitty keyboard protocol on terminals with support - Add a statusline element for the basename of the current file - Add substring matching syntax for the picker - Support LSP textDocument/prepareRename - Allow multiple runtime directories with priorities - Allow configuring whether to insert or replace completions - Allow per-workspace config file .helix/config.toml - Add workspace-lsp-roots config option to support multiple LSP roots for use with monorepos * Commands: - :pipe-to which pipes selections into a shell command and ignores output - merge_consecutive_selections (A-_) combines all consecutive selections - rotate_view_reverse which focuses the previous view - goto_declaration (gD, requires LSP) which jumps to a symbol's declaration - file_picker_in_current_buffer_directory - :character-info which shows information about the character under the cursor - :toggle-option for toggling config options at runtime OBS-URL: https://build.opensuse.org/package/show/editors/helix?expand=0&rev=55
2023-04-06 11:38:59 +02:00
License: (Apache-2.0 OR MIT) AND BSD-3-Clause AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT or Unlicense) AND (Zlib OR Apache-2.0 OR MIT) AND Apache-2.0 AND BSL-1.0 AND ISC AND MIT AND MPL-2.0 AND Zlib AND MPL-2.0
URL: https://github.com/helix-editor/helix
# This tarball includes fetched grammars
- Update to version 22.03 * Breaking changes: - Select diagnostic range in goto_*_diag commands - Remove jump behavior from increment/decrement - Select change range in goto_*_change commands - Split file modification indicator from filename statusline elements - Jump to symbol ranges in LSP goto commands - Workspace detection now stops at the first .helix/ directory (merging multiple .helix/languages.toml configurations is no longer supported) * Features: - Dynamic workspace symbol picker - Soft-wrap - Initial support for LSP snippet completions - Add a statusline element for showing the current version control HEAD - Display LSP type hints - Enable the Kitty keyboard protocol on terminals with support - Add a statusline element for the basename of the current file - Add substring matching syntax for the picker - Support LSP textDocument/prepareRename - Allow multiple runtime directories with priorities - Allow configuring whether to insert or replace completions - Allow per-workspace config file .helix/config.toml - Add workspace-lsp-roots config option to support multiple LSP roots for use with monorepos * Commands: - :pipe-to which pipes selections into a shell command and ignores output - merge_consecutive_selections (A-_) combines all consecutive selections - rotate_view_reverse which focuses the previous view - goto_declaration (gD, requires LSP) which jumps to a symbol's declaration - file_picker_in_current_buffer_directory - :character-info which shows information about the character under the cursor - :toggle-option for toggling config options at runtime OBS-URL: https://build.opensuse.org/package/show/editors/helix?expand=0&rev=55
2023-04-06 11:38:59 +02:00
Source0: https://github.com/helix-editor/helix/releases/download/%{version}/%{name}-%{version}-source.tar.xz#/%{name}-%{version}.tar.xz
Source1: vendor.tar.xz
Source2: cargo_config
Source3: README-suse-maint.md
Source4: helix-rpmlintrc
BuildRequires: c++_compiler
BuildRequires: c_compiler
BuildRequires: cargo-packaging
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
Recommends: %{name}-runtime = %{version}
ExclusiveArch: %{rust_arches}
%description
A kakoune/neovim inspired modal text editor with built-in LSP and
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)
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)
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)
BuildArch: noarch
%description zsh-completion
Zsh command-line completion support for %{name}.
%package runtime
Summary: Runtime files for %{name}
Version: %{version}
Recommends: %{name}
%description runtime
Helix runtime files. Separated due to how huge the runtime files are.
The runtime contains tree-sitter and grammars that makes run helix normally
if there is no runtime present in the users config directory specifically
`XDG_CONFIG_HOME/helix`.
%prep
%autosetup -a1 -p1 -c -n %{name}-%{version}
mkdir -p .cargo
cp %{SOURCE2} .cargo/config.toml
# Remove shell definitions
sed -e '/^\#\!\/usr\/bin\/env .*/d' -i contrib/completion/hx.*
%build
export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=true
export TARGET="%_arch"
%{cargo_build}
cargo run --release -- --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 -d -m 0755 %{buildroot}%{_bindir}
install -d -m 0755 %{buildroot}%{_helix_runtimedir}
install -m 0755 target/release/hx %{buildroot}%{_libdir}/%{name}/hx
ln -sfv --relative "%{_libdir}/%{name}/hx" "%{buildroot}%{_bindir}/helix"
cp -av "runtime/queries" %{buildroot}%{_helix_runtimedir}
cp -av "runtime/themes" %{buildroot}%{_helix_runtimedir}
find "%{_builddir}/%{name}-%{version}/runtime/grammars" -type f -name '*.so' -exec \
install --verbose -Dm 755 {} -t "%{buildroot}%{_helix_runtimedir}/grammars" \;
install -Dm644 runtime/tutor -t %{buildroot}%{_helix_runtimedir}
# Not needed during runtime
rm -rfv %{buildroot}%{_helix_runtimedir}/grammars/sources
# Desktop application file
install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/Helix.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}
# Icon
install -Dm644 -T %{_builddir}/%{name}-%{version}/logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
# 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
%license LICENSE
%doc README.md CHANGELOG.md languages.toml docs/CONTRIBUTING.md docs/architecture.md docs/vision.md
%{_bindir}/%{name}
# Desktop application file
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/applications/*
%dir %{_libdir}/helix
# Tutor
%dir %{_helix_runtimedir}
%{_helix_runtimedir}/tutor
# Executable
%{_libdir}/%{name}/hx
%files runtime
# Runtimes and runtime files
# Grammars
%dir %{_helix_runtimedir}/grammars
%{_helix_runtimedir}/grammars/*
# Queries
%dir %{_helix_runtimedir}/queries
%{_helix_runtimedir}/queries/*
# Themes
%dir %{_helix_runtimedir}/themes
%{_helix_runtimedir}/themes/*
%files bash-completion
%{_datadir}/bash-completion/*
%files fish-completion
%dir %{_datadir}/fish
%{_datadir}/fish/*
%files zsh-completion
%dir %{_datadir}/zsh
%{_datadir}/zsh/*
%changelog