File devhelp.spec of Package devhelp

#
# spec file for package devhelp
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define vimplugin_dir %{_datadir}/vim/site

Name:           devhelp
Version:        3.2.0
Release:        1
License:        GPLv2+
Summary:        Developer's Help Program for GNOME
Url:            http://developer.imendio.com/wiki/Devhelp
Group:          Development/Tools/Other
Source:         http://download.gnome.org/sources/devhelp/3.2/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM devhelp-fix-multiple-gdk-backends.patch bgo#652999 vuntz@opensuse.org -- Fix build when GTK+ has more than one backend (x11 & broadway, for instance)
Patch0:         devhelp-fix-multiple-gdk-backends.patch
BuildRequires:  fdupes
BuildRequires:  gconf2-devel
# Needed for patch0
BuildRequires:  gnome-common
# For directory ownership of the plugins:
BuildRequires:  gedit
BuildRequires:  gtk3-devel
BuildRequires:  intltool
BuildRequires:  pkgconfig(webkitgtk-3.0)
BuildRequires:  libwnck-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  vim
Recommends:     %{name}-lang
Suggests:       gedit-plugin-devhelp
Suggests:       vim-plugin-devhelp
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq

%description
Devhelp Features - Full indexing of books in XML

- HTML viewer (GtkHTML2)

- Search by function, struct, macro, and more

- Auto completion

- Command line search with nice Emacs integration

%package devel
License:        GPLv2+
Summary:        Developer's Help Program For GNOME
Group:          Development/Tools/Other
Requires:       %{name} = %{version}

%description devel
Devhelp Features - Full indexing of books in XML.

- HTML viewer (GtkHTML2).

- Search by function, struct, macro, and more.

- Auto completion.

- Commandline search, with nice emacs integration.

%package -n gedit-plugin-devhelp
License:        GPLv2+
Summary:        Developer's Help Program for GNOME
Group:          Development/Tools/Other
Requires:       gedit

%description -n gedit-plugin-devhelp
Devhelp Features - Full indexing of books in XML

- HTML viewer (GtkHTML2)

- Search by function, struct, macro, and more

- Auto completion

- Command line search with nice Emacs integration

%package -n vim-plugin-devhelp
License:        GPLv2+
Summary:        Developer's Help Program for GNOME
Group:          Development/Tools/Other
Requires:       vim

%description -n vim-plugin-devhelp
Devhelp Features - Full indexing of books in XML

- HTML viewer (GtkHTML2)

- Search by function, struct, macro, and more

- Auto completion

- Command line search with nice Emacs integration

%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p1

%build
NOCONFIGURE=1 gnome-autogen.sh
%configure \
    --disable-static
make %{?_smp_mflags} V=1

%install
%makeinstall
# glibmm2 needs this
mkdir -p %{buildroot}%{_datadir}/devhelp/books
# install vim plugin
mkdir -p %{buildroot}%vimplugin_dir/plugin
cp -a misc/devhelp.vim %{buildroot}%vimplugin_dir/plugin
# FIXME: there's also an emacs plugin: misc/devhelp.el
%suse_update_desktop_file -G "Developer Help" %name Documentation
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%fdupes %{buildroot}

%pre -f %{name}.schemas_pre

%post
/sbin/ldconfig
%desktop_database_post
%icon_theme_cache_post

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%postun
/sbin/ldconfig
%desktop_database_postun
%icon_theme_cache_postun

%files -f %{name}.schemas_list
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/devhelp
%{_datadir}/applications/devhelp.desktop
%{_datadir}/devhelp
%{_datadir}/icons/hicolor/*/apps/*.*
%{_libdir}/*.so.*

%files lang -f %{name}.lang

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

%files -n gedit-plugin-devhelp
%defattr(-,root,root,0755)
%{_libdir}/gedit/plugins/*

%files -n vim-plugin-devhelp
%defattr(-,root,root,0755)
%vimplugin_dir/plugin/devhelp.vim

%changelog
openSUSE Build Service is sponsored by