File wezterm.spec of Package wezterm
#
# spec file for package wezterm
#
# 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/
#
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
Name: wezterm
Version: 20230712072601f4abf8fd
Release: 0
Summary: A GPU-accelerated cross-platform terminal emulator and multiplexer
License: MIT
URL: https://github.com/wez/wezterm
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.zst
Source2: cargo_config
BuildRequires: cargo-packaging
BuildRequires: gcc-c++
BuildRequires: perl
BuildRequires: wayland-devel
BuildRequires: xcb-util-wm-devel
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcb-util)
BuildRequires: pkgconfig(xcb-image)
BuildRequires: pkgconfig(xcb-keysyms)
BuildRequires: pkgconfig(xkbcommon-x11)
%description
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
%prep
%setup -qa1
cp %{SOURCE2} .cargo/config
%build
RUSTFLAGS=%{rustflags} cargo build --release
%install
install -Dsm755 target/release/wezterm %{buildroot}%{_bindir}/wezterm
install -Dsm755 target/release/wezterm-gui %{buildroot}%{_bindir}/wezterm-gui
install -Dsm755 target/release/wezterm-mux-server %{buildroot}%{_bindir}/wezterm-mux-server
install -Dsm755 target/release/strip-ansi-escapes %{buildroot}%{_bindir}/strip-ansi-escapes
install -Dm644 assets/icon/terminal.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
install -Dm644 assets/wezterm.desktop %{buildroot}%{_datadir}/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml %{buildroot}%{_datadir}/metainfo/org.wezfurlong.wezterm.appdata.xml
install -Dm644 LICENSE.md -t %{buildroot}%{_datadir}/licenses/%{name}
%files
%license LICENSE.md
%doc README.md
%{_bindir}/%{name}
%{_bindir}/%{name}-gui
%{_bindir}/%{name}-mux-server
%{_bindir}/strip-ansi-escapes
%{_datadir}/icons/hicolor
%{_datadir}/icons/*/*/*/
%{_datadir}/applications/*.desktop
%{_datadir}/metainfo/*.appdata.xml
%changelog