Blob Blame History Raw
Summary:   Picture viewer
Name:      xzgv
Version:   0.9.1
Release:   3%{?dist}
License:   GPLv2+
Group:     Applications/Multimedia
Source:    http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch1:    xzgv-0.9-fix-doc-install.patch
Patch2:    xzgv-0.9-thumbnail-load-gcc4.patch
Patch3:    xzgv-0.9-fix-thumbnail-generation.patch
Patch4:    xzgv-0.9.1-dso.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
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
iconv -f iso8859-1 -t utf8 ChangeLog -o ChangeLog.txt
touch -r ChangeLog.txt ChangeLog
mv ChangeLog.txt ChangeLog
iconv -f iso8859-1 -t utf8 NEWS -o NEWS.txt
touch -r NEWS.txt NEWS
mv NEWS.txt NEWS

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

%{__cat} <<EOF > %{name}.desktop
[Desktop Entry]
Name=xzgv Image Viewer
Comment=View different types of images
Exec=xzgv
Icon=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
%{__install} -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
%{__install} -p -m 0644 src/icon-48.xpm \
     %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/xzgv.xpm

%{__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.info.gz %{_infodir}/dir || :
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%preun
if [ "$1" = "0" ]; then
   /sbin/install-info --delete %{_infodir}/xzgv.info.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
%{_datadir}/icons/hicolor/48x48/apps/xzgv.xpm

%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Feb 10 2010 Terje Rosten <terjeros@phys.ntnu.no> - 0.9.1-2
- Add DSO patch

* Sat Dec  5 2009 Terje Rosten <terjeros@phys.ntnu.no> - 0.9.1-1
- 0.9.1

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon May 18 2009 Hans de Goede <hdegoede@redhat.com> - 0.9-7
- Add an icon for the menu entry
- Make ChangeLog and NEWS UTF-8

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Jan 10 2009 Hans de Goede <hdegoede@redhat.com> - 0.9-5
- Update to latest upstream svn (r41) fixing several crashes
- Add a patch fixing thumbnail loading
- Add a patch fixing thumbnail generation for pictures where
  the width is not a multiple of 4
- Add a patch fixing thumbnail generation for pictures which have an alpha
  channel
- Fix scriptlet error on uninstall (make it preun instead of postun)

* Sat Feb  9 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.9-4
- rebuild

* Sun Jan  6 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.9-3
- info file has moved, fix scripts

* Sat Jan  5 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.9-2
- rebuild

* 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