%define debug_package	%{nil}
%global sha 2e94ce4

Summary:	Framebuffer image viewer
Name:		fbv
Version:	1.0b
Release:	5%{?dist}
License:	GPLv2+
Group:		Graphical desktop/Other
Url:		http://s-tech.elsat.net.pl/fbv
Source0:	http://s-tech.elsat.net.pl/fbv/%{name}-%{version}.tar.gz
#Source0:	https://repo.or.cz/fbv.git/snapshot/%%{sha}.tar.gz
Patch1: fbv-1.0b-features.h.patch
Patch2: fbv-nfbv.diff

BuildRequires:	giflib-devel
BuildRequires:	pkgconfig(libjpeg)
BuildRequires:	pkgconfig(libpng)
BuildRequires:	pkgconfig(x11)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	gcc
BuildRequires:  make

%description
A simple program to view pictures on a framebuffer console. It
supports PNG, JPEG, GIF and BMP files.

%prep
%autosetup -p1

rm -f resize.o
iconv -f iso8859-1 -t utf-8 ChangeLog > ChangeLog.conv && \
	mv -f ChangeLog.conv ChangeLog || true

%build
export CC=gcc

./configure --prefix=%{_prefix} --mandir=%{_mandir}
%make_build

%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/man1

%make_install

%files
%doc ChangeLog README TODO
%{_bindir}/*
%{_mandir}/man1/*