File devhelp.spec of Package devhelp

#
# spec file for package devhelp
#
# Copyright (c) 2013 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.10.0
Release:        0
Summary:        Developer's Help Program for GNOME
License:        GPL-2.0+
Group:          Development/Tools/Other
Url:            https://live.gnome.org/devhelp
Source:         http://download.gnome.org/sources/devhelp/3.10/%{name}-%{version}.tar.xz
BuildRequires:  fdupes
# For directory ownership of the plugins:
BuildRequires:  gedit
BuildRequires:  gtk3-devel >= 3.9.8
BuildRequires:  intltool
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  vim
BuildRequires:  pkgconfig(webkit2gtk-3.0) >= 1.10.0
Recommends:     %{name}-lang
Suggests:       gedit-plugin-devhelp
Suggests:       vim-plugin-devhelp
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Devhelp is an API documentation browser for GTK+ and GNOME.

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

%description devel
Devhelp is an API documentation browser for GTK+ and GNOME.

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

%description -n gedit-plugin-devhelp
Devhelp is an API documentation browser for GTK+ and GNOME.

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

%description -n vim-plugin-devhelp
Devhelp is an API documentation browser for GTK+ and GNOME.

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

%build
%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 %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%fdupes %{buildroot}

%post
/sbin/ldconfig
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post

%postun
/sbin/ldconfig
%glib2_gsettings_schema_post
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/devhelp
%{_datadir}/applications/devhelp.desktop
%{_datadir}/devhelp
%{_datadir}/GConf/gsettings/devhelp.convert
%{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml
%{_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