File python-caja.spec of Package python-caja

#
# spec file for package python-caja
#
# Copyright (c) 2015 SUSE LINUX 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 _name   caja-python
%define _version 1.10
Name:           python-caja
Version:        1.10.0
Release:        0
Summary:        Python bindings for Caja
License:        GPL-2.0+
Group:          System/GUI/Other
Url:            http://mate-desktop.org/
Source:         http://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz
BuildRequires:  mate-common
BuildRequires:  pkgconfig(libcaja-extension) >= 1.9.0
BuildRequires:  pkgconfig(pygobject-3.0)
BuildRequires:  pkgconfig(python)
Requires:       python-gobject
# We can't have automatic typelib() Requires here: it's C code: PyImport_ImportModule("gi.repository.Mate").
Requires:       typelib(Caja)
Recommends:     %{name}-lang = %{version}
Provides:       python-mate-file-manager = %{version}
Obsoletes:      python-mate-file-manager < %{version}

%description
This package contains bindings to write Caja extensions with Python.
It allows writing menu, property pages and column providers
extensions, so that Caja functionality can be easily extended.

%package devel
Summary:        Python bindings for Caja - Development Files
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Provides:       python-mate-file-manager-devel = %{version}
Obsoletes:      python-mate-file-manager-devel < %{version}

%description devel
Development files needed for writing Caja Python extensions.

This package contains bindings to write Caja extensions with Python.
It allows writing menu, property pages and column providers
extensions, so that Caja functionality can be easily extended.

%lang_package

%prep
%setup -q

%build
%configure \
  --disable-static \
  --enable-gtk-doc
make %{?_smp_mflags}

%install
%make_install
# New dir where python extensions get installed. It's not created by make install (bgo#638890).
[ ! -d %{buildroot}%{_datadir}/%{_name}/extensions/ ]
mkdir -p %{buildroot}%{_datadir}/%{_name}/extensions/
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name}
# Move documentation to a correct directory.
mkdir -p %{buildroot}%{_docdir}/
mv -f %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir}/%{name}/

%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_libdir}/caja/extensions-2.0/lib%{_name}.so
%{_datadir}/caja/extensions/lib%{_name}.caja-extension
%{_datadir}/%{_name}/

%files devel
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/%{_name}/
%{_libdir}/pkgconfig/%{_name}.pc

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by