File devhelp.spec of Package devhelp

#
# spec file for package devhelp (Version 2.28.1)
#
# Copyright (c) 2010 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:        2.28.1
Release:        0.<RELEASE1>
License:        GPLv2+
Summary:        Developer's Help Program for GNOME
Url:            http://developer.imendio.com/wiki/Devhelp
Group:          Development/Tools/Other
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  fdupes
BuildRequires:  gconf2-devel
# For directory ownership of the plugins:
BuildRequires:  gedit
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  libunique-devel
BuildRequires:  libwebkit-devel
BuildRequires:  libwnck-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  vim
Requires:       %{name}-lang = %{version}
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}
Requires:       gtk2-devel
Requires:       libwebkit-devel

%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

%build
%configure \
    --disable-static
%__make %{?jobs:-j%jobs}

%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}
%find_gconf_schemas
find %{buildroot} -type f -name "*.la" -exec %{__rm} -vf {} +
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%pre -f %{name}.schemas_pre

%post -p /sbin/ldconfig

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%postun -p /sbin/ldconfig

%files -f %{name}.schemas_list
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README INSTALL
%{_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-2/plugins/*

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

%changelog
openSUSE Build Service is sponsored by