File python-caja.spec of Package python-caja
#
# spec file for package python-caja
#
# 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 http://bugs.opensuse.org/
#
Name: python-caja
Version: 1.8.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/1.8/%{name}-%{version}.tar.xz
BuildRequires: mate-common
BuildRequires: libtool
BuildRequires: pkgconfig(python)
BuildRequires: pkgconfig(libcaja-extension) >= 1.8.0
BuildRequires: pkgconfig(pygobject-2.0)
Requires: python-gobject2
# we can't have automatic typelib() Requires here: it's C code: PyImport_ImportModule("gi.repository.Mate")
Requires: typelib(Caja)
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 Nautilus 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 Nautilus extensions with Python.
It allows writing menu, property pages and column providers extensions,
so that Nautilus functionality can be easily extended.
%prep
%setup -q -n %{name}-%{version}
%build
%configure --disable-static \
--enable-gtk-doc
make %{?jobs:-j%jobs}
%install
%makeinstall
# New dir where python extensions get installed. It's not created by make
# install (bgo#638890).
test ! -d %{buildroot}%{_datadir}/caja-python/extensions
mkdir -p %{buildroot}%{_datadir}/caja-python/extensions
find %{buildroot} -type f -name "*.la" -delete -print
# Move documentation to correct directory
mkdir -p %{buildroot}%{_docdir}
mv %{buildroot}%{_datadir}/doc/python-caja %{buildroot}%{_docdir}
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/caja/extensions-2.0/libcaja-python.so
%dir %{_datadir}/caja-python
%dir %{_datadir}/caja-python/extensions
%{_docdir}/%{name}
%files devel
%defattr(-,root,root)
%{_datadir}/gtk-doc/html/caja-python/
%{_libdir}/pkgconfig/caja-python.pc
%changelog