# Based on the work from OpenSUSE # https://build.opensuse.org/package/show/home:mcepl:neovim/neovim-gtk %define binname nvim-gtk %define date 20190512 %define gitmaster 1 %if 0%{?gitmaster} %define srcdir %{name}-master %define pkgrel %mkrel -c %{?date:git%{date}} %rel %else %define srcdir %{name}-%{version} %define pkgrel %mkrel %rel %endif %define rel 1 Name: neovim-gtk Version: 0.2.0 Release: %pkgrel Summary: GTK UI for Neovim License: GPLv3 Group: Editors Url: https://github.com/daa84/neovim-gtk Source0: https://github.com/daa84/neovim-gtk/archive/master/%{name}-%{version}%{?date:-%{date}}.tar.gz # To generate this file, you need cargo-vendor # To install: urpmi cargo-vendor Source1: neovim-gtk-cargo-vendor%{?date:-%{date}}.tar.xz # Then run this file Source100: pack-cargo-vendor.sh BuildRequires: cargo BuildRequires: pango-devel BuildRequires: gtk3-devel BuildRequires: hicolor-icon-theme ExcludeArch: aarch64 %{arm} Requires: neovim Requires: gsettings-desktop-schemas %description GTK UI for Neovim written in Rust using gtk-rs bindings. With ligatures support. %package docs Summary: GTK UI for Neovim Group: Editors BuildArch: noarch %description docs GTK UI for Neovim written in Rust using gtk-rs bindings. With ligatures support. This package contains documentation for %{name}. %prep %autosetup -n %{srcdir} -a1 %__mkdir .cargo cat >.cargo/config <<EOF [source.crates-io] replace-with = "vendored-sources" [source.vendored-sources] directory = "./vendor" EOF %build cargo build --verbose cargo doc --verbose %install mkdir -p %{buildroot}%{_datadir}/%{binname}/ cp -p -r runtime %{buildroot}%{_datadir}/%{binname}/ install -p -m 0644 -D desktop/org.daa.NeovimGtk.desktop \ %{buildroot}%{_datadir}/applications/org.daa.NeovimGtk.desktop install -p -m 0644 -D desktop/org.daa.NeovimGtk_128.png \ %{buildroot}%{_iconsdir}/hicolor/128x128/apps/org.daa.NeovimGtk.png install -p -m 0644 -D desktop/org.daa.NeovimGtk_48.png \ %{buildroot}%{_iconsdir}/hicolor/48x48/apps/org.daa.NeovimGtk.png install -p -m 0644 -D desktop/org.daa.NeovimGtk.svg \ %{buildroot}%{_iconsdir}/hicolor/scalable/apps/org.daa.NeovimGtk.svg install -p -m 0644 -D desktop/org.daa.NeovimGtk-symbolic.svg \ %{buildroot}%{_iconsdir}/hicolor/symbolic/apps/org.daa.NeovimGtk-symbolic.svg install -p -m 0755 -D target/debug/nvim-gtk \ %{buildroot}%{_bindir}/nvim-gtk rm -vf %{buildroot}%{_prefix}/.crates.toml %check RUST_BACKTRACE=1 cargo test %files %license LICENSE %doc README.md %{_bindir}/%{binname} %{_datadir}/%{binname} %{_iconsdir}/hicolor/*/apps/* %{_datadir}/applications/org.daa.NeovimGtk.desktop %files docs %doc target/doc %changelog * Mon May 13 2019 kekepower <kekepower> 0.2.0-0.git20190512.1.mga7 + Revision: 1397521 - Update to latest git master, git20190512 * Sat May 11 2019 kekepower <kekepower> 0.2.0-0.git20190508.1.mga7 + Revision: 1397292 - Update to release 20190508 * Sun Apr 21 2019 kekepower <kekepower> 0.2.0-0.git20190421.1.mga7 + Revision: 1394320 - Update to release 0.2.0-0.git20190421 * Mon Jan 21 2019 kekepower <kekepower> 0.2.0-0.git20190121.1.mga7 + Revision: 1358936 - Don't compile in release mode to get debugging info - Update to release git20190121 - Update to release git20190118 * Sun Nov 25 2018 kekepower <kekepower> 0.2.0-0.git20181118.2.mga7 + Revision: 1334499 - Bump rel - ExcludeArch aarch64 %%{arm} - Add Cargoe Vendor sources - Verbose output of compilation - imported package neovim-gtk