Summary:	The MATE shell and file manager
Name:		mate-file-manager
Version:	1.6.3
Release:	1%{?_dist_release}

Source0:	http://pub.mate-desktop.org/releases/1.6/%{name}-%{version}.tar.xz

Patch0:		mate-file-manager-1.2.2-makefile.patch

# for Vine
Patch2000:	mate-file-manager-vine-settings.patch

License:	GPLv2
Group:		User Interface/Desktops
URL:		http://mate-desktop.org/

BuildRequires:	mate-common
BuildRequires:	mate-desktop-devel
BuildRequires:	gtk2-devel
BuildRequires:	pangox-compat-devel
BuildRequires:	libxml2-devel
BuildRequires:	libSM-devel
BuildRequires:	unique-devel
BuildRequires:	libexif-devel
BuildRequires:	exempi-devel
BuildRequires:	gtk-doc
BuildRequires:	autoconf
BuildRequires:	automake

Requires(posttrans,postun):	glib2
Requires(post,postun):	gtk2
Requires(post,postun):	desktop-file-utils

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
This is Caja, the file manager for the MATE desktop.


%package	devel
Summary:        Development tools for mate-file-manager
Summary(ja):    mate-file-manager の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description	devel
Header files and libraries for building a extension library for the
mate-file-manager.


%package        doc
Summary:        Documentation for mate-file-manager
Summary(ja):    mate-file-manager 用のドキュメント
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

%description    doc
This package contains documentation for mate-file-manager.


%prep
%setup -q
%patch0 -p1
%patch2000 -p1 -b .vine


%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi)
%configure \
	--libexecdir=%{_libexecdir}/mate \
	--disable-static \
	--disable-scrollkeeper \
	--enable-unique \
	--disable-update-mimedb

%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}

%{__make} install DESTDIR=${RPM_BUILD_ROOT}

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

%find_lang caja


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%post
/sbin/ldconfig

update-desktop-database %{_datadir}/applications >& /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
  update-desktop-database %{_datadir}/applications >& /dev/null ||:
  touch --no-create %{_datadir}/icons/hicolor
  gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f caja.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_bindir}/caja
%{_bindir}/caja-autorun-software
%{_bindir}/caja-connect-server
%{_bindir}/caja-file-management-properties
%{_libdir}/libcaja-extension.so.*
%{_libdir}/girepository-1.0/Caja-2.0.typelib
%{_libexecdir}/mate/caja-convert-metadata
%{_datadir}/MateConf/gsettings/caja.convert
%{_datadir}/applications/*.desktop
%{_datadir}/caja
%{_datadir}/dbus-1/services/org.mate.freedesktop.FileManager1.service
%{_datadir}/glib-2.0/schemas/org.mate.caja.gschema.xml
%{_datadir}/glib-2.0/schemas/org.mate.media-handling.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/mime/packages/caja.xml
%{_datadir}/pixmaps/caja
%{_mandir}/man1/*.1.gz

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

%files doc
%defattr(-,root,root,-)
%{_datadir}/gtk-doc/html/libcaja-extension


%changelog
* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.3-1
- new upstream release

* Wed Sep 25 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.2-2
- add Patch2000 (mate-file-manager-vine-settings.patch)

* Sun Sep 22 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.2-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release
- remove BuildRequires: mate-conf-devel
- add BuildRequires: pangox-compat-devel

* Wed Aug 01 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release

* Sat May 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.2-1
- new upstream release
- add Patch0 (mate-file-manager-1.2.2-makefile.patch)

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-2
- change category

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-1
- initial build for Vine Linux

