File caja.spec of Package caja

#
# spec file for 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:           caja
%define _libname libcaja-extension1
%define typelib typelib-1_0-Caja-2_0
Version:        1.8.0
Release:        0 
Summary:        File manager for the MATE desktop
Group:          System/GUI/Other
License:        GPL-2.0 and LGPL-2.0
Url:            http://mate-desktop.org/
Source0:        http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz

BuildRequires:  mate-common
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(exempi-2.0)
BuildRequires:  pkgconfig(gail)
BuildRequires:  pkgconfig(gio-unix-2.0)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(libexif)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(mate-desktop-2.0)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pangox)
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(unique-1.0)
Provides:       mate-file-manager = %{version}
Obsoletes:      mate-file-manager < %{version}
Recommends:		%{name}-lang

%description
Caja is the official file manager for the MATE desktop. It allows to
browse directories, preview files and launch applications associated
with them. It is also responsible for handling the icons on the MATE
desktop. It works on local and remote filesystems.

%package devel
Summary:        Caja development files
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       %{_libname} = %{version}

%description devel
Caja is the official file manager for the MATE desktop. It allows to
browse directories, preview files and launch applications associated
with them. It is also responsible for handling the icons on the MATE
desktop. It works on local and remote filesystems.

%package -n %{_libname}
Summary:        Caja shared libraries
Group:          System/Libraries
Requires:       %{name}-gsettings-schemas = %{version}

%description -n %{_libname}
Caja is the official file manager for the MATE desktop. It allows to
browse directories, preview files and launch applications associated
with them. It is also responsible for handling the icons on the MATE
desktop. It works on local and remote filesystems.

# needed for using mate-text-editor as stanalone in another DE
%package gsettings-schemas
Summary:        Caja schemas
License:        LGPL-2.0+
Group:          System/Libraries
%glib2_gsettings_schema_requires

%description gsettings-schemas
Caja is the official file manager for the MATE desktop. It allows to
browse directories, preview files and launch applications associated
with them. It is also responsible for handling the icons on the MATE
desktop. It works on local and remote filesystems.

This package provides the gsettings schemas for Caja.

%package -n %{typelib}
Summary:        MATE file manager typelib
Group:          System/GUI/Other

%description -n %{typelib}
Caja is the official file manager for the MATE desktop. It allows to
browse directories, preview files and launch applications associated
with them. It is also responsible for handling the icons on the MATE
desktop. It works on local and remote filesystems.

%lang_package

%prep
%setup -q

%build
%configure                                                              \
   --libexecdir=%{_libexecdir}/%{name}                                  \
   --disable-update-mimedb                                              \
   --disable-static                                                     \
   --enable-unique                                                      \
   --enable-introspection                                               
make %{?_smp_mflags} v=1

%install
%makeinstall
%find_lang %{name}
find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print
# Create extensions directory
mkdir -p %{buildroot}%{_libdir}/caja/extensions-2.0
mkdir -p %{buildroot}%{_datadir}/caja-extensions
if [ -d %{buildroot}%{_datadir}/MateConf ]; then
   rm -rf %{buildroot}%{_datadir}/MateConf
fi
%suse_update_desktop_file caja-autorun-software
%suse_update_desktop_file caja-browser
%suse_update_desktop_file caja-computer
%suse_update_desktop_file caja-file-management-properties
%suse_update_desktop_file caja-folder-handler
%suse_update_desktop_file caja-home
%suse_update_desktop_file caja
%suse_update_desktop_file mate-network-scheme

%post -n %{_libname} -p /sbin/ldconfig

%post
%desktop_database_post
%mime_database_post
%icon_theme_cache_post

%post gsettings-schemas
%glib2_gsettings_schema_post

%postun -n %{_libname} -p /sbin/ldconfig

%postun
%desktop_database_postun
%mime_database_postun
%icon_theme_cache_postun

%postun gsettings-schemas
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING COPYING.EXTENSIONS COPYING.LIB
%dir %{_libexecdir}/%{name}
%{_bindir}/caja
%{_bindir}/caja-autorun-software
%{_bindir}/caja-connect-server
%{_bindir}/caja-file-management-properties
%{_libexecdir}/%{name}/caja-convert-metadata
%{_datadir}/dbus-1/services/org.mate.freedesktop.FileManager1.service
%{_datadir}/applications/caja-autorun-software.desktop
%{_datadir}/applications/caja-browser.desktop
%{_datadir}/applications/caja-computer.desktop
%{_datadir}/applications/caja-file-management-properties.desktop
%{_datadir}/applications/caja-folder-handler.desktop
%{_datadir}/applications/caja-home.desktop
%{_datadir}/applications/caja.desktop
%{_datadir}/applications/mate-network-scheme.desktop
%{_datadir}/caja/
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/mime/packages/*
%{_datadir}/pixmaps/*
%{_mandir}/man1/*
# Own common extensions directories
%dir %{_libdir}/caja
%dir %{_libdir}/caja/extensions-2.0
%dir %{_datadir}/caja-extensions

%files -n %{typelib}
%defattr(-,root,root,-)
%{_libdir}/girepository-1.0/Caja-2.0.typelib

%files -n %{_libname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files gsettings-schemas
%defattr(-,root,root,-)
%{_datadir}/glib-2.0/schemas/*.xml

%files devel
%defattr(-,root,root,-)
%{_includedir}/caja/
%{_libdir}/*.so
%{_libdir}/pkgconfig/libcaja-extension.pc
%{_datadir}/gir-1.0/Caja-2.0.gir
%{_datadir}/gtk-doc/html/libcaja-extension/

%files lang -f caja.lang
%defattr(-,root,root,-)

%changelog
openSUSE Build Service is sponsored by