Пакет mate-file-manager: Specfile

# BEGIN SourceDeps(oneline):
BuildRequires: /usr/bin/glib-genmarshal /usr/bin/glib-gettextize /usr/bin/gtkdocize /usr/bin/perl5 /usr/bin/pkg-config /usr/bin/update-mime-database gobject-introspection-devel libICE-devel libSM-devel libX11-devel libXrender-devel libgio-devel libgtk+2-gir-devel libselinux-devel pkgconfig(gail) pkgconfig(gio-2.0) pkgconfig(gio-unix-2.0) pkgconfig(glib-2.0) pkgconfig(gmodule-2.0) pkgconfig(gthread-2.0) pkgconfig(gtk+-2.0) pkgconfig(gtk+-3.0) pkgconfig(pango) pkgconfig(unique-3.0) xorg-xproto-devel
# END SourceDeps(oneline)
%define _libexecdir %_prefix/libexec
Name:       mate-file-manager
Summary:    File manager for MATE
Version:    1.6.2
Release:    alt1_3.M70C.2
License:    GPLv2+ and LGPLv2+
Group:      Graphical desktop/Other
URL:        http://mate-desktop.org
Source0:    http://pub.mate-desktop.org/releases/1.6/%{name}-%{version}.tar.xz
Source1:    caja-autostart.desktop

# upstream patch to fix wrong hicolors directory
Patch0:     mate-file-manager_fix_privat-icons-dir.patch

BuildRequires:  mate-desktop-devel
BuildRequires:  pkgconfig(sm)
BuildRequires:  desktop-file-utils
BuildRequires:  pkgconfig(libstartup-notification-1.0)
BuildRequires:  pkgconfig(libexif)
BuildRequires:  pkgconfig(exempi-2.0)
BuildRequires:  pkgconfig(libselinux)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(unique-1.0)
BuildRequires:  mate-common
BuildRequires:  mate-doc-utils
BuildRequires:  pkgconfig(cairo-gobject)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(pangox)

Requires:   gamin
Requires:   filesystem
Requires:   altlinux-freedesktop-menu-common
Requires:   gvfs
# the main binary links against libcaja-extension.so
# don't depend on soname, rather on exact version
Requires:       %{name}-extensions%{?_isa} = %{version}-%{release}
# needed for using mate-text-editor as stanalone in another DE
Requires:       %{name}-schemas%{?_isa} = %{version}-%{release}
Source44: import.info
Patch33: mate-file-manager-1.2.2-alt-fix-linkage.patch
Patch34: nautilus-2.22.1-umountfstab.patch
Patch35: mate-file-manager-1.5.5-alt-desktop-labels-po-ru.patch

%description
Caja (mate-file-manager) is the file manager and graphical shell
for the MATE desktop,
that makes it easy to manage your files and the rest of your system.
It allows to browse directories on local and remote file systems, preview
files and launch applications associated with them.
It is also responsible for handling the icons on the MATE desktop.

%package extensions
Summary:  Mate-file-manager extensions library
License:  LGPLv2+
Group:    Development/C
Requires: %{name}%{?_isa} = %{version}-%{release}

%description extensions
This package provides the libraries used by caja extensions.

# needed for using mate-text-editor as stanalone in another DE
%package schemas
Summary:  Mate-file-manager schemas
License:  LGPLv2+
Group:    Development/C

%description schemas
This package provides the gsettings schemas for caja.

%package devel
Summary:  Support for developing mate-file-manager extensions
License:  LGPLv2+
Group:    Development/C
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
This package provides libraries and header files needed
for developing caja extensions.

%prep
%setup -q
%patch0 -p1 -b .privat-icons-dir
%patch33 -p1
%patch35 -p1
autoreconf -i -f
%patch34 -p1

%build
%configure \
        --disable-static \
        --enable-unique \
        --disable-schemas-compile \
        --with-x \
        --with-gtk=2.0 \
        --disable-update-mimedb


#drop unneeded direct library deps with --as-needed
# libtool doesn't make this easy, so we do it the hard way
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool

make %{?_smp_mflags} V=1

%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'

rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/.icon-theme.cache

mkdir -p $RPM_BUILD_ROOT%{_libdir}/caja/extensions-2.0

desktop-file-install --dir=$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart %{SOURCE1}

desktop-file-install									\
	--delete-original								\
	--dir=$RPM_BUILD_ROOT%{_datadir}/applications					\
