Blame alacritty.spec

Bernhard M. Wiedemann 96715b
#
Bernhard M. Wiedemann 96715b
# spec file for package alacritty
Bernhard M. Wiedemann 96715b
#
Bernhard M. Wiedemann 9eca6d
# Copyright (c) 2024 SUSE LLC
Bernhard M. Wiedemann 96715b
#
Bernhard M. Wiedemann 96715b
# All modifications and additions to the file contributed by third parties
Bernhard M. Wiedemann 96715b
# remain the property of their copyright owners, unless otherwise agreed
Bernhard M. Wiedemann 96715b
# upon. The license for this file, and modifications and additions to the
Bernhard M. Wiedemann 96715b
# file, is the same license as for the pristine package itself (unless the
Bernhard M. Wiedemann 96715b
# license for the pristine package is not an Open Source License, in which
Bernhard M. Wiedemann 96715b
# case the license is the MIT License). An "Open Source License" is a
Bernhard M. Wiedemann 96715b
# license that conforms to the Open Source Definition (Version 1.9)
Bernhard M. Wiedemann 96715b
# published by the Open Source Initiative.
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
# Please submit bugfixes or comments via https://bugs.opensuse.org/
Bernhard M. Wiedemann 96715b
#
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
Name:           alacritty
Bernhard M. Wiedemann 9eca6d
Version:        0.13.1
Bernhard M. Wiedemann 96715b
Release:        0
Bernhard M. Wiedemann 96715b
Summary:        A GPU-accelerated terminal emulator
Bernhard M. Wiedemann 96715b
License:        Apache-2.0
3afa1e
URL:            https://github.com/alacritty/alacritty
3afa1e
Source0:        %{name}-%{version}.tar.xz
Bernhard M. Wiedemann 96715b
Source1:        vendor.tar.xz
Bernhard M. Wiedemann d3c34b
Source3:        README.suse-maint
b33d2a
BuildRequires:  cargo-packaging
Bernhard M. Wiedemann 96715b
BuildRequires:  cmake
Bernhard M. Wiedemann 96715b
BuildRequires:  fdupes
66b20f
BuildRequires:  freetype2-devel
Bernhard M. Wiedemann 96715b
BuildRequires:  libxcb-devel
bc2442
BuildRequires:  libxkbcommon-devel
Bernhard M. Wiedemann 96715b
BuildRequires:  pkgconfig
Bernhard M. Wiedemann 9eca6d
BuildRequires:  scdoc
Bernhard M. Wiedemann 96715b
BuildRequires:  update-desktop-files
Bernhard M. Wiedemann 96715b
BuildRequires:  xclip
Bernhard M. Wiedemann 96715b
BuildRequires:  pkgconfig(fontconfig)
dc5164
Suggests:       terminfo
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%description
Bernhard M. Wiedemann 96715b
Alacritty is a terminal emulator written in Rust that leverages the GPU for
Bernhard M. Wiedemann 96715b
rendering.
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%package bash-completion
Bernhard M. Wiedemann 96715b
Summary:        Bash Completion for %{name}
Bernhard M. Wiedemann 96715b
Requires:       bash-completion
Bernhard M. Wiedemann 59ab8d
Supplements:    (%{name} and bash)
Bernhard M. Wiedemann 96715b
BuildArch:      noarch
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%description bash-completion
Bernhard M. Wiedemann 96715b
The official bash completion script for alacritty. It includes support
Bernhard M. Wiedemann 96715b
for every argument that can currently be passed to alacritty.
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%package fish-completion
Bernhard M. Wiedemann 96715b
Summary:        Fish Completion for %{name}
Bernhard M. Wiedemann 59ab8d
Supplements:    (%{name} and fish)
Bernhard M. Wiedemann 96715b
BuildArch:      noarch
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%description fish-completion
Bernhard M. Wiedemann 96715b
The official fish completion script for alacritty.
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%package zsh-completion
Bernhard M. Wiedemann 96715b
Summary:        ZSH Completion for %{name}
Bernhard M. Wiedemann 59ab8d
Supplements:    (%{name} and zsh)
Bernhard M. Wiedemann 96715b
BuildArch:      noarch
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%description zsh-completion
Bernhard M. Wiedemann 96715b
The official zsh completion script for alacritty.
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%prep
3afa1e
%autosetup -a1
Bernhard M. Wiedemann 96715b
c056d0
%ifarch aarch64 ppc64le riscv64
c056d0
# Remove checksum of config.guess and config.sub since aarch64 and ppc64le modify them
c056d0
sed -i 's#"expat/conftools/config.guess":"ebaffe1c6683ae2c3dcabb87825a83b892f00391514756f7640c4a3dcafbad4f",##g' ./vendor/expat-sys/.cargo-checksum.json
c056d0
sed -i 's#"expat/conftools/config.sub":"523cb028db907d1fbbcecdcac6737f9e2eeba48fb639231dbc5ae69238f276c9",##g' ./vendor/expat-sys/.cargo-checksum.json
c056d0
%endif
c056d0
%ifarch riscv64
c056d0
sed -i -e 's#"config.guess":"e0c1d7ef8ce964fb57c35e7704ae8661d7e4ca87d6a3c18950e503ae26b62319",##' -e 's#"config.sub":"f7e62c3cb15cd5bbc4e7f3617793b227481fc554d39697a9c322a266d20fb626",##' vendor/servo-fontconfig-sys/.cargo-checksum.json
c056d0
%endif
c056d0
Bernhard M. Wiedemann 96715b
%build
dc5164
%{cargo_build}
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%install
Bernhard M. Wiedemann d3c34b
mkdir -p "%{buildroot}%{_bindir}"
Bernhard M. Wiedemann d3c34b
install -D -m 0755 target/release/alacritty %{buildroot}%{_bindir}/alacritty
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
# rm duplicate license and useless toml file
Bernhard M. Wiedemann 96715b
rm -fr %{buildroot}%{_datadir}
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 9eca6d
# install completions
dc5164
install -Dm 0644 extra/linux/Alacritty.desktop \
dc5164
    %{buildroot}/%{_datadir}/applications/Alacritty.desktop
