File gnochm.spec of Package gnochm

# gnochm.spec
#
# Copyright (c) 2003-2007 Rubens Ramos rubensr@users.sourceforge.net
#
# spec file for gnochm (Version 0.9.11)
#            
# Copyright (c) 2009 SOAD Project, Russia.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bug fixes or comments to the Maintainer: sda00@himki.net
# 
  
# norootforbuild

%define name gnochm
%define version 0.9.11
%define release 1fc5

%{?dist: %{expand: %%define %dist 1}}

%define _without_shmime 1
%{?fc3:%undefine _without_shmime}
%{?fc2:%undefine _without_shmime}

# Preamble
Summary: A CHM file viewer for Gnome
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Group: Applications/Publishing
Source: http://dl.sf.net/gnochm/%{name}-%{version}.tar.gz
URL: http://gnochm.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}
BuildArch: noarch
Packager: sda00 <sda00@himki.net>
Requires: pychm >= 0.8.4
Requires: python
Requires: python-gtk
Requires: libglade2
Requires: python-gnome
Requires: libbonoboui libbonobo
Requires: libgtkhtml python-gnome-extras
Requires: gconf2 gtkhtml2
##{!?_without_shmime:Requires: shared-mime-info}
BuildRequires: pychm >= 0.8.4
BuildRequires: libbonobo-devel libbonobo libbonoboui-devel libbonoboui libgtkhtml-devel libgtkhtml
BuildRequires: gconf2-devel gconf2 scrollkeeper libgnomeui-devel libgnomeui libgnome-devel libgnome scrollkeeper update-desktop-files 
BuildRequires: python-gtk python-gtk-devel python-gnome-devel gnome-python-desktop python-gnome libglade2-devel libglade2 python-gnome-extras
BuildRequires: automake autoconf intltool gtkhtml2-devel gtkhtml2 update-desktop-files
Prefix: %prefix
%gconf_schemas_prereq

%description
A CHM file viewer for Gnome. Features are:
  
  * Full text search
  * Bookmarks
  * Support for external ms-its links
  * Configurable support for http links 
  * Internationalisation
  * Displays HTML page source

%prep
%setup

%build
%install
##intltoolize --force
%configure --disable-mime-update
%{__make} %{?_smp_mflags}
make DESTDIR=$RPM_BUILD_ROOT install || return 1
%suse_update_desktop_file -r gnochm Office Viewer 
%find_gconf_schemas
%find_lang %{name}

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

%if %suse_version >= 1030
%pre -f %{name}.schemas_pre
%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun
%endif

%files -f %{name}.lang
%defattr(-,root,root,0755)
%doc ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README
%doc %{_datadir}/gnome/help/gnochm/
%exclude %{_sysconfdir}/gconf/schemas
%{_bindir}/gnochm
%{_datadir}/application-registry
%{_datadir}/applications/gnochm.desktop
%{_datadir}/gnochm
%{_datadir}/mime/packages/gnochm.xml
%{_datadir}/mime-info
%{_datadir}/omf/gnochm
%{_datadir}/pixmaps/*.png
%{!?_without_shmime:%{_datadir}/mime/application/x-chm.xml}
%{!?_without_shmime:%exclude %{_datadir}/mime/XMLnamespaces}
%{!?_without_shmime:%exclude %{_datadir}/mime/globs}
%{!?_without_shmime:%exclude %{_datadir}/mime/magic}
##exclude %{_localstatedir}/scrollkeeper/
##exclude %{_datadir}/mime/aliases
##exclude %{_datadir}/mime/mime.cache
##exclude %{_datadir}/mime/subclasses
#%if 0%{?suse_version} == 1110
#%{_datadir}/gconf/schemas/*
#%endif
%if 0%{?suse_version} == 1120
%{_datadir}/gconf/schemas
%endif


%changelog
* Mon Jan 19 2009 sda00 <sda00@himki.net>
- First build for openSUSE

* Sat Nov 11 2006 Rubens Ramos <rubensr@users.sourceforge.net>
- Removed man pages because of bug report 1559790

* Tue Nov 09 2004 Rubens Ramos <rubensr@users.sourceforge.net>
- And some more updates from Dag :)

* Sat Nov 06 2004 Rubens Ramos <rubensr@users.sourceforge.net>
- More updates based on Dag's spec for gnochm

* Sat Jan 10 2004 Rubens Ramos <rubensr@users.sourceforge.net>
- Updated copyright and dependencies based on Dag's spec file

* Sun Dec 28 2003 Rubens Ramos <rubensr@users.sourceforge.net>
- After quite some time trying to understand what I 
  actually needed here, things are working. Now gconf stuff seems to
  be installed properly, as well as scrollkeeper docs.
- I guess noarch is better than i386.
- Added a bunch of dependencies
openSUSE Build Service is sponsored by