File libwebkit.spec of Package libwebkit.import5341

#
# spec file for package libwebkit
#
# 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/
#



Name:           libwebkit
Summary:        Library for rendering web content, GTK+ Port
Version:        1.3.10
Release:        6.<RELEASE7>
# FIXME: check if make stamp-po is still needed in %build, see https://bugs.webkit.org/show_bug.cgi?id=50612 (last checked: 1.3.7)
License:        LGPLv2.0 ; LGPLv2.0+
Group:          Development/Libraries/C and C++
Url:            http://webkit.org/
Source:         webkit-%{version}.tar.bz2
Source1:        baselibs.conf
# PATCH-FIX-UPSTREAM libwebkit-reduce_up_front_allocation.patch webkit-bug#42765 pth@suse.de -- Allocate 32M instead of 2G up front
Patch0:         libwebkit-reduce_up_front_allocation.patch
BuildRequires:  bison
BuildRequires:  enchant-devel
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  gobject-introspection-devel
BuildRequires:  gperf
BuildRequires:  gstreamer-0_10-plugins-base-devel
BuildRequires:  gtk2-devel
BuildRequires:  libgeoclue-devel
BuildRequires:  libicu-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libsoup-devel
BuildRequires:  libxslt-devel
BuildRequires:  sqlite3-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser.  It is made to be
embedded in other applications, such as mail readers, or web browsers.

It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.

%package -n libwebkitgtk-1_0-0
Group:          Development/Libraries/C and C++
License:        LGPLv2.0 ; LGPLv2.0+
Summary:        Library for rendering web content, GTK+ Port
Provides:       libWebKitGtk0 = %{version}
Obsoletes:      libWebKitGtk0 < %{version}
# We provide libwebkitgtk2: that's the GTK+ version being used.
Provides:       libwebkitgtk2 = %{version}
Recommends:     libwebkitgtk2-lang = %{version}
%glib2_gsettings_schema_requires

%description -n libwebkitgtk-1_0-0
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser.  It is made to be
embedded in other applications, such as mail readers, or web browsers.

It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.

%package -n libwebkitgtk-devel
License:        LGPLv2.0 ; LGPLv2.0+
Group:          Development/Libraries/C and C++
Summary:        Library for rendering web content, GTK+ Port
Requires:       libwebkitgtk-1_0-0 = %{version}
Requires:       glib2-devel
Requires:       gtk2-devel
Requires:       libsoup-devel
Provides:       WebKitGtk-devel = %{version}
Obsoletes:      WebKitGtk-devel < %{version}
Provides:       libwebkit-devel = %{version}
Obsoletes:      libwebkit-devel < %{version}

%description -n libwebkitgtk-devel
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser.  It is made to be
embedded in other applications, such as mail readers, or web browsers.

It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.

%package -n webkit-jsc
License:        LGPLv2.0 ; LGPLv2.0+
Group:          Development/Libraries/C and C++
Summary:        Library for rendering web content, GTK+ Port
Requires:       libwebkitgtk-1_0-0 = %{version}

%description -n webkit-jsc
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser.  It is made to be
embedded in other applications, such as mail readers, or web browsers.

It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.

%lang_package -n libwebkitgtk2
%prep
%setup -q -n webkit-%{version}
%patch0

%build
%ifarch ppc64
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mminimal-toc"
%endif
export CFLAGS=" $RPM_OPT_FLAGS"
export CXXFLAGS=" $RPM_OPT_FLAGS"
%configure \
        --with-gtk=2.0 \
	--enable-geolocation \
        --enable-introspection
# No parallel build as we can go out of memory on the build service
make
# FIXME: it's only needed because of https://bugs.webkit.org/show_bug.cgi?id=50612
make %{?jobs:-j %jobs} stamp-po

%install
%makeinstall
%find_lang webkit-2.0
find %{buildroot} -name "*.la" -exec rm {} \;

%post -n libwebkitgtk-1_0-0
/sbin/ldconfig
%glib2_gsettings_schema_post

%postun -n libwebkitgtk-1_0-0
/sbin/ldconfig
%glib2_gsettings_schema_postun

%clean
rm -rf $RPM_BUILD_ROOT

%files -n libwebkitgtk-1_0-0
%defattr(-,root,root)
%doc WebKit/LICENSE Source/JavaScriptCore/COPYING.LIB Source/WebCore/LICENSE-APPLE Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1 WebKit/gtk/NEWS
%{_libdir}/libwebkitgtk-1.0.so.*
%{_datadir}/glib-2.0/schemas/org.webkitgtk-1.0.gschema.xml
%{_datadir}/webkit-1.0/
%{_datadir}/webkitgtk-1.0/
%{_libdir}/girepository-1.0/*.typelib

%files -n libwebkitgtk-devel
%defattr(-,root,root)
%{_libdir}/libwebkitgtk-1.0.so
%{_libdir}/pkgconfig/webkit-1.0.pc
%{_includedir}/webkit-1.0/
%{_datadir}/gir-1.0/*.gir

%files -n webkit-jsc
%defattr(-,root,root)
%{_bindir}/jsc-1

%files -n libwebkitgtk2-lang -f webkit-2.0.lang

%changelog