Name:           nsxiv
Version:        29
Release:        3%{?dist}
Summary:        Neo (or New or Not) Simple (or small or suckless) X Image Viewer

License:        GPLv2+
URL:            https://github.com/%{name}/%{name}/
Source0:        https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz
Patch0:         https://patch-diff.githubusercontent.com/raw/nsxiv/nsxiv/pull/238.diff

BuildRequires:  binutils
BuildRequires:  coreutils
BuildRequires:  desktop-file-utils
BuildRequires:  gcc
BuildRequires:  giflib-devel
BuildRequires:  imlib2-devel
BuildRequires:  libexif-devel
BuildRequires:  libX11-devel
BuildRequires:  libXft-devel
BuildRequires:  libwebp-devel
BuildRequires:  make
BuildRequires:  sed
BuildRequires:  xorg-x11-proto-devel
BuildRequires:  git

%description
nsxiv is a fork of now unmaintained sxiv with the purpose of being a drop-in
replacement of sxiv, maintaining it and adding simple, sensible features. nsxiv
is free software licensed under GPLv2 and aims to be easy to modify and
customize.

nsxiv is an alternative to feh and qiv. Its only dependency besides xlib is
imlib2. The primary goal for writing nsxiv is to create an image viewer, which
only has the most basic features required for fast image viewing.  It works
nicely with tiling window managers and its code base should be kept small and
clean to make it easy for you to dig into it and customize it for your needs.


%prep
%autosetup


%build
# Set the required build flags for packaging
%set_build_flags
%make_build CFLAGS='%{build_cflags}'


%install
%make_install PREFIX='%{_prefix}' install-all

%files
%license LICENSE
%doc README.md CHANGELOG.md
%{_bindir}/%{name}
%{_mandir}/man1/*
%{_docdir}/%{name}/examples/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*


%changelog
* Thu Mar 3 2022 mamg22 <45301823+mamg22@users.noreply.github.com> - 29-3
- Fix build issues by using PR #237 patch

* Thu Mar 3 2022 mamg22 <45301823+mamg22@users.noreply.github.com> - 29-2
- Fix build issues on some fedora versions

* Thu Mar 3 2022 mamg22 <45301823+mamg22@users.noreply.github.com> - 29-1
- Update to v29

* Sun Dec 12 2021 mamg22 <45301823+mamg22@users.noreply.github.com> - 28-2
- Update package description

* Sun Dec 12 2021 mamg22 <45301823+mamg22@users.noreply.github.com> - 28-1
- Update to v28

* Wed Sep 22 2021 mamg22 <45301823+mamg22@users.noreply.github.com> - 27.1-1
- Initial release