Name: 		nemo
Summary: 	File manager for Cinnamon
Version: 	2.4.5
Release: 	1%{?_dist_release}

Group: 		User Interface/Desktops
License:	GPLv2+
URL: 		http://cinnamon.linuxmint.com/

Source0: 	%{name}-%{version}.tar.gz

# patch for Vine
Patch2000:	nemo-1.8.5-vine.patch

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

BuildRequires:	gtk3-devel
BuildRequires:	gobject-introspection-devel
BuildRequires:	cinnamon-desktop-devel
BuildRequires:	libnotify-devel
BuildRequires:	libxml2-devel
BuildRequires:	libexif-devel
BuildRequires:	exempi-devel
BuildRequires:	tracker-devel
BuildRequires:	pygobject3-devel
BuildRequires:	python-polib
BuildRequires:	gtk-doc
BuildRequires:	gnome-common

Requires(postun,posttrans):	glib2
Requires(postun,posttrans):	desktop-file-utils
Requires(postun,posttrans):	shared-mime-info

%description
File manager for cinnamon.


%package        devel
Summary:        Development files for %{name}
Summary(ja):    %{name} の開発ファイル
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q 
%patch2000 -p1 -b .vine
sed -i "s|tracker-sparql-0.16|tracker-sparql-1.0|" configure.in

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
	--disable-static \
	--disable-packagekit

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

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

rm -rf $RPM_BUILD_ROOT%{_datadir}/mime/application

for i in XMLnamespaces aliases generic-icons globs globs2 icons magic mime.cache subclasses treemagic types version
do
	rm -f $RPM_BUILD_ROOT%{_datadir}/mime/$i
done

%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :

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

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
update-desktop-database -q &> /dev/null || :


%files
%defattr(-,root,root,-)
%doc README NEWS COPYING AUTHORS
%{_bindir}/nemo
%{_bindir}/nemo-autorun-software
%{_bindir}/nemo-connect-server
%{_bindir}/nemo-open-with
%{_libdir}/libnemo-extension.so.*
%{_libdir}/girepository-1.0/Nemo-3.0.typelib
%{_libexecdir}/nemo-convert-metadata
%{_datadir}/applications/nemo-autorun-software.desktop
%{_datadir}/applications/nemo-autostart.desktop
%{_datadir}/applications/nemo.desktop
%{_datadir}/dbus-1/services/org.Nemo.service
%{_datadir}/dbus-1/services/org.freedesktop.NemoFileManager1.service
%{_datadir}/glib-2.0/schemas/org.nemo.gschema.xml
%{_datadir}/gtksourceview-2.0/language-specs/nemo_action.lang
%{_datadir}/gtksourceview-3.0/language-specs/nemo_action.lang
%{_datadir}/icons/*/*/*
%{_datadir}/mime/packages/nemo.xml
%{_datadir}/polkit-1/actions/org.nemo.root.policy
%{_datadir}/%{name}/actions
%{_datadir}/%{name}/icons/hicolor/*/*/emblem-note.png
%{_datadir}/%{name}/nemo-extras.placeholder
%{_datadir}/%{name}/nemo-suggested.placeholder
%{_mandir}/man1/*.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}
%{_libdir}/libnemo-extension.so
%{_libdir}/pkgconfig/libnemo-extension.pc
%{_datadir}/gir-1.0/Nemo-3.0.gir


%changelog
* Sun May 10 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.5-1
- new upstream release

* Sat Jan 03 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.4-1
- new upstream release

* Wed Jul 02 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.3-1
- new upstream release

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.0-1
- new upstream release
- remove Patch0 (nemo-1.8.5-gtk-3.10.x.patch)
- change BuildRequires: cinnamon-desktop-devel instead of gnome-desktop3-devel
- add BuildRequires: pygobject3-devel, python-polib

* Tue Oct 15 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.5-2
- add Patch0 (nemo-1.8.5-gtk-3.10.x.patch)

* Sun Sep 22 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.5-1
- new upstream release
- add Patch2000 (nemo-1.8.5-vine.patch)

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-1
- new upstream release

* Sun Apr 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7.4-1
- new upstream release

* Fri Nov 02 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.8-1
- new upstream release

* Fri Oct 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.6-1
- new upstream release

* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.5-1
- initial build

