-%define minmozver 5:1.7
-Summary: DevHelp is a developer's help program for GNOME
-Summary(pl): Program pomocy dla programistów GNOME
+Summary: API documentation browser for GNOME
+Summary(pl.UTF-8): Przeglądarka dokumentacji API dla GNOME
Name: devhelp
-Version: 0.10
+Version: 3.18.0
Release: 1
License: GPL v2+
Group: X11/Applications
-Source0: http://ftp.imendio.com/pub/imendio/devhelp/src/%{name}-%{version}.tar.gz
-# Source0-md5: 79e71acb839ca504f37cccf2e520abe1
+Source0: http://ftp.gnome.org/pub/GNOME/sources/devhelp/3.18/%{name}-%{version}.tar.xz
+# Source0-md5: 1b316ca88da22386dc5e7587d30e166b
Patch0: %{name}-bookdir.patch
-Patch1: %{name}-mozilla.patch
-Patch2: %{name}-mozilla_includes.patch
-Patch3: %{name}-desktop.patch
-URL: http://www.imendio.com/projects/devhelp/
-BuildRequires: GConf2-devel
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: gnome-common >= 2.8.0
-BuildRequires: gnome-vfs2-devel >= 2.10.0-2
-BuildRequires: gtk+2-devel >= 2:2.6.4
-BuildRequires: libglade2-devel >= 1:2.5.1
-BuildRequires: libtool
-BuildRequires: mozilla-devel >= %{minmozver}
+Patch1: %{name}-use-python3.patch
+URL: https://wiki.gnome.org/Apps/Devhelp
+BuildRequires: autoconf >= 2.64
+BuildRequires: automake >= 1:1.11
+BuildRequires: gettext-tools >= 0.17
+BuildRequires: glib2-devel >= 1:2.38.0
+BuildRequires: gnome-common >= 2.24.0
+BuildRequires: gtk+3-devel >= 3.14.0
+BuildRequires: gtk-webkit4-devel >= 2.6.0
+BuildRequires: intltool >= 0.40.0
+BuildRequires: libtool >= 2:2.2
BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.197
+BuildRequires: python3 >= 1:3.3
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.311
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
BuildRequires: zlib-devel
-Requires(post,preun): GConf2
+Requires(post,postun): glib2 >= 1:2.32.0
+Requires(post,postun): gtk-update-icon-cache
Requires: %{name}-libs = %{version}-%{release}
-Requires: mozilla = %(rpm -q --qf '%{EPOCH}:%{VERSION}' --whatprovides mozilla)
+Requires: gtk-webkit4 >= 2.6.0
+Requires: hicolor-icon-theme
+# sr@Latn vs. sr@latin
+Conflicts: glibc-misc < 6:2.7
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-# can be provided by mozilla or mozilla-embedded
-%define _noautoreqdep libgtkembedmoz.so libxpcom.so
-
%description
-DevHelp is a developer's help program for GNOME.
+API documentation browser for GNOME.
-%description -l pl
-Program pomocy dla programistów GNOME.
+%description -l pl.UTF-8
+Przeglądarka dokumentacji API dla GNOME.
%package libs
Summary: Library to embed Devhelp in other applications
-Summary(pl): Biblioteka do osadzania Devhelp w innych aplikacjach
-Group: Libraries
+Summary(pl.UTF-8): Biblioteka do osadzania Devhelp w innych aplikacjach
+Group: X11/Libraries
+Requires: glib2 >= 1:2.38.0
+Requires: gtk+3 >= 3.14.0
+Requires: gtk-webkit4 >= 2.6.0
%description libs
-Library of Devhelp for embedding into other applications..
+Library of Devhelp for embedding into other applications.
-%description libs -l pl
-Biblioteka Devhelp do osadzania w innych aplikacjach..
+%description libs -l pl.UTF-8
+Biblioteka Devhelp do osadzania w innych aplikacjach.
%package devel
Summary: Headers for Devhelp library
-Summary(pl): Pliki nag³ówkowe biblioteki Devhelp
-Group: Development/Libraries
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Devhelp
+Group: X11/Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
+Requires: glib2-devel >= 1:2.38.0
+Requires: gtk+3-devel >= 3.14.0
+Requires: gtk-webkit4-devel >= 2.6.0
%description devel
Headers for Devhelp library.
-%description devel -l pl
-Pliki nag³ówkowe biblioteki Devhelp.
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Devhelp.
%package static
Summary: Static Devhelp library
-Summary(pl): Statyczna biblioteka Devhelp
-Group: Development/Libraries
+Summary(pl.UTF-8): Statyczna biblioteka Devhelp
+Group: X11/Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
Static version of Devhelp library.
-%description static -l pl
+%description static -l pl.UTF-8
Statyczna biblioteka Devhelp.
+%package -n gedit-plugin-devhelp
+Summary: Devhelp plugin for Gedit editor
+Summary(pl.UTF-8): Wtyczka devhelpa dla edytora Gedit
+Group: X11/Applications
+Requires: %{name} = %{version}-%{release}
+# python3 based gedit
+Requires: gedit >= 3.8
+Requires: libpeas-loader-python3
+Requires: python3 >= 1:3.3
+Requires: python3-pygobject3 >= 3
+Obsoletes: gedit2-plugin-devhelp
+
+%description -n gedit-plugin-devhelp
+Plugin that allows to browse API documentation in Gedit.
+
+%description -n gedit-plugin-devhelp -l pl.UTF-8
+Wtyczka umożliwiająca przeglądanie dokumentacji API w edytorze Gedit.
+
%prep
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
%build
+%{__intltoolize}
%{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
- --disable-install-schemas
+ --enable-static \
+ --disable-silent-rules
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/gconf \
- $RPM_BUILD_ROOT%{_datadir}/%{name}/{books,specs}
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{books,references,specs}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-rm -rf $RPM_BUILD_ROOT%{_datadir}/mime-info
-
-rm -r $RPM_BUILD_ROOT%{_datadir}/locale/no
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
%find_lang %{name}
rm -rf $RPM_BUILD_ROOT
%post
-%gconf_schema_install devhelp.schemas
+%glib_compile_schemas
+%update_icon_cache hicolor
-%preun
-%gconf_schema_uninstall devhelp.schemas
+%postun
+%glib_compile_schemas
+%update_icon_cache hicolor
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README TODO
-%attr(755,root,root) %{_bindir}/devhelp*
+%doc AUTHORS NEWS README TODO
+%attr(755,root,root) %{_bindir}/devhelp
%{_datadir}/%{name}
-%{_desktopdir}/*.desktop
-%{_pixmapsdir}/*
-%{_sysconfdir}/gconf/schemas/*
+%{_desktopdir}/org.gnome.Devhelp.desktop
+%{_iconsdir}/hicolor/*x*/apps/devhelp.png
+%{_iconsdir}/hicolor/symbolic/apps/devhelp-symbolic.svg
+%{_datadir}/GConf/gsettings/devhelp.convert
+%{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml
+%{_datadir}/appdata/org.gnome.Devhelp.appdata.xml
+%{_datadir}/dbus-1/services/org.gnome.Devhelp.service
+%{_mandir}/man1/devhelp.1*
%files libs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%attr(755,root,root) %{_libdir}/libdevhelp-3.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdevhelp-3.so.2
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
-%{_pkgconfigdir}/*.pc
-%{_includedir}/*
+%attr(755,root,root) %{_libdir}/libdevhelp-3.so
+%{_pkgconfigdir}/libdevhelp-3.0.pc
+%{_includedir}/devhelp-3.0
%files static
%defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libdevhelp-3.a
+
+%files -n gedit-plugin-devhelp
+%defattr(644,root,root,755)
+%{_libdir}/gedit/plugins/__pycache__
+%{_libdir}/gedit/plugins/devhelp.plugin
+%{_libdir}/gedit/plugins/devhelp.py