%global git_date 20240220 %global git_hash 8f36d35 %global git_ver 4.5.0 %global rel 18 %global src_name %{name}-%{git_date}-%{git_hash}.tar.xz Name: imv Version: %{git_ver}^%{git_date}g%{git_hash} Release: %{rel}%{?dist} Summary: Image viewer for X11 and Wayland License: MIT URL: https://git.sr.ht/~exec64/imv Source0: %{url}/%{src_name} BuildRequires: asciidoc BuildRequires: desktop-file-utils BuildRequires: gcc BuildRequires: meson BuildRequires: pkgconfig(cmocka) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(icu-io) BuildRequires: pkgconfig(inih) BuildRequires: pkgconfig(pangocairo) BuildRequires: pkgconfig(xkbcommon) # wayland BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-egl) # x11 BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xkbcommon-x11) # backends BuildRequires: freeimage-devel BuildRequires: pkgconfig(librsvg-2.0) >= 2.44 BuildRequires: pkgconfig(libturbojpeg) BuildRequires: pkgconfig(libjxl) %description imv is a command line image viewer intended for use with tiling window managers. Features: - Native Wayland and X11 support - Support for dozens of image formats including: PNG, JPEG, animated GIFs, SVG, TIFF, various RAW formats, Photoshop PSD files - Configurable key bindings and behavior - Highly scriptable with IPC via imv-msg %prep %autosetup -n %{name} %build %meson \ -Dlibheif=disabled \ -Dlibnsgif=disabled\ -Dlibpng=disabled \ -Dlibtiff=disabled %meson_build %install %meson_install # install platform-specific manuals for manfile in %{name}-wayland.1 %{name}-x11.1; do ln -sf %{name}.1 %{buildroot}%{_mandir}/man1/$manfile done %check %meson_test desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %files %license LICENSE %doc README.md %config(noreplace) %{_sysconfdir}/%{name}_config %{_bindir}/%{name} %{_bindir}/%{name}-msg %{_bindir}/%{name}-wayland %{_bindir}/%{name}-x11 %{_bindir}/%{name}-dir %{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}-dir.desktop %{_mandir}/man1/%{name}* %{_mandir}/man5/%{name}* %changelog %autochangelog