b3b35de
Summary:   Picture viewer
522d4ef
Name:      xzgv
6cf6d52
Version:   0.9.1
a496c9c
Release:   3%{?dist}
dcc3ebf
License:   GPLv2+
522d4ef
Group:     Applications/Multimedia
b3b35de
Source:    http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
b3b35de
Patch1:    xzgv-0.9-fix-doc-install.patch
3acce01
Patch2:    xzgv-0.9-thumbnail-load-gcc4.patch
3acce01
Patch3:    xzgv-0.9-fix-thumbnail-generation.patch
88f6977
Patch4:    xzgv-0.9.1-dso.patch
b3b35de
URL:       http://sourceforge.net/projects/xzgv/
522d4ef
Requires:  xterm gnome-icon-theme
522d4ef
Requires(post): /sbin/install-info
522d4ef
Requires(preun): /sbin/install-info
522d4ef
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b3b35de
BuildRequires: gtk2-devel libpng-devel texinfo desktop-file-utils
522d4ef
b3b35de
%description 
b3b35de
A picture viewer with a thumbnail-based file selector.  Many file
b3b35de
formats are supported, and the thumbnails used are compatible with xv,
b3b35de
zgv and the Gimp.
522d4ef
522d4ef
%prep
522d4ef
%setup -q
b3b35de
%patch1 -p1
3acce01
%patch2 -p1
3acce01
%patch3 -p1
88f6977
%patch4 -p1
327641b
iconv -f iso8859-1 -t utf8 ChangeLog -o ChangeLog.txt
327641b
touch -r ChangeLog.txt ChangeLog
327641b
mv ChangeLog.txt ChangeLog
327641b
iconv -f iso8859-1 -t utf8 NEWS -o NEWS.txt
327641b
touch -r NEWS.txt NEWS
327641b
mv NEWS.txt NEWS
522d4ef
522d4ef
%build
b3b35de
%{__sed} -i 's|^CFLAGS.*|CFLAGS=%{optflags}|' config.mk
b3b35de
%{__make} %{?_smp_flags}
b3b35de
%{__make} info
b3b35de
522d4ef
%{__cat} <<EOF > %{name}.desktop
522d4ef
[Desktop Entry]
522d4ef
Name=xzgv Image Viewer
522d4ef
Comment=View different types of images
522d4ef
Exec=xzgv
327641b
Icon=xzgv
522d4ef
Terminal=false
522d4ef
Type=Application
522d4ef
Categories=GTK;Graphics;RasterGraphics;Viewer;
522d4ef
EOF
522d4ef
522d4ef
%install
522d4ef
%{__rm} -rf %{buildroot}
522d4ef
522d4ef
%{__install} -d -m 0755 %{buildroot}%{_datadir}/applications/
522d4ef
%{__install} -m 0644 %{name}.desktop %{buildroot}%{_datadir}/applications
327641b
%{__install} -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
327641b
%{__install} -p -m 0644 src/icon-48.xpm \
327641b
     %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/xzgv.xpm
522d4ef
b3b35de
%{__make} PREFIX=%{buildroot}/%{_prefix} \
522d4ef
     MANDIR=%{buildroot}/%{_mandir}/man1 \
b3b35de
     INFODIR=%{buildroot}/%{_infodir} install
522d4ef
522d4ef
desktop-file-install --vendor fedora --delete-original \
522d4ef
  --dir %{buildroot}%{_datadir}/applications           \
522d4ef
  %{buildroot}%{_datadir}/applications/%{name}.desktop
522d4ef
522d4ef
%post
e1af759
/sbin/install-info %{_infodir}/xzgv.info.gz %{_infodir}/dir || :
327641b
touch --no-create %{_datadir}/icons/hicolor || :
327641b
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
327641b
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
327641b
fi
327641b
327641b
%postun
327641b
touch --no-create %{_datadir}/icons/hicolor || :
327641b
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
327641b
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
327641b
fi
522d4ef
3acce01
%preun
b3b35de
if [ "$1" = "0" ]; then
e1af759
   /sbin/install-info --delete %{_infodir}/xzgv.info.gz %{_infodir}/dir || :
