alacritty/alacritty.spec
Avindra Goolcharan f8aedc78c4 Accepting request 850669 from home:MSirringhaus:branches:X11:terminals
- Update to 0.6.0
  Packaging
  * Minimum Rust version has been bumped to 1.43.0
  * The snapcraft.yaml file has been removed
  * Updated setab/setaf capabilities in alacritty-direct to use colons
  * WinPTY is now enabled only when targeting MSVC
  * Deprecated the WinPTY backend feature, disabling it by default
  Added
  * Secondary device attributes escape (CSI > 0 c)
  * Support for colon separated SGR 38/48
  * New Ctrl+C binding to cancel search and leave vi mode
  * Escapes for double underlines (CSI 4 : 2 m) and underline reset 
    (CSI 4 : 0 m)
  * Configuration file option for sourcing other files (import)
  * CLI parameter --option/-o to override any configuration field
  * Escape sequences to report text area size in pixels (CSI 14 t) and in 
    characters (CSI 18 t)
  * Support for single line terminals dimensions
  * Right clicking on Wayland's client side decorations will show application menu
  * Escape sequences to enable and disable window urgency hints 
    (CSI ? 1042 h, CSI ? 1042 l)
  Changed
  * Cursors are now inverted when their fixed color is similar to the 
    cell's background
  * Use the working directory of the terminal foreground process, 
    instead of the shell's working directory, for SpawnNewInstance action
  * Fallback to normal underline for unsupported underline types in CSI 4 : ? m escapes
  * The user's background color is now used as the foreground for the render timer
  * Use yellow/red from the config for error and warning messages instead of fixed colors
  * Existing CLI parameters are now passed to instances spawned using SpawnNewInstance

OBS-URL: https://build.opensuse.org/request/show/850669
OBS-URL: https://build.opensuse.org/package/show/X11:terminals/alacritty?expand=0&rev=31
2020-11-25 09:22:49 +00:00

127 lines
4.2 KiB
RPMSpec

#
# spec file for package alacritty
#
# Copyright (c) 2020 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/
#
# Use hardening ldflags.
%global rustflags "-Clink-arg=-Wl,-z,relro,-z,now"
Name: alacritty
Version: 0.6.0
Release: 0
Summary: A GPU-accelerated terminal emulator
License: Apache-2.0
URL: https://github.com/alacritty/alacritty/
Source: https://github.com/alacritty/alacritty/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.xz
Source2: cargo_config
Source3: README.suse-maint
BuildRequires: cargo
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: freetype-devel
BuildRequires: libxcb-devel
BuildRequires: pkgconfig
BuildRequires: rust >= 1.41.0
BuildRequires: update-desktop-files
BuildRequires: xclip
BuildRequires: pkgconfig(fontconfig)
%description
Alacritty is a terminal emulator written in Rust that leverages the GPU for
rendering.
%package bash-completion
Summary: Bash Completion for %{name}
Requires: bash-completion
Supplements: (%{name} and bash)
BuildArch: noarch
%description bash-completion
The official bash completion script for alacritty. It includes support
for every argument that can currently be passed to alacritty.
%package fish-completion
Summary: Fish Completion for %{name}
Supplements: (%{name} and fish)
BuildArch: noarch
%description fish-completion
The official fish completion script for alacritty.
%package zsh-completion
Summary: ZSH Completion for %{name}
Supplements: (%{name} and zsh)
BuildArch: noarch
%description zsh-completion
The official zsh completion script for alacritty.
%prep
%setup -qa1
mkdir .cargo
cp %{SOURCE2} .cargo/config
%ifarch aarch64 ppc64le
# Remove checksum of config.guess and config.sub since aarch64 and ppc64le modify them
sed -i 's#"expat/conftools/config.guess":"ebaffe1c6683ae2c3dcabb87825a83b892f00391514756f7640c4a3dcafbad4f",##g' ./vendor/expat-sys/.cargo-checksum.json
sed -i 's#"expat/conftools/config.sub":"523cb028db907d1fbbcecdcac6737f9e2eeba48fb639231dbc5ae69238f276c9",##g' ./vendor/expat-sys/.cargo-checksum.json
%endif
%build
RUSTFLAGS=%{rustflags} cargo build --release --bin alacritty
%install
mkdir -p "%{buildroot}%{_bindir}"
install -D -m 0755 target/release/alacritty %{buildroot}%{_bindir}/alacritty
# rm duplicate license and useless toml file
rm -fr %{buildroot}%{_datadir}
# install man page and completions
install -Dm 0644 extra/linux/Alacritty.desktop %{buildroot}/%{_datadir}/applications/Alacritty.desktop
install -Dm 0644 extra/logo/alacritty-simple.svg %{buildroot}/%{_datadir}/pixmaps/Alacritty.svg
install -Dm 0644 extra/linux/io.alacritty.Alacritty.appdata.xml \
%{buildroot}/%{_datadir}/appdata/io.alacritty.Alacritty.appdata.xml
install -Dm 0644 extra/%{name}.man %{buildroot}/%{_mandir}/man1/%{name}.1
install -Dm 0644 extra/completions/%{name}.bash %{buildroot}/%{_datadir}/bash-completion/completions/%{name}
install -Dm 0644 extra/completions/%{name}.fish %{buildroot}/%{_datadir}/fish/vendor_completions.d/%{name}.fish
install -Dm 0644 extra/completions/_%{name} %{buildroot}/%{_datadir}/zsh/site-functions/_%{name}
# install desktop file
%suse_update_desktop_file Alacritty
%fdupes %{buildroot}
%files
%license LICENSE-APACHE
%doc alacritty.yml CHANGELOG.md CONTRIBUTING.md README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}
%{_datadir}/applications/Alacritty.desktop
%{_datadir}/pixmaps/Alacritty.svg
%{_datadir}/appdata/io.alacritty.Alacritty.appdata.xml
%files bash-completion
%{_datadir}/bash-completion
%files fish-completion
%{_datadir}/fish
%files zsh-completion
%{_datadir}/zsh
%changelog