Version:        3.18.1
Release:        1%{?_dist_release}

%define	gtk_required		3.18.0

Summary:        API document browser
Summary(ja):    API ドキュメントブラウザ
Name:           devhelp
License:        GPL
Group:          Applications/Development
Url:            http://live.gnome.org/devhelp
Source:         http://ftp.gnome.org/pub/GNOME/sources/devhelp/3.18/%{name}-%{version}.tar.xz
#Patch10:	%{name}-0.19.1-xulrunner19.patch
#Patch11:	%{name}-webkit.patch
#Patch:		%{name}-r1265.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-root

Vendor: Project Vine
Distribution: Vine Linux
Packager: yasumichi, Takemikaduchi

Requires(post,postun): gtk3	>= %{gtk_required}

BuildRequires:	gtk3-devel	>= %{gtk_required}
BuildRequires:	webkitgtk4-devel >= 2.6.0

%description
An API document browser for GNOME 3.

%description -l ja
GNOME3 用の API ブラウザです。

%package devel
Summary:        Library to embed Devhelp in other applications.
Group:          Development/Libraries
Requires:       %{name} = %{version}
Requires:	gtk3-devel	>= %{gtk_required}
Requires:	webkitgtk4-devel

%description devel
Library of Devhelp for embedding into other applications.

%prep
%setup -q
#patch10 -p1 -b .xulrunner19
#%patch -p1

%build
%configure --disable-static --disable-schemas-install

make

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

# remove, not shipped
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache

%find_lang %{name}

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi

%postun
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
if [ $1 -eq 0 ]; then
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi

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

%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README INSTALL
%{_bindir}/devhelp
%{_libdir}/gedit/plugins/devhelp*
%{_libdir}/lib*.so.*
%{_datadir}/GConf/gsettings/devhelp.convert
%{_datadir}/appdata/org.gnome.Devhelp.appdata.xml
%{_datadir}/applications/org.gnome.Devhelp.desktop
%{_datadir}/dbus-1/services/org.gnome.Devhelp.service
%{_datadir}/devhelp
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml
%{_mandir}/man1/devhelp.1.gz

%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/libdevhelp*.so
%{_libdir}/pkgconfig/*

%changelog
* Sat Oct 31 2015 TOYODA <bsyamato@sea.plala.or.jp> 3.18.1-1
- new upstream release
- remove BuildRequires: WebKit3-gtk-devel
- add BuildRequires: webkitgtk4-devel

* Sun Apr 19 2015 TOYODA <bsyamato@sea.plala.or.jp> 3.16.1-1
- new upstream release

* Sun Mar 29 2015 TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- new upstream release

* Sun Oct 26 2014 TOYODA <bsyamato@sea.plala.or.jp> 3.14.0-1
- new upstream release

* Sun Apr 20 2014 TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sat Mar 29 2014 TOYODA <bsyamato@sea.plala.or.jp> 3.12.0-1
- new upstream release

* Sun Nov 24 2013 TOYODA <bsyamato@sea.plala.or.jp> 3.10.2-1
- new upstream release

* Sat Oct 26 2013 TOYODA <bsyamato@sea.plala.or.jp> 3.10.0-1
- new upstream release

* Sun Apr 21 2013 TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-1
- new upstream release

* Wed Nov 14 2012 TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sat Sep 29 2012 TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release

* Sun Apr 22 2012 TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release

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

* Mon Aug 15 2011 TOYODA <bsyamato@sea.plala.or.jp> 3.0.0-1
- new upstream release

* Sun Oct 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.32.0-1
- new upstream release
- remove %pre, %preun
- fix %post, %postun
- add %posttrans

* Tue Sep 28 2010 Shu KONNO <owa@bg.wakwak.com> 2.30.1-2
- rebuilt with rpm-4.8.1 for pkg-config

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

* Sun Apr 18 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.0-1
- new upstream release

* Fri Nov 06 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.28.1-2
- add unique-devel to BR

* Tue Nov 03 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.28.1-1
- New upstream release.
- remove Patch
- build with WebKit-1.1.15.3
- add Vendor, Distribution and Packager.

* Mon Aug 10 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.23-4
- update Patch(See follow url)
- http://git.gnome.org/cgit/devhelp/commit/?id=af67fbedccab5044808a489a9f3a5540d42adcf2

* Sat Aug 01 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.23-3
- update Url.
- add Patch11(http://bugzilla.gnome.org/show_bug.cgi?id=586559)

* Tue Jun 30 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.23-2
- remove unneeded Requires:
- remove Requires/BuildRequires to gecko.

* Tue Apr 28 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.23-1
- new upstream release
- added Requires: Webkit-gtk,libsoup BuildRequires: Webkit-gtk-devel,libsoup-devel

* Tue Sep 30 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.21-1
- new upstream release (dropped Patch10)
- updated BuildRequires: gecko-devel-unstable instead of gecko-devel
- added Requires: gecko-libs instead of firefox

* Thu Jul 03 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.19.1-2
- add Patch10 to build with xulrunner-1.9
- add %%pre %%preun scripts to remove old gconf schemas
- add %%postun to update icon cache
- add unpackaged icons to %%files

* Fri May 30 2008 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.19.1
- new upstream version.

* Tue May 13 2008 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.16.1-2
- use macro for Release

* Fri May 09 2008 Yasumichi Akahoshi <yasumichi@vinelinux.org>
- apply new virsioning policy.
- remove *.la

* Thu Jan 10 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16.1-0vl2
- rebuilt with libwnck 2.20.2

* Fri Jan 04 2008 Shu KONNO <owa@bg.wakwak.com> 0.16.1-0vl1
- new upstream version
- removed icon-theme.cache in %%install section

* Sun Sep 02 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.15-0vl1
- new upstream release

* Tue Apr 03 2007 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.13-0vl2
- icon-theme.cache is not included. 

* Sun Apr 01 2007 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.13-0vl1
- update to 0.13

* Sun Dec 17 2006 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.12-0vl2
- build devel package

* Sun Oct 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.12-0vl1
- updated to 0.12
- using firefox(gecko) instead of gtkhtml2
- disabled intltoolize before configure

* Thu Aug 25 2005 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.9.3-0vl2
- add "--force" to intltoolize

* Sun Nov 14 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.9.3-0vl1
- build for Vine Linux
- do not build devel package

* Sun Jun 29 2003 Mikael Hallendal <micke@imendio.com>
- Released 0.7
