File neovide.spec of Package neovide
#
# spec file for package neovide
#
# Copyright (c) 2024 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/
#
Name: neovide
Version: 0.13.1
Release: 0
Summary: No Nonsense Neovim Client in Rust
License: MIT
URL: https://neovide.dev/
# https://archlinux.org/packages/extra/x86_64/neovide/download/
Source0: https://github.com/neovide/neovide/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.zst
Source1: vendor.tar.zst
Source2: skia-binaries-532a0a24135b37b65b91-aarch64-unknown-linux-gnu-gl-textlayout.tar.gz
#BuildRequires: rust-packaging
BuildRequires: cargo-packaging
BuildRequires: rust+cargo
BuildRequires: zstd
BuildRequires: curl
BuildRequires: git
BuildRequires: openssl-devel libX11-devel
BuildRequires: python3
BuildRequires: fontconfig-devel Mesa-libGL-devel
BuildRequires: freetype2-devel libstdc++-devel
%description
No Nonsense Neovim Client in Rust
This is a simple graphical user interface for Neovim (an aggressively
refactored and updated Vim editor). Where possible there are some
graphical improvements, but functionally it should act like the terminal
UI.
To checkout all the cool features, installation instructions,
configuration settings and much more, head on over to neovide.dev.
%prep
%autosetup -p1 -a1
#cat >> .cargo/config <<EOF
#
#[source.vendored-sources]
#directory = "vendor"
#EOF
cat .cargo/config
#%ifarch aarch64 ppc ppc64 ppc64l
# ref=/usr/lib/rpm
# for s in guess sub; do
# for c in $(find -maxdepth 8 -name "config.$s"); do
# oldhash=$(sha256sum $c | cut -d' ' -f1)
# grep -q config-patches@ $c || continue
# grep -q aarch64 $c || install -m 755 $ref/config.$s $c
# grep -q ppc64le $c || install -m 755 $ref/config.$s $c
# grep -q 'riscv64[-:]' $c || install -m 755 $ref/config.$s $c
# newhash=$(sha256sum $c | cut -d' ' -f1)
# if [ x"$oldhash" != x"$newhash" ]; then
# find . -type f -name .cargo-checksum.json -exec sed -ine "s/$oldhash/$newhash/g" '{}' ';'
# fi
# done
# done\
#%endif
%build
export FORCE_SKIA_BINARIES_DOWNLOAD=true
export SKIA_BINARIES_URL=file://%{SOURCE2}
FORCE_SKIA_BINARIES_DOWNLOAD=true SKIA_BINARIES_URL=file://%{SOURCE2} %{cargo_build}
%install
%{cargo_install}
#{__install} -m 0755 -D -t %{buildroot}%{_bindir} usr/bin/neovide
#mkdir -p %{buildroot}%{_datadir}
#cp -r usr/share/icons %{buildroot}%{_datadir}
#cp -r usr/share/applications %{buildroot}%{_datadir}
%files
%license usr/share/licenses/neovide/LICENSE
%{_bindir}/neovide
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/16x16
%dir %{_datadir}/icons/hicolor/16x16/apps
%dir %{_datadir}/icons/hicolor/256x256
%dir %{_datadir}/icons/hicolor/256x256/apps
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/48x48
%dir %{_datadir}/icons/hicolor/48x48/apps
%{_datadir}/icons/hicolor/*/apps/neovide.png
%{_datadir}/applications/neovide.desktop
%changelog