File caja.spec of Package caja

#
# spec file for package 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 lname libcaja-extension1
%define typelib typelib-1_0-Caja-2_0
%define _version 1.10
Name:           caja
Version:        1.10.4
Release:        0
Summary:        File manager for the MATE desktop
License:        GPL-2.0 and LGPL-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 >= 1.9.0
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(exempi-2.0)
BuildRequires:  pkgconfig(gail)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gio-unix-2.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gthread-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libexif)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(mate-desktop-2.0) >= 1.9.0
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pangox)
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(unique-1.0)
Recommends:     %{name}-lang
Provides:       mate-file-manager = %{version}
Obsoletes:      mate-file-manager < %{version}
Obsoletes:      mate-file-manager-lang < %{version}

%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
License:        GPL-2.0 and LGPL-2.0
Group:          Development/Libraries/Other
Requires:       %{lname} = %{version}
Requires:       %{name} = %{version}
Provides:       mate-file-manager-devel = %{version}
Obsoletes:      mate-file-manager-devel < %{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 %{lname}
Summary:        Caja shared libraries
License:        GPL-2.0 and LGPL-2.0
Group:          System/Libraries
Requires:       %{name}-gsettings-schemas = %{version}

%description -n %{lname}
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 pluma as standalone from MATE.

%package gsettings-schemas
Summary:        Caja schemas
License:        LGPL-2.0+
Group:          System/Libraries
Obsoletes:      mate-file-manager < %{version}
%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
License:        GPL-2.0 and LGPL-2.0
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}

%install
%make_install
%find_lang %{name}
find %{buildroot} -type f -name "*.la" -delete -print
# Create extensions directories.
mkdir -p %{buildroot}%{_libdir}/caja/extensions-2.0/ \
  %{buildroot}%{_datadir}/caja-extensions/ \
  %{buildroot}%{_datadir}/caja/extensions

%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

if [ -d %{buildroot}%{_datadir}/MateConf/ ]; then
    rm -rf %{buildroot}%{_datadir}/MateConf/
fi

%post
%desktop_database_post
%mime_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%mime_database_postun
%icon_theme_cache_postun

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

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

%post gsettings-schemas
%glib2_gsettings_schema_post

%postun gsettings-schemas
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.EXTENSIONS COPYING.LIB NEWS
%{_bindir}/caja
%{_bindir}/caja-autorun-software
%{_bindir}/caja-connect-server
%{_bindir}/caja-file-management-properties
%{_libexecdir}/caja/
%{_datadir}/caja/
%{_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}/icons/hicolor/*/*/*
%{_datadir}/pixmaps/*
%{_datadir}/mime/packages/*
%{_mandir}/man?/*
%dir %{_datadir}/appdata/
%{_datadir}/appdata/caja.appdata.xml
# Own common extensions directories.
%dir %{_libdir}/caja/
%dir %{_libdir}/caja/extensions-2.0/
%dir %{_datadir}/caja/extensions/
%dir %{_datadir}/caja-extensions/

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

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

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

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

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

%changelog
openSUSE Build Service is sponsored by