# To update this package you have to do it in a sequence # # 1. Update Version to the latest release # 2. Go in to the SOURCES directory and run script in Source100: pack-cargo-vendor.sh # 3. Build or send to the Build System # # 2019-12-08 - kekepower %if 0%{!?_iconsdir:1} %define _iconsdir %{_datarootdir}/icons %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif # They usually say in the changelog on Github if this dep is updated. Change accordingly. %define min_rust_ver 1.74.0 %define rel 1 #define prerel rc3 Name: alacritty Version: 0.14.0 Release: %mkrel 1 Summary: A cross-platform, GPU-accelerated terminal emulator Group: Terminals License: ASL 2.0 URL: https://github.com/jwilm/alacritty Source0: https://github.com/jwilm/alacritty/archive/v%{version}%{?prerel:-%{prerel}}/%{name}-%{version}%{?prerel:-%{prerel}}.tar.gz # Comment out Source1 before syncing Source0 to avoid an error message Source1: %{name}-cargo-vendor-%{version}%{?prerel:-%{prerel}}.tar.xz Source4: https://github.com/jwilm/alacritty/releases/download/v%{version}/Alacritty.svg # This is the script that creates the Source1 tar-ball needed to build without net access. Source100: pack-cargo-vendor.sh BuildRequires: cargo >= %{min_rust_ver} BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xkbcommon) BuildRequires: desktop-file-utils BuildRequires: pkgconfig(scdoc) Requires(post): ncurses Requires(post): ncurses-extraterms Recommends: tmux %description Alacritty is focused on simplicity and performance. The performance goal means it should be faster than any other terminal emulator available. The simplicity goal means that it doesn't have features such as tabs or splits (which can be better provided by a window manager or terminal multiplexer) nor niceties like a GUI config editor. The software is considered to be at an alpha level of readiness - there are missing features and bugs to be fixed, but it is already used by many on a daily basis. %package zsh-completion Summary: A cross-platform, GPU-accelerated terminal emulator Group: Terminals BuildArch: noarch Requires: zsh Requires: %{name} >= %{version}-%{release} %description zsh-completion This is the shell completion for ZSH. %package bash-completion Summary: A cross-platform, GPU-accelerated terminal emulator Group: Terminals BuildArch: noarch Requires: bash Requires: %{name} >= %{version}-%{release} %description bash-completion This is the shell completion for BASH. %package fish-completion Summary: A cross-platform, GPU-accelerated terminal emulator Group: Terminals BuildArch: noarch Requires: fish Requires: %{name} >= %{version}-%{release} %description fish-completion This is the shell completion for FISH. %package docs Summary: A cross-platform, GPU-accelerated terminal emulator Group: Terminals BuildArch: noarch Requires: %{name} >= %{version}-%{release} %description docs The documentation for %{name}. %prep %autosetup -a1 -p1 %{?prerel:-n %{name}-%{version}-%{prerel}} %if 0 pushd ${HOME} tar xf %{S:5} tar xf %{S:6} popd %endif %build cargo build --release --verbose cargo doc --verbose pushd extra/man scdoc < alacritty-bindings.5.scd > alacritty-bindings.5 scdoc < alacritty-msg.1.scd > alacritty-msg.1 scdoc < alacritty.1.scd > alacritty.1 scdoc < alacritty.5.scd > alacritty.5 popd %install %__mkdir_p %{buildroot}%{_bindir} %__mkdir_p %{buildroot}%{_datadir}/applications %__mkdir_p %{buildroot}%{_iconsdir} %__mkdir_p %{buildroot}%{_datadir}/pixmaps %__install -Dm 0755 extra/logo/*svg %{buildroot}%{_iconsdir}/ %__install -Dm 0755 %{S:4} %{buildroot}%{_datadir}/pixmaps/ %__install -Dm 0755 target/release/%{name} %{buildroot}%{_bindir}/%{name} desktop-file-install extra/linux/Alacritty.desktop \ --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/Alacritty.desktop # Shell completions %__mkdir_p %{buildroot}%{_datadir}/zsh/site-functions/ %__mkdir_p %{buildroot}%{_datadir}/bash-completion/completions/ %__mkdir_p %{buildroot}%{_datadir}/fish/completions/ %__mkdir_p %{buildroot}%{_mandir}/man1 %__mkdir_p %{buildroot}%{_docdir}/%{name} cp extra/completions/_%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name} cp extra/completions/%{name}.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name} cp extra/completions/%{name}.fish %{buildroot}%{_datadir}/fish/completions/%{name}.fish %__install -Dm 0644 extra/%{name}.info %{buildroot}%{_docdir}/%{name}/%{name}.info %__install -Dm 0644 extra/man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %__install -Dm 0644 extra/man/%{name}-msg.1 %{buildroot}%{_mandir}/man1/%{name}-msg.1 %__install -Dm 0644 extra/man/%{name}-bindings.5 %{buildroot}%{_mandir}/man5/%{name}-bindings.5 %__install -Dm 0644 extra/man/%{name}.5 %{buildroot}%{_mandir}/man5/%{name}.5 rm -vf %{buildroot}%{_prefix}/.crates.toml %post echo " Adding %{name} info to terminfo" tic -e alacritty,alacritty-direct %{_docdir}/%{name}/%{name}.info > /dev/null 2>&1 %files %license LICENSE-APACHE %doc README.md CONTRIBUTING.md %{_bindir}/%{name} %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/Alacritty.svg %{_docdir}/%{name}/%{name}.info %{_iconsdir}/%{name}*svg %{_mandir}/ %files bash-completion %{_datadir}/bash-completion/completions/%{name} %files fish-completion %{_datadir}/fish/completions/%{name}.fish %files zsh-completion %{_datadir}/zsh/site-functions/_%{name} %files docs %doc target/doc/alacritty/ %changelog * Mon Jul 29 2024 kb - Install the man pages (typo in the Mageia SPEC file: %{mandir} instead of %{_mandir}.