Blob Blame History Raw
Summary:   Picture viewer
Name:      xzgv
Version:   0.9
Release:   1%{?dist}
License:   GPLv2+
Group:     Applications/Multimedia
Source:    http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch:     xzgv-0.9-svn-r35.patch
Patch1:    xzgv-0.9-fix-doc-install.patch
URL:       http://sourceforge.net/projects/xzgv/
Requires:  xterm gnome-icon-theme
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk2-devel libpng-devel texinfo desktop-file-utils

%description 
A picture viewer with a thumbnail-based file selector.  Many file
formats are supported, and the thumbnails used are compatible with xv,
zgv and the Gimp.

%prep
%setup -q
%patch -p1
%patch1 -p1

%build
%{__sed} -i 's|^CFLAGS.*|CFLAGS=%{optflags}|' config.mk
%{__make} %{?_smp_flags}
%{__make} info

%{__cat} <<EOF > %{name}.desktop
[Desktop Entry]
Encoding=UTF-8
Name=xzgv Image Viewer
Comment=View different types of images
Exec=xzgv
Terminal=false
Type=Application
Categories=GTK;Graphics;RasterGraphics;Viewer;
EOF

%install
%{__rm} -rf %{buildroot}

%{__install} -d -m 0755 %{buildroot}%{_datadir}/applications/
%{__install} -m 0644 %{name}.desktop %{buildroot}%{_datadir}/applications

%{__make} PREFIX=%{buildroot}/%{_prefix} \
     MANDIR=%{buildroot}/%{_mandir}/man1 \
     INFODIR=%{buildroot}/%{_infodir} install

desktop-file-install --vendor fedora --delete-original \
  --dir %{buildroot}%{_datadir}/applications           \
  %{buildroot}%{_datadir}/applications/%{name}.desktop

%post
/sbin/install-info %{_infodir}/xzgv.gz %{_infodir}/dir || :

%postun
if [ "$1" = "0" ]; then
   /sbin/install-info --delete %{_infodir}/xzgv.gz %{_infodir}/dir || :
fi

%clean
%{__rm} -rf %{buildroot}

%files
%defattr (-, root, root, -)
%doc AUTHORS COPYING NEWS README TODO ChangeLog
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%{_infodir}/%{name}*
%{_datadir}/applications/fedora-%{name}.desktop

%changelog
* Sat Jan  5 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.9-1
- 0.9
- add all patches upto svn r35 
  fixing install and some other simple stuff
- new upstream maintainer, src and url updated
- drop patch now upstream
- build with gtk2 (yeah!) -> update summary and desc
- remove icon line from desktop file (icon gone)
- add texinfo to buildreq
- add patch to fix install of man and info files

* Sun Aug 19 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-6
- Fix license tag

* Wed Jul 04 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-5
- importing, fix tag problem

* Tue Jul 03 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-4
- add gnome-icon-theme to req

* Sun Jul 01 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-3
- really add AUTHORS and NEWS to %%doc
- use image-viewer.png from gnome-icon-theme as icon
- help system need xterm

* Wed Jun 20 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-2
- add AUTHORS and NEWS to %%doc
- fix scriplets
- add buildreq: desktop-file-utils
- add smp_mflags macro
- remove app categori from desktop file
- switch icon to eog

* Mon Jun 18 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-1
- 0.8
- add integer overflow patch
- cleanup description
- add correct buildrequires
- desktop file
- add req for post, preun

* Thu Jan  3 2002 Aleksey Nogin <ayn2@cornell.edu> - 0.7-3.rh
- Borrowed the SPEC from Mandrake
- Minor updates
- Added info files to the package

* Fri Nov 30 2001 Yves Duret <yduret@mandrakesoft.com> - 0.7-2mdk
- rebuild against libpng3
- really fix doc perm aka etienne sux

* Thu Aug 23 2001 Etienne Faure <etienne@mandrakesoft.com> - 0.7-1mdk
- 0.7
- fix doc permissions

* Sat Jan 06 2001 David BAUDENS <baudens@mandrakesoft.com> - 0.6-2mdk
- ExclusiveArch: %%ix86
- Fix group
- %%setup -q
- Fix %%postun
- Spec clean up

* Mon Nov 06 2000 Lenny Cartier <lenny@mandrakesoft.com> - 0.6-1mdk
- new in contribs
- add menu entry