%define glib2_version 2.30.0
%define pango_version 1.28.4
%define gtk3_version 3.2.0
%define desktop_file_utils_version 0.17
%define gnome_doc_utils_version 0.20.0
%define rarian_version 0.7.0
%define gnome_common_version 2.31.0

Summary: A system documentation reader from the Gnome project. 
Summary(ja): GNOME プロジェクトのシステムドキュメントリーダ
Name: yelp
Version: 3.2.1
Release: 1%{?_dist_release}

URL: http://live.gnome.org/Yelp
Source0: %{name}-%{version}.tar.xz
Source10: man-convert-helper

License: GPL
Group: User Interface/Desktops
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: gtk3 >= %{gtk3_version}
Requires: gnome-user-docs
Requires: nkf
Requires: yelp-xsl
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: pango-devel >= %{pango_version}
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: GConf2-devel
BuildRequires: libxml2-devel >= 2.6.5
BuildRequires: libxslt-devel >= 1.1.4
BuildRequires: zlib-devel
BuildRequires: xz-devel
BuildRequires: bzip2-devel
BuildRequires: startup-notification-devel >= 0.8
BuildRequires: dbus-glib-devel
BuildRequires: rarian-devel >= %{rarian_version}
BuildRequires: desktop-file-utils >= %{desktop_file_utils_version}
BuildRequires: gnome-doc-utils >= %{gnome_doc_utils_version}
BuildRequires: gnome-common >= %{gnome_common_version}
BuildRequires: yelp-xsl-devel
BuildRequires: WebKit3-gtk-devel
BuildRequires: sqlite3-devel
BuildRequires: libSM-devel

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
Yelp is the Gnome 2 help/documentation browser. It is designed
to help you browse all the documentation on your system in
one central tool.

%description -l ja
Yelp は Gnome 2 のヘルプ/ドキュメントブラウザです。このツール
によってシステム内の全てのドキュメントを参照できることを目標に
作られています。

%package libs
Summary: Libraries for yelp
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description libs
This package contains libraries used by the yelp help browser.

%package devel
Summary: Development files for yelp-libs
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}

%description devel
This package contains header files and documentation for
the libraries in the yelp-libs package.

%prep
%setup -q

# autoreconf -f -i

%build
%configure \
	--disable-static
make

%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make install DESTDIR=$RPM_BUILD_ROOT
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

mkdir -p -m 755 $RPM_BUILD_ROOT/%{_datadir}/gnome/help

install -m755 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/yelp/

