File libhubbub.spec of Package libhubbub

# spec file for package libhubbub
# Copyright (c) 2014 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

Name:           libhubbub
Version:        0.3.0
Release:        0
Summary:        An HTML5 compliant parsing library
License:        MIT
Group:          System Environment/Libraries
Patch0:         libhubbub-0.3.0-notimestamp.patch
Patch1:         0001-workaround-fail-on-ppc64.patch
BuildRequires:  check-devel
BuildRequires:  doxygen
BuildRequires:  libjson-c-devel >= 0.11
BuildRequires:  libparserutils-devel >= 0.2.0
BuildRequires:  netsurf-buildsystem >= 1.1
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Hubbub is an HTML5 compliant parsing library, written in C. It was
developed as part of the NetSurf project.

%package -n libhubbub0
Summary:        An HTML5 compliant parsing library
Group:          System Environment/Libraries

%description -n libhubbub0
Hubbub is an HTML5 compliant parsing library, written in C. It was
developed as part of the NetSurf project.

The HTML5 specification defines a parsing algorithm, based on the
behaviour of mainstream browsers, which provides instructions for how to
parse all markup, both valid and invalid. As a result, Hubbub parses web
content well.

* Parses HTML, good and bad
* Simple C API
* Fast
* Character encoding detection
* Well-tested (~90% test coverage)
* Portable

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       libhubbub0 = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package doc
Summary:        Documentation of %{name} API
Group:          Documentation
%if 0%{?suse_version} >= 1120
BuildArch:      noarch

%description doc
The %{name}-doc package contains documentation files for %{name}.

%global make_vars COMPONENT_TYPE=lib-shared PREFIX=%{_prefix} LIBDIR=%{_lib} Q=
%global build_vars OPTCFLAGS='%{optflags}' OPTLDFLAGS="$RPM_LD_FLAGS"

%setup -q
%patch0 -p1
%patch1 -p1

sed -i -e s@-Werror@@ Makefile

make %{?_smp_mflags} %{make_vars} %{build_vars}
make %{?_smp_mflags} docs %{make_vars}

make install DESTDIR=%{buildroot} %{make_vars}

%post -n libhubbub0 -p /sbin/ldconfig

%postun -n libhubbub0 -p /sbin/ldconfig

make %{?_smp_mflags} test %{make_vars}

%files -n libhubbub0

%files devel

%files doc
%doc docs/Architecture docs/Macros docs/Todo docs/Treebuilder docs/Updated
%doc build/docs/html

openSUSE Build Service is sponsored by