File gtkhtml.spec of Package gtkhtml

#
# spec file for package gtkhtml
#
# 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 _gtkhtml_version 4.0
%define _gtkhtml_editor_version 4.0
%define _gtkhtml_api 4_0
%define _gtkhtml_editor_api 4_0
%define _gtkhtml_major 0
%define _gtkhtml_editor_major 0

Name:           gtkhtml
Version:        4.6.6
Release:        0
Summary:        Lightweight HTML rendering/printing/editing engine
License:        GPL-2.0+ and LGPL-2.1+
Group:          System/Libraries
Url:            http://www.gnome.org
Source:         http://download.gnome.org/sources/gtkhtml/4.6/%{name}-%{version}.tar.xz
BuildRequires:  enchant-devel
BuildRequires:  fdupes
BuildRequires:  glib2-devel
BuildRequires:  gnome-icon-theme
BuildRequires:  gtk3-devel
BuildRequires:  intltool
BuildRequires:  iso-codes-devel
BuildRequires:  libsoup-devel
BuildRequires:  translation-update-upstream
# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467
BuildRequires:  xz
BuildRequires:  pkgconfig(gladeui-2.0)
BuildRequires:  pkgconfig(gsettings-desktop-schemas)
Requires:       gsettings-desktop-schemas
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GtkHTML is a lightweight HTML rendering/printing/editing engine. It
was originally based on KHTMLW, part of the KDE project, but is now
being developed independently.

%package -n libgtkhtml-%{_gtkhtml_api}-%{_gtkhtml_major}
Summary:        Lightweight HTML rendering/printing/editing engine
Group:          System/Libraries
Recommends:     %{name}-%{_gtkhtml_api}-lang
# For the lang package to be installable
Provides:       %{name} = %{version}
Provides:       %{name}-%{_gtkhtml_api} = %{version}
Obsoletes:      %{name} < %{version}
Provides:       gtkhtml2 = %{version}
Obsoletes:      gtkhtml2 < %{version}

%description -n libgtkhtml-%{_gtkhtml_api}-%{_gtkhtml_major}
GtkHTML is a lightweight HTML rendering/printing/editing engine. It
was originally based on KHTMLW, part of the KDE project, but is now
being developed independently.

%package -n libgtkhtml-editor-%{_gtkhtml_editor_api}-%{_gtkhtml_editor_major}
Summary:        Lightweight HTML rendering/printing/editing engine
Group:          System/Libraries
Recommends:     iso-codes

%description -n libgtkhtml-editor-%{_gtkhtml_editor_api}-%{_gtkhtml_editor_major}
GtkHTML is a lightweight HTML rendering/printing/editing engine. It
was originally based on KHTMLW, part of the KDE project, but is now
being developed independently.

%package -n glade-catalog-gtkhtml
Summary:        Lightweight HTML rendering/printing/editing engine -- Catalog for Glade
Group:          Development/Tools/GUI Builders
Requires:       glade
Requires:       libgtkhtml-editor-%{_gtkhtml_editor_api}-%{_gtkhtml_editor_major} = %{version}
Supplements:    packageand(glade:%{name}-devel)

%description -n glade-catalog-gtkhtml
GtkHTML is a lightweight HTML rendering/printing/editing engine. It
was originally based on KHTMLW, part of the KDE project, but is now
being developed independently.

This package provides a catalog for Glade, to allow the use of GtkHTML
widgets in Glade.

%package devel
Summary:        Lightweight HTML rendering/printing/editing engine -- Development Files
Group:          Development/Libraries/GNOME
Requires:       libgtkhtml-%{_gtkhtml_api}-%{_gtkhtml_major} = %{version}
Requires:       libgtkhtml-editor-%{_gtkhtml_editor_api}-%{_gtkhtml_editor_major} = %{version}
Provides:       gtkhtml2-devel = %{version}
Obsoletes:      gtkhtml2-devel < %{version}

%description devel
GtkHTML is a lightweight HTML rendering/printing/editing engine. It
was originally based on KHTMLW, part of the KDE project, but is now
being developed independently.

This package contains all necessary include files and libraries needed
to develop applications that require these.

%lang_package -n %{name}-%{_gtkhtml_api}
%prep
%setup -q
translation-update-upstream

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

%install
%{makeinstall}
%if 0%{suse_version} <= 1120
%{__rm} -rf %{buildroot}%{_datadir}/locale/en@shaw
%endif
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%find_lang %{name}-%{_gtkhtml_version}
%fdupes %{buildroot}

%clean
%{__rm} -rf %{buildroot}

%post -n libgtkhtml-%{_gtkhtml_api}-%{_gtkhtml_major} -p /sbin/ldconfig

%postun -n libgtkhtml-%{_gtkhtml_api}-%{_gtkhtml_major} -p /sbin/ldconfig

%post -n libgtkhtml-editor-%{_gtkhtml_editor_api}-%{_gtkhtml_editor_major} -p /sbin/ldconfig

%postun -n libgtkhtml-editor-%{_gtkhtml_editor_api}-%{_gtkhtml_editor_major} -p /sbin/ldconfig

%files -n libgtkhtml-%{_gtkhtml_api}-%{_gtkhtml_major}
%defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README COPYING TODO
%{_datadir}/gtkhtml-%{_gtkhtml_version}/
%{_libdir}/libgtkhtml-%{_gtkhtml_version}.so.*

%files -n libgtkhtml-editor-%{_gtkhtml_editor_api}-%{_gtkhtml_editor_major}
%defattr(-, root, root)
%{_libdir}/libgtkhtml-editor-%{_gtkhtml_editor_version}.so.*

%files -n %{name}-%{_gtkhtml_api}-lang -f %{name}-%{_gtkhtml_version}.lang

%files -n glade-catalog-gtkhtml
%defattr(-,root,root)
%{_libdir}/glade/modules/libglade-gtkhtml-editor.so
%{_datadir}/glade/catalogs/gtkhtml-editor.xml

%files devel
%defattr(-, root, root)
%{_bindir}/gtkhtml-editor-test
%{_includedir}/libgtkhtml-%{_gtkhtml_version}/
%{_libdir}/libgtkhtml-%{_gtkhtml_version}.so
%{_libdir}/libgtkhtml-editor-%{_gtkhtml_editor_version}.so
%{_libdir}/pkgconfig/libgtkhtml-%{_gtkhtml_version}.pc
%{_libdir}/pkgconfig/gtkhtml-editor-%{_gtkhtml_editor_version}.pc

%changelog
openSUSE Build Service is sponsored by