522d4ef
fi
522d4ef
522d4ef
%clean
522d4ef
%{__rm} -rf %{buildroot}
522d4ef
522d4ef
%files
522d4ef
%defattr (-, root, root, -)
522d4ef
%doc AUTHORS COPYING NEWS README TODO ChangeLog
522d4ef
%{_bindir}/%{name}
522d4ef
%{_mandir}/man1/%{name}*
b3b35de
%{_infodir}/%{name}*
522d4ef
%{_datadir}/applications/fedora-%{name}.desktop
327641b
%{_datadir}/icons/hicolor/48x48/apps/xzgv.xpm
522d4ef
522d4ef
%changelog
a496c9c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-3
a496c9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a496c9c
88f6977
* Wed Feb 10 2010 Terje Rosten <terjeros@phys.ntnu.no> - 0.9.1-2
88f6977
- Add DSO patch
88f6977
6cf6d52
* Sat Dec  5 2009 Terje Rosten <terjeros@phys.ntnu.no> - 0.9.1-1
6cf6d52
- 0.9.1
6cf6d52
bad63f8
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-8
bad63f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
bad63f8
327641b
* Mon May 18 2009 Hans de Goede <hdegoede@redhat.com> - 0.9-7
327641b
- Add an icon for the menu entry
327641b
- Make ChangeLog and NEWS UTF-8
327641b
87fdd27
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-6
87fdd27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
87fdd27
3acce01
* Sat Jan 10 2009 Hans de Goede <hdegoede@redhat.com> - 0.9-5
3acce01
- Update to latest upstream svn (r41) fixing several crashes
3acce01
- Add a patch fixing thumbnail loading
3acce01
- Add a patch fixing thumbnail generation for pictures where
3acce01
  the width is not a multiple of 4
3acce01
- Add a patch fixing thumbnail generation for pictures which have an alpha
3acce01
  channel
3acce01
- Fix scriptlet error on uninstall (make it preun instead of postun)
3acce01
a017f39
* Sat Feb  9 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.9-4
a017f39
- rebuild
a017f39
e1af759
* Sun Jan  6 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.9-3
e1af759
- info file has moved, fix scripts
e1af759
9f1f8a5
* Sat Jan  5 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.9-2
e1af759
- rebuild
9f1f8a5
b3b35de
* Sat Jan  5 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.9-1
b3b35de
- 0.9
b3b35de
- add all patches upto svn r35 
b3b35de
  fixing install and some other simple stuff
b3b35de
- new upstream maintainer, src and url updated
b3b35de
- drop patch now upstream
b3b35de
- build with gtk2 (yeah!) -> update summary and desc
b3b35de
- remove icon line from desktop file (icon gone)
b3b35de
- add texinfo to buildreq
b3b35de
- add patch to fix install of man and info files
b3b35de
dcc3ebf
* Sun Aug 19 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-6
dcc3ebf
- Fix license tag
dcc3ebf
21244f7
* Wed Jul 04 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-5
21244f7
- importing, fix tag problem
21244f7
522d4ef
* Tue Jul 03 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-4
522d4ef
- add gnome-icon-theme to req
522d4ef
522d4ef
* Sun Jul 01 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-3
522d4ef
- really add AUTHORS and NEWS to %%doc
522d4ef
- use image-viewer.png from gnome-icon-theme as icon
522d4ef
- help system need xterm
522d4ef
522d4ef
* Wed Jun 20 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-2
522d4ef
- add AUTHORS and NEWS to %%doc
522d4ef
- fix scriplets
522d4ef
- add buildreq: desktop-file-utils
522d4ef
- add smp_mflags macro
522d4ef
- remove app categori from desktop file
522d4ef
- switch icon to eog
522d4ef
522d4ef
* Mon Jun 18 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.8-1
522d4ef
- 0.8
522d4ef
- add integer overflow patch
522d4ef
- cleanup description
522d4ef
- add correct buildrequires
522d4ef
- desktop file
522d4ef
- add req for post, preun
522d4ef
522d4ef
* Thu Jan  3 2002 Aleksey Nogin <ayn2@cornell.edu> - 0.7-3.rh
522d4ef
- Borrowed the SPEC from Mandrake
522d4ef
- Minor updates
522d4ef
- Added info files to the package
522d4ef
522d4ef
* Fri Nov 30 2001 Yves Duret <yduret@mandrakesoft.com> - 0.7-2mdk
522d4ef
- rebuild against libpng3
522d4ef
- really fix doc perm aka etienne sux
522d4ef
522d4ef
* Thu Aug 23 2001 Etienne Faure <etienne@mandrakesoft.com> - 0.7-1mdk
522d4ef
- 0.7
522d4ef
- fix doc permissions
522d4ef
522d4ef
* Sat Jan 06 2001 David BAUDENS <baudens@mandrakesoft.com> - 0.6-2mdk
522d4ef
- ExclusiveArch: %%ix86
522d4ef
- Fix group
522d4ef
- %%setup -q
522d4ef
- Fix %%postun
522d4ef
- Spec clean up
522d4ef
522d4ef
* Mon Nov 06 2000 Lenny Cartier <lenny@mandrakesoft.com> - 0.6-1mdk
522d4ef
- new in contribs
522d4ef
- add menu entry