File google-gadgets.spec of Package google-gadgets

#
# spec file for package google-gadgets (Version 0.11.0)
#
# Copyright (c) 2009 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/
#


Url:            http://code.google.com/p/google-gadgets-for-linux/

Name:           google-gadgets
Version:        0.11.0
Release:        3
License:        Apache Software License ..
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf gcc-c++ update-desktop-files zip
BuildRequires:  flex
BuildRequires:  gtk2-devel >= 2.8.0
BuildRequires:  libcurl-devel >= 7.15.0
BuildRequires:  librsvg-devel
BuildRequires:  libsoup-devel
BuildRequires:  libwebkit-devel
BuildRequires:  libxml2-devel >= 2.6.0
BuildRequires:  zlib-devel >= 1.2.0
%if 0%{suse_version} > 1110
BuildRequires:  mozilla-xulrunner191-devel >= 1.9.1
%else
%if %suse_version > 1100
# require final release, otherwise it does not build.
BuildRequires:  mozilla-xulrunner190-devel >= 1.9.0
%else
BuildRequires:  mozilla-xulrunner181-devel
%endif
%endif
%if %suse_version > 1030
BuildRequires:  gstreamer-0_10-plugins-base-devel
BuildRequires:  libQtWebKit-devel
%else
BuildRequires:  gstreamer010-plugins-base-devel
%endif
BuildRequires:  dbus-1-devel >= 1.0.2
BuildRequires:  libqt4-devel >= 4.3
BuildRequires:  NetworkManager-devel startup-notification-devel
Group:          Productivity/Networking/Web/Utilities
Source0:        %{name}-for-linux-%{version}.tar.bz2
# PATCH-FIX=UPSTREAM google-gadget-xul191.patch bnc#501397 dimstar@opensuse.org -- Fix runtime against xul 1.9.1
Patch0:         google-gadget-xul191.patch
# PATCH-FIX-UPSTREAM google-gadgets-onlyshowin.patch beineri@opensuse.org -- show only the respective host application on each desktop
Patch1:         google-gadgets-onlyshowin.patch
# PATCH-FIX-UPSTREAM google-gadgets-issue311.patch dimstar@opensuse.org -- Fix crash when starting gg, upstream svn r1289.
Patch2:         google-gadgets-issue311.patch
Summary:        Google Gadgets for Linux

%description
Google Gadgets provides a platform for running desktop gadgets. It's
compatible with the gadgets written for Google Desktop for Windows as
well as the Universal Gadgets on iGoogle.

%package gtk
License:        Apache Software License ..
Summary:        Google Gadgets for Linux and Gtk
Group:          Productivity/Networking/Web/Utilities
Requires:       %{name} = %{version}

%description gtk
Google Gadgets provides a platform for running desktop gadgets. It's
compatible with the gadgets written for Google Desktop for Windows as
well as the Universal Gadgets on iGoogle. This package provides Gtk+
support.

%package qt
License:        Apache Software License ..
Summary:        Google Gadgets for Linux and Qt
Group:          Productivity/Networking/Web/Utilities
Requires:       %{name} = %{version}

%description qt
Google Gadgets provides a platform for running desktop gadgets. It's
compatible with the gadgets written for Google Desktop for Windows as
well as the Universal Gadgets on iGoogle. This package provides Qt
support.

%package devel
License:        Apache Software License ..
Summary:        Google Gadgets for Linux - Development files
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       %{name}-qt = %{version}
Requires:       %{name}-gtk = %{version}
Requires:       dbus-1-devel gtk2-devel libqt4-devel libtool zlib-devel libuuid-devel
%if 0%{suse_version} > 1110
Requires:       mozilla-xulrunner191-devel
%else
%if %suse_version > 1100
Requires:       mozilla-xulrunner190-devel
%else
Requires:       mozilla-xulrunner181-devel
%endif
%endif

%description devel
Google Gadgets provides a platform for running desktop gadgets. It's
compatible with the gadgets written for Google Desktop for Windows as
well as the Universal Gadgets on iGoogle. This package provides the
development files.

%prep
%setup -q -n %{name}-for-linux-%{version}
%patch0 -p0
%patch1
%patch2

%build
%{suse_update_config -f}  
%configure --disable-werror --disable-static
make %{?jobs:-j%jobs}  

%install
make DESTDIR=$RPM_BUILD_ROOT install  
# disabled static. removed *.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/google-gadgets/modules/*.la
%suse_update_desktop_file -r ggl-gtk System Applet
%suse_update_desktop_file -r ggl-qt System Applet
%suse_update_desktop_file ggl-designer

%post -p /sbin/ldconfig  

%post gtk -p /sbin/ldconfig  

%post qt -p /sbin/ldconfig  

%postun -p /sbin/ldconfig  

%postun gtk -p /sbin/ldconfig  

%postun qt -p /sbin/ldconfig  

%clean
rm -rf "$RPM_BUILD_ROOT"

%files gtk
%defattr(-,root,root)
%{_libdir}/libggadget-gtk-*.so.*
%{_bindir}/ggl-gtk
%{_libdir}/google-gadgets/gtkmoz-browser-child
%dir %{_libdir}/google-gadgets/
%dir %{_libdir}/google-gadgets/modules
%{_libdir}/google-gadgets/modules/gtk*

%files qt
%defattr(-,root,root)
%{_libdir}/libggadget-qt-*.so.*
%{_bindir}/ggl-qt
%dir %{_libdir}/google-gadgets/
%dir %{_libdir}/google-gadgets/modules
%{_libdir}/google-gadgets/modules/qt*

%files
%defattr(-,root,root)
%doc AUTHORS README NEWS 
%{_datadir}/applications/*
%{_datadir}/mime/packages/*
%{_datadir}/pixmaps/*
%{_datadir}/icons/hicolor/*
%{_datadir}/google-gadgets/
%{_libdir}/libggadget-1.0*.so.*
%{_libdir}/libggadget-dbus-1.0*.so.*
%{_libdir}/libggadget-js-1.0.so.*
%{_libdir}/libggadget-npapi-1.0.so.*
%{_libdir}/libggadget-xdg-1.0.so.*
%{_libdir}/libggadget-webkitjs-1.0.so.*
%dir %{_libdir}/google-gadgets/
%dir %{_libdir}/google-gadgets/modules/
%{_libdir}/google-gadgets/modules/curl*
%{_libdir}/google-gadgets/modules/dbus*
%{_libdir}/google-gadgets/modules/default*
%{_libdir}/google-gadgets/modules/google*
%{_libdir}/google-gadgets/modules/gst*
%{_libdir}/google-gadgets/modules/html*
%{_libdir}/google-gadgets/modules/li*
%{_libdir}/google-gadgets/modules/smjs*
%{_libdir}/google-gadgets/modules/soup*
%{_libdir}/google-gadgets/modules/webkit*
%{_libdir}/google-gadgets/modules/analytics*

%files devel
%defattr(-,root,root)
%{_libdir}/lib*.so
%{_includedir}/google-gadgets/
%dir %{_libdir}/google-gadgets/
%dir %{_libdir}/google-gadgets/include/
%{_libdir}/google-gadgets/include/ggadget/
%{_libdir}/pkgconfig/*

%changelog
openSUSE Build Service is sponsored by