Blob Blame History Raw
%define upstreamversion 1.0alpha2

Summary: Image browser and viewer
Name: geeqie
Version: 1.0
Release: 0.6.alpha2%{?dist}
License: GPLv3
Group: User Interface/X
Source: http://dl.sf.net/sourceforge/geeqie/%{name}-%{upstreamversion}.tar.gz
Patch1: geeqie-1.0alpha2-desktop.patch
Patch2: geeqie-1.0alpha2-editors.patch
# bz 222639
Patch3: geeqie-1.0alpha1-print-pagesize.patch
Patch4: geeqie-1.0alpha2-gcc-warn.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
URL: http://geeqie.sourceforge.net/
BuildRequires: gtk2-devel >= 2.4.0
BuildRequires: lcms-devel
BuildRequires: exiv2-devel
BuildRequires: lirc-devel
BuildRequires: gettext desktop-file-utils

# Something for the future:
# Replace GQView last stable release in Fedora space,
# plus allow for it to return if a higher version.
# Stalled upstream GQView development is at 2.1.5.
#Obsoletes: gqview <= 2.0.4

%description
*** This software is currently in alpha state ***

Geeqie has been forked from the GQview project with the goal of picking up
development and integrating patches. It is an image viewer for browsing
through graphics files. Its many features include single click file
viewing, support for external editors, previewing images using thumbnails,
and zoom.


%prep
%setup -q -n %{name}-%{upstreamversion}
%patch1 -p1 -b .desktop
%patch2 -p1 -b .editors
%patch3 -p1 -b .print-pagesize
%patch4 -p1 -b .gcc-warn


%build
%configure --enable-lirc
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p" install

# We want these _docdir files in GQ_HELPDIR.
install -p -m 0644 AUTHORS COPYING NEWS README* TODO \
    ${RPM_BUILD_ROOT}%{_datadir}/doc/%{name}-%{upstreamversion}
rm -f ${RPM_BUILD_ROOT}%{_datadir}/doc/%{name}-%{upstreamversion}/ChangeLog

[ ! -f ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop ] && exit 1
desktop-file-install \
    --delete-original \
    --vendor fedora \
    --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
    ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop

%find_lang %name


%clean
rm -rf $RPM_BUILD_ROOT


%post
update-desktop-database &> /dev/null || :


%postun
update-desktop-database &> /dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc %{_datadir}/doc/%{name}*
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/fedora-%{name}.desktop


%changelog
* Thu Jul 31 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 1.0-0.6.alpha2
- update to 1.0alpha2 (now GPLv3)
- build with new LIRC support

* Wed Jun 25 2008 Rex Dieter <rdieter@fedoraproject.org> - 1.0-0.5.alpha1 
- respin for exiv2

* Thu May  8 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 1.0-0.4.alpha1
- scriptlets: run update-desktop-database without path
- drop dependency on desktop-file-utils
- drop ChangeLog file as it's too low-level

* Fri Apr 25 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 1.0-0.3.alpha1
- package GQview fork "geeqie 1.0alpha1" based on Fedora gqview.spec
- BR lcms-devel exiv2-devel
- update -desktop and -editors patch
- update spec file with more dir macros