File libpeas.spec of Package libpeas

#
# spec file for package libpeas
#
# 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:           libpeas
Version:        1.2.0
Release:        1
License:        LGPLv2+
Summary:        GObject-based Plugin Engine
Url:            http://live.gnome.org/Libpeas
Group:          System/Libraries
Source:         http://download.gnome.org/sources/libpeas/1.2/%{name}-%{version}.tar.bz2
BuildRequires:  intltool
BuildRequires:  libseed-gtk3-devel
BuildRequires:  python-devel
BuildRequires:  pkgconfig(gjs-internals-1.0) >= 1.29.16
BuildRequires:  pkgconfig(gladeui-2.0)
BuildRequires:  pkgconfig(gobject-2.0) >= 2.23.6
BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 0.10.1
BuildRequires:  pkgconfig(gtk+-3.0) >= 2.91.1
BuildRequires:  pkgconfig(pygobject-3.0) >= 3.0.0

%description
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

%package -n libpeas-1_0-0
License:        LGPLv2+
Summary:        GObject-based Plugin Engine
Group:          System/Libraries
# We provide %%{name} to make the lang package installable
Provides:       %{name} = %{version}
Recommends:     %{name}-lang
Recommends:     %{name}-loader-python
# Right now, it looks more likely that plugins get written with
# seed than with gjs, so reflect this with Recommends and Suggests
Recommends:     %{name}-loader-seed
Suggests:       %{name}-loader-gjs

%description -n libpeas-1_0-0
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

%package -n libpeas-gtk-1_0-0
License:        LGPLv2+
Summary:        GObject-based Plugin Engine
Group:          System/Libraries

%description -n libpeas-gtk-1_0-0
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

%package loader-gjs
License:        LGPLv2+
Summary:        GObject-based Plugin Engine - GJS runtime loader
Group:          System/Libraries
Supplements:    packageand(libpeas-1_0-0:gjs)

%description loader-gjs
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

This package contains the gjs loader.

%package loader-python
License:        LGPLv2+
Summary:        GObject-based Plugin Engine - Python runtime loader
Group:          System/Libraries
Supplements:    packageand(libpeas-1_0-0:python)

%description loader-python
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

This package contains the python loader.

%package loader-seed
License:        LGPLv2+
Summary:        GObject-based Plugin Engine - Seed runtime loader
Group:          System/Libraries
Supplements:    packageand(libpeas-1_0-0:seed)

%description loader-seed
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

This package contains the seed loader.

%package demo
License:        LGPLv2+
Summary:        GObject-based Plugin Engine -- Demo Application
Group:          System/Libraries

%description demo
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

%package -n glade-catalog-libpeas
License:        LGPLv2+
Summary:        GObject-based Plugin Engine -- Catalog for Glade
Group:          Development/Tools/GUI Builders
Requires:       libpeas-gtk-1_0-0 = %{version}
Requires:       glade
Supplements:    packageand(glade:%{name}-devel)

%description -n glade-catalog-libpeas
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

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

%package devel
License:        LGPLv2+
Summary:        GObject-based Plugin Engine -- Development Files
Group:          Development/Languages/C and C++
Requires:       libpeas-1_0-0 = %{version}
Requires:       libpeas-gtk-1_0-0 = %{version}

%description devel
libpeas is a gobject-based plugin engine, and is targetted at giving
every application the chance to assume its own extensibility.

%lang_package
%prep
%setup -q

%build
%configure \
        --enable-glade-catalog
make %{?_smp_flag} V=1

%install
%makeinstall
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%find_lang %{name} %{?no_lang_C}

%post -n libpeas-1_0-0 -p /sbin/ldconfig

%postun -n libpeas-1_0-0 -p /sbin/ldconfig

%post -n libpeas-gtk-1_0-0
/sbin/ldconfig
%icon_theme_cache_post

%postun -n libpeas-gtk-1_0-0
/sbin/ldconfig
%icon_theme_cache_postun

%files -n libpeas-1_0-0
%defattr(-, root, root)
%doc AUTHORS COPYING README
%{_libdir}/libpeas-1.0.so.*
%{_libdir}/girepository-1.0/Peas-1.0.typelib
%dir %{_libdir}/libpeas-1.0
%dir %{_libdir}/libpeas-1.0/loaders
%{_libdir}/libpeas-1.0/loaders/libcloader.so

%files -n libpeas-gtk-1_0-0
%defattr(-, root, root)
%{_libdir}/libpeas-gtk-1.0.so.*
%{_libdir}/girepository-1.0/PeasGtk-1.0.typelib
# The icon is the default icon shown for loaded plugins without own definition.
%{_datadir}/icons/hicolor/*/actions/libpeas-plugin.*

%files loader-gjs
%defattr(-, root, root)
%{_libdir}/libpeas-1.0/loaders/libgjsloader.so

%files loader-python
%defattr(-, root, root)
%{_libdir}/libpeas-1.0/loaders/libpythonloader.so

%files loader-seed
%defattr(-, root, root)
%{_libdir}/libpeas-1.0/loaders/libseedloader.so

%files demo
%defattr(-, root, root)
%{_bindir}/peas-demo
%{_libdir}/peas-demo/

%files -n glade-catalog-libpeas
%defattr(-,root,root)
%{_datadir}/glade/catalogs/libpeas-gtk.xml

%files devel
%defattr(-, root, root)
%doc %{_datadir}/gtk-doc/html/libpeas/
%{_includedir}/libpeas-1.0/
%{_libdir}/libpeas-1.0.so
%{_libdir}/libpeas-gtk-1.0.so
%{_libdir}/pkgconfig/libpeas-1.0.pc
%{_libdir}/pkgconfig/libpeas-gtk-1.0.pc
%{_datadir}/gir-1.0/Peas-1.0.gir
%{_datadir}/gir-1.0/PeasGtk-1.0.gir

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by