$RPM_BUILD_ROOT%{_datadir}/applications/*.desktop

# remove needless gsettings convert file to avoid slow session start
rm -f  %{buildroot}%{_datadir}/MateConf/gsettings/caja.convert


%find_lang caja


%files
%doc AUTHORS COPYING COPYING-DOCS COPYING.LIB NEWS README
%{_bindir}/*
%{_datadir}/caja
%{_libdir}/caja/
%{_datadir}/pixmaps/caja/
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/caja.png
%{_datadir}/icons/hicolor/scalable/apps/caja.svg
%{_datadir}/icons/hicolor/*/emblems/emblem-note.png
%{_mandir}/man1/*
%{_libexecdir}/caja-convert-metadata
%{_datadir}/mime/packages/caja.xml
%{_datadir}/dbus-1/services/org.mate.freedesktop.FileManager1.service
%{_sysconfdir}/xdg/autostart/caja-autostart.desktop

%files extensions
%{_libdir}/libcaja-extension.so.*
%{_libdir}/girepository-1.0/*.typelib

%files schemas -f caja.lang
%{_datadir}/glib-2.0/schemas/org.mate.*.gschema.xml

%files devel
%doc %{_datadir}/gtk-doc/html/libcaja-extension/
%{_includedir}/caja/
%{_libdir}/pkgconfig/*
%{_libdir}/*.so
%{_datadir}/gir-1.0/*.gir


%changelog
* Mon Apr 07 2014 Anton V. Boyarshinov <boyarsh@altlinux.ru> 1.6.2-alt1_3.M70C.2
- patches from timonbl4@ for working on different security levels

* Tue Jan 21 2014 Timur Aitov <timonbl4@altlinux.org> 1.6.2-alt1_3.M70C.1
- build for c7

* Mon Aug 19 2013 Igor Vlasenko <viy@altlinux.ru> 1.6.2-alt1_3
- new fc release

* Wed Aug 07 2013 Igor Vlasenko <viy@altlinux.ru> 1.6.2-alt1_2
- new fc release

* Mon Jul 22 2013 Igor Vlasenko <viy@altlinux.ru> 1.6.2-alt1_1
- new fc release

* Tue Jun 04 2013 Igor Vlasenko <viy@altlinux.ru> 1.6.1-alt2_4
- new fc release

* Tue Apr 30 2013 Igor Vlasenko <viy@altlinux.ru> 1.6.1-alt2_1
- added 0001-Fix-radio-buttons-and-GSettings-in-preferences-windo.patch

* Mon Apr 15 2013 Igor Vlasenko <viy@altlinux.ru> 1.6.1-alt1_1
- new fc release

* Sat Apr 06 2013 Igor Vlasenko <viy@altlinux.ru> 1.6.0-alt1_1
- new fc release

* Thu Mar 28 2013 Igor Vlasenko <viy@altlinux.ru> 1.5.5-alt1_1
- new fc release

* Tue Mar 05 2013 Igor Vlasenko <viy@altlinux.ru> 1.5.4-alt1_1
- new fc release

* Wed Feb 20 2013 Igor Vlasenko <viy@altlinux.ru> 1.5.3-alt1_1
- new fc release

* Sun Feb 17 2013 Igor Vlasenko <viy@altlinux.ru> 1.5.3-alt1_0
- new version

* Tue Dec 04 2012 Igor Vlasenko <viy@altlinux.ru> 1.5.2-alt1_1
- new fc release

* Tue Nov 27 2012 Igor Vlasenko <viy@altlinux.ru> 1.5.1-alt1_2
- new fc release

* Wed Nov 21 2012 Igor Vlasenko <viy@altlinux.ru> 1.5.0-alt2_4
- added desktop label localization patch

* Wed Nov 21 2012 Igor Vlasenko <viy@altlinux.ru> 1.5.0-alt1_4
- new bugfix fc release

* Fri Nov 16 2012 Igor Vlasenko <viy@altlinux.ru> 1.5.0-alt1_3
- use F19 import base

* Wed Oct 24 2012 Anton V. Boyarshinov <boyarsh@altlinux.ru> 1.4.0-alt2_1.1
- Build for Sisyphus

* Mon Oct 15 2012 Igor Vlasenko <viy@altlinux.ru> 1.4.0-alt2_1
- adapted alt patches

* Thu Aug 02 2012 Igor Vlasenko <viy@altlinux.ru> 1.4.0-alt1_1
- 20120801 mate snapshot

* Wed Jun 27 2012 Igor Vlasenko <viy@altlinux.ru> 1.2.2-alt1_2
- 20120622 mate snapshot

* Tue May 01 2012 Igor Vlasenko <viy@altlinux.ru> 1.2.0-alt1_1
- converted by srpmconvert script