dc5164
install -Dm 0644 extra/logo/alacritty-simple.svg \
dc5164
    %{buildroot}/%{_datadir}/pixmaps/Alacritty.svg
875ad9
install -Dm 0644 extra/linux/org.alacritty.Alacritty.appdata.xml \
dc5164
    %{buildroot}/%{_datadir}/appdata/org.alacritty.Alacritty.appdata.xml
dc5164
install -Dm 0644 extra/completions/%{name}.bash \
dc5164
    %{buildroot}/%{_datadir}/bash-completion/completions/%{name}
dc5164
install -Dm 0644 extra/completions/%{name}.fish \
dc5164
    %{buildroot}/%{_datadir}/fish/vendor_completions.d/%{name}.fish
dc5164
install -Dm 0644 extra/completions/_%{name} \
dc5164
    %{buildroot}/%{_datadir}/zsh/site-functions/_%{name}
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 9eca6d
# build and install manpages
Bernhard M. Wiedemann 9eca6d
mkdir -p %{buildroot}%{_mandir}/man{1,5}
Bernhard M. Wiedemann 9eca6d
scdoc < extra/man/%{name}.1.scd > %{buildroot}%{_mandir}/man1/%{name}.1
Bernhard M. Wiedemann 9eca6d
scdoc < extra/man/%{name}-msg.1.scd > %{buildroot}%{_mandir}/man1/%{name}-msg.1
Bernhard M. Wiedemann 9eca6d
scdoc < extra/man/%{name}.5.scd > %{buildroot}%{_mandir}/man5/%{name}.5
Bernhard M. Wiedemann 9eca6d
scdoc < extra/man/%{name}-bindings.5.scd > %{buildroot}%{_mandir}/man5/%{name}-bindings.5
Bernhard M. Wiedemann 9eca6d
Bernhard M. Wiedemann 96715b
# install desktop file
Bernhard M. Wiedemann 96715b
%suse_update_desktop_file Alacritty
Bernhard M. Wiedemann 96715b
dc5164
%fdupes %{buildroot}%{_datadir}
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%files
Bernhard M. Wiedemann 96715b
%license LICENSE-APACHE
Bernhard M. Wiedemann 9eca6d
%doc CHANGELOG.md CONTRIBUTING.md README.md
Bernhard M. Wiedemann 96715b
%{_bindir}/%{name}
Bernhard M. Wiedemann 96715b
%{_mandir}/man1/%{name}.1%{?ext_man}
Bernhard M. Wiedemann 9eca6d
%{_mandir}/man1/%{name}-msg.1%{?ext_man}
Bernhard M. Wiedemann 9eca6d
%{_mandir}/man5/%{name}.5%{?ext_man}
Bernhard M. Wiedemann 9eca6d
%{_mandir}/man5/%{name}-bindings.5%{?ext_man}
Bernhard M. Wiedemann 96715b
%{_datadir}/applications/Alacritty.desktop
Bernhard M. Wiedemann d3c34b
%{_datadir}/pixmaps/Alacritty.svg
875ad9
%{_datadir}/appdata/org.alacritty.Alacritty.appdata.xml
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%files bash-completion
Bernhard M. Wiedemann 96715b
%{_datadir}/bash-completion
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%files fish-completion
Bernhard M. Wiedemann 96715b
%{_datadir}/fish
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%files zsh-completion
Bernhard M. Wiedemann 96715b
%{_datadir}/zsh
Bernhard M. Wiedemann 96715b
Bernhard M. Wiedemann 96715b
%changelog