Summary:	The MATE shell and file manager
Name:		caja
Version:	1.14.1
Release:	1%{?_dist_release}

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

# for Vine
Patch2000:	caja-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(posttrans,postun):	shared-mime-info
Requires(post,postun):	gtk2
Requires(post,postun):	desktop-file-utils
Requires:	gvfs
Requires:	gvfs-fuse
Requires:	gvfs-smb
Requires:	gvfs-archive
Requires:	gvfs-gphoto2
Requires:	gvfs-mtp

Obsoletes:	mate-file-manager < 1.8.0
Provides:	mate-file-manager = %{version}-%{release}

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 %{name}
Summary(ja):    %{name} の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig
Obsoletes:		mate-file-manager-devel < 1.8.0
Provides:		mate-file-manager-devel = %{version}-%{release}

%description	devel
Header files and libraries for building a extension library for the
%{name}.


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


%description    docs
This package contains documentation for %{name}.


%prep
%setup -q
%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 \
	--disable-packagekit

%{__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 %{name}


%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 ||:
  update-mime-database %{_datadir}/mime >& /dev/null ||:
fi

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
update-mime-database %{_datadir}/mime >& /dev/null ||:


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_bindir}/%{name}
%{_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}/appdata/caja.appdata.xml
%{_datadir}/applications/*.desktop
%{_datadir}/%{name}
%{_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/%{name}
%{_mandir}/man1/*.1.gz

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

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


%changelog
* Sun May 22 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.1-1
- new upstream release

* Sun May 08 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.0-1
- new upstream release

* Sun Apr 24 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.7-1
- new upstream release

* Tue Mar 29 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.6-1
- new upstream release

* Sat Feb 20 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.4-1
- new upstream release

* Sun Feb 14 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.3-1
- new upstream release

* Sun Dec 27 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.2-1
- new upstream release

* Tue Dec 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-1
- new upstream release
- update Patch2000 (caja-vine-settings.patch)

* Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.0-1
- new upstream release
- update Patch2000 (caja-vine-settings.patch)

* Fri Oct 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.4-1
- new upstream release

* Sun Aug 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.3-1
- new upstream release

* Sun Jul 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.2-1
- new upstream release

* Sat Jun 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.1-1
- new upstream release

* Sun May 10 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-2
- fix typo

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release
- remove Patch0 (mate-file-manager-1.2.2-makefile.patch)
- add Requires: gvfs, gvfs-{fuse,smb,archive,gphoto2,mtp)

* Wed Nov 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.2-1
- new upstream release

* Sun May 11 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-1
- new upstream release
- remove Patch1 (caja-1.8.0-x-caja-desktop.patch)

* Fri Apr 18 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-1
- new upstream release
- add Patch1 (caja-1.8.0-x-caja-desktop.patch)
- rename package 

* 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