rm -rf $RPM_BUILD_ROOT%{_libdir}/*.{la,a}

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
update-desktop-database %{_datadir}/applications >& /dev/null ||:
update-mime-database %{_datadir}/mime >& /dev/null ||:

touch %{_datadir}/icons/hicolor
#if [ -x /usr/bin/gtk-update-icon-cache ]; then
#  /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
#fi

%postun
update-desktop-database %{_datadir}/applications >& /dev/null ||:
update-mime-database %{_datadir}/mime >& /dev/null ||:
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/glib-2.0/schemas/org.gnome.yelp.gschema.xml
%dir %{_datadir}/gnome/help
%{_datadir}/%{name}
#%{_datadir}/icons/hicolor/*

%files libs
%defattr(-,root,root,-)
%{_libdir}/libyelp.so.*

%files devel
%defattr(-,root,root,-)
%{_libdir}/libyelp.so
%{_includedir}/libyelp
%{_datadir}/gtk-doc/html/libyelp



%changelog
* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.4-1
- new upstream release
- add BuildRequires: libSM-devel

* Sun Aug 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.2-1
- new upstream release

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.1-1
- new upstream release
- create -libs and -devel sub package
- add BuildRequires: yelp-xsl-devel, WebKit3-gtk-devel, sqlite3-devel
- remove BuildRequires: xulrunner-devel
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: xz-devel instead of lzma-devel
- drop old Patches

* Sat Apr 09 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2-3
- update Patch2: yelp-2.30.2-add-mime-handling.patch

* Wed Mar 30 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.30.2-2
- rebuild with xulrunner-2.0
- add Patch11 to build with xulrunner-2.0

* Sun Oct 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.2-1
- new upstream release

* Sat May 01 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1-1
- new upstream release

* Sun Apr 04 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.0-1
- new upstream release
- change Requires: gecko-libs -> xulrunner
- change BuildRequires: gecko-devel -> xulrunner-devel
- drop Patch11

* Mon Mar 01 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.28.1-1
- new upstream release
- build with xulrunner-1.9.2 (gecko-1.9.2)
  - BR: gecko-devel instead of gecko-unstable-devel
  - add patch11 to fix xulrunner-1.9.2 problem
    - https://bugzilla.gnome.org/show_bug.cgi?id=603561
    - http://git.gnome.org/browse/yelp/commit/?id=a5588114ed94d00ca64913aa5b248e09a5e13edc

* Sun Nov  1 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.28.0-1
- new upstream release

* Tue Aug 11 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-3
- convert manpages from euc to utf8

* Tue Jun 30 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.26.0-1
- rebuild with gecko-1.9.1

* Fri Sep 26 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.24.0-1
- new upstream release
- remove BR: libgnomeprintui-devel

* Mon Jun 23 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.22.1-2
- use xulrunner-1.9 for gecko libs instead of firefox
- add Patch7,8,9 to build with xulrunner-1.9

* Thu Apr 10 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.1-1vl5
- new upstream release

* Sun Apr  6 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.22.0-1vl5
- new upstream release
- added Patches from Fedora Core
  * Mon Mar 31 2008 Jon McCann <jmccann@redhat.com> - 2.22.0-4
  - Disallow launchers when running under GDM.
  * Thu Mar 13 2008 Matthew Barnes <mbarnes@redhat.com> - 2.22.0-2
  - Add patch for RH bug #437328 (searching with Beagle broken).
  * Fri Nov 16 2007 Matthias Clasen <mclasen@redhat.com> - 2.20.0-7
  - Handle .HP tags in man pages
  * Wed Sep  6 2006 Matthias Clasen  <mclasen@redhat.com> - 2.16.0-2.fc6
  - Actually apply the Pango patch
  * Thu Dec 15 2005 David Malcolm <dmalcolm@redhat.com> - 2.13.2-2
  - Patched to include DocBook mimetype in desktop file, and added preun and 
    post hooks to update-desktop-database (#175880)
  - Patched to ensure that Yelp recognizes that it can handle the mimetype of
    the documentation as reported by gnomevfs (also #175880) 

* Sat Jan 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.20.0-0vl1
- new upstream release
- added BuildRequires: rarian-devel

* Thu May 17 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.1-0vl2
- rebuild with new environment/toolchain

* Sat Apr 28 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.18.1-0vl1
- new upstream release
- drop Patch20

* Thu Nov 16 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.14.3-0vl3
- added Patch20 (<BTS:0314>)
- add BuildRequires: libgnomeprintui-devel

* Wed Oct 25 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.3-0vl2
- rebuild with firefox-2.0

* Sun Oct 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14.3-0vl1
- updated to 2.14.3
- changed Group to User Interface/Desktops

* Sat Jul 01 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.2-0vl2
- add Patch10 to fix corruption of help option message.
- add Japanese summary and description

* Sun Jun 04 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.2-0vl1
- new upstream release

* Fri Apr 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.1-0vl2
- rebuild with firefox-1.5.0.2-0vl4

* Fri Apr 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.1-0vl1
- new upstream release
- build with firefox-1.5.0.2

* Sat Apr 01 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl2
- run gtk-update-icon-cache in %%post script.

* Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14.0-0vl1
- new upstream release

* Wed Mar 08 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.13.6-0vl1
- new upstream release

* Thu Feb 02 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.2-0vl2
- rebuild with firefox-1.5.0.1

* Fri Dec 30 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.2-0vl1
- new upstream release
- build with firefox-1.5

* Sat Sep 24 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.1-0vl1
- new upstream release
- build with mozilla-1.7.12

* Mon Sep 19 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.12.0-0vl1
- new upstream release

* Sat Aug 20 2005 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.10.0-0vl4
- rebuilt with mozilla-1.7.11 (doh! 0vl3 had stupid mistake in the changelog)

* Fri May 13 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.0-0vl2
- rebuild with mozilla-1.7.8

* Mon May 02 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.0-0vl1
- new upstream release

* Sun Apr 17 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9.3-0vl4
- rebuild with mozilla-1.7.7

* Thu Apr 14 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9.3-0vl3
- add Requires/BuildRequires to gnome-doc-utils

* Mon Mar 28 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9.3-0vl2
- include yelp.schemas
- add versioned requires to mozilla

* Thu Mar 24 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 2.9.3-0vl1
- new upstream version
- use mozilla's gecko engine, add Requires: mozilla

* Mon Nov 22 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.4-0vl1
- new upstream release

* Mon Dec 22 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.2-0vl1
- new upstream release
- rebuild with new toolchains

* Thu Sep 11 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.0-0vl1
- new upstream release

* Wed Sep 03 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.3.90-0vl1
- new upstream release

* Thu May 15 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.3.0-0vl1
- new upstream release

* Tue Jan 21 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.0-0vl1
- new upstream release

* Thu Dec 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1.3-0vl1
- new upstream release
- build for Vine Linux

* Mon Nov 18 2002 Tim Powers <timp@redhat.com>
- rebuild for all arches

* Mon Aug 12 2002 Alexander Larsson <alexl@redhat.com>
- Remove the strange copyright on the start page. Fixes #69106

* Thu Aug  8 2002 Havoc Pennington <hp@redhat.com>
- 1.0.2
- include libexecdir stuff

* Sat Jul 27 2002 Havoc Pennington <hp@redhat.com>
- rebuild with new gail
- 1.0.1

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue Jun 18 2002 Havoc Pennington <hp@redhat.com>
- put all the binaries in the file list... why is this package so hard?

* Mon Jun 17 2002 Havoc Pennington <hp@redhat.com>
- put images in file list, this thing will be non-ugly yet

* Sun Jun 16 2002 Havoc Pennington <hp@redhat.com>
- 1.0
- use desktop-file-install to install/munge .desktop files
- put the sgml stuff in file list

* Fri Jun 07 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Wed Jun  5 2002 Havoc Pennington <hp@redhat.com>
- 0.10

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue May 21 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment

* Tue May 21 2002 Havoc Pennington <hp@redhat.com>
- 0.8

* Fri May  3 2002 Havoc Pennington <hp@redhat.com>
- 0.6.1

* Fri Apr 19 2002 Havoc Pennington <hp@redhat.com>
- 0.6

* Wed Jan 30 2002 Owen Taylor <otaylor@redhat.com>
- Rebuild for new gnome2 libraries

* Mon Jan 28 2002 Alex Larsson <alexl@redhat.com>
- Initial build.
