Name: 		cinnamon
Summary: 	A Linux Desktop featuring a traditional layout and modern technology
Version: 	1.6.6
Release: 	1%{?_dist_release}

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

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

Patch0:		cinnamon-1.4-session.patch

# vine patch
Patch101:	cinnamon-vine-settings.patch

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

BuildRequires: 	muffin-devel >= 1.1.2
BuildRequires: 	gjs-devel >= 1.29.18
BuildRequires: 	gstreamer-plugins-base-devel >= 0.10.16
BuildRequires: 	folks-devel >= 0.5.2
BuildRequires: 	evolution-data-server-devel >= 2.32.0
BuildRequires: 	telepathy-glib-devel >= 0.15.5
BuildRequires: 	telepathy-logger-devel >= 0.2.4
BuildRequires: 	polkit-devel >= 0.100
BuildRequires: 	startup-notification-devel >= 0.11
BuildRequires: 	gnome-menus-devel
BuildRequires: 	NetworkManager-glib-devel
BuildRequires: 	libgnome-keyring-devel
BuildRequires: 	libcroco-devel >= 0.6.2
BuildRequires: 	gnome-desktop3-devel >= 2.90.0
BuildRequires: 	pulseaudio-libs-devel
BuildRequires: 	libgudev1-devel
BuildRequires: 	libcanberra-gtk3-devel
BuildRequires:	ca-certificates
BuildRequires:	GConf2-devel
BuildRequires: 	gnome-common

Requires(postun,posttrans):	glib2
Requires(postun,posttrans):	desktop-file-utils
Requires:	muffin
Requires:	python-imaging
Requires:	ca-certificates

%description
Cinnamon is a Linux desktop which provides advanced innovative features and a traditional user experience.

The desktop layout is similar to Gnome 2. 
The underlying technology is forked from Gnome Shell.
The emphasis is put on making users feel at home and providing them with an easy to use and comfortable desktop experience.

%prep
%setup -q -n Cinnamon-%{version}
%patch0 -p1
%patch101 -p1 -b .vine

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
	--disable-static \
	--enable-compile-warnings=minimum

make %{?_smp_mflags}

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

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

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

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

%postun
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-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-desktop-database -q &> /dev/null || :



%files -f %{name}.lang
%defattr(-,root,root)
%doc README NEWS COPYING AUTHORS
%{_sysconfdir}/xdg/menus/cinnamon-applications.menu
%{_sysconfdir}/xdg/menus/cinnamon-settings.menu
%{_bindir}/cinnamon
%{_bindir}/cinnamon-extension-tool
%{_bindir}/cinnamon-launcher
%{_bindir}/cinnamon-menu-editor
%{_bindir}/cinnamon-settings
%{_bindir}/cinnamon2d
%{_bindir}/gnome-session-cinnamon
%{_bindir}/gnome-session-cinnamon2d
%{_prefix}/lib/cinnamon-menu-editor
%{_prefix}/lib/cinnamon-settings
%{_libdir}/%{name}/Cinnamon-0.1.typelib
%{_libdir}/%{name}/Gvc-1.0.typelib
%{_libdir}/%{name}/St-1.0.typelib
%{_libdir}/%{name}/libcinnamon.so
%{_libdir}/mozilla/plugins/libcinnamon-browser-plugin.so
%{_libexecdir}/%{name}/cinnamon-hotplug-sniffer
%{_libexecdir}/%{name}/cinnamon-perf-helper
%{_datadir}/applications/cinnamon-settings.desktop
%{_datadir}/applications/cinnamon.desktop
%{_datadir}/applications/cinnamon2d.desktop
%{_datadir}/%{name}/applets
%{_datadir}/%{name}/js
%{_datadir}/%{name}/search_providers
%{_datadir}/%{name}/shaders
%{_datadir}/%{name}/theme
%{_datadir}/dbus-1/services/org.Cinnamon.HotplugSniffer.service
%{_datadir}/desktop-directories
%{_datadir}/glib-2.0/schemas/org.cinnamon.gschema.xml
%{_datadir}/gnome-session/sessions/cinnamon.session
%{_datadir}/gnome-session/sessions/cinnamon2d.session
%{_datadir}/xsessions/cinnamon.desktop
%{_datadir}/xsessions/cinnamon2d.desktop
%{_mandir}/man1/*.1.gz

%changelog
* Sun Nov 11 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.6-1
- new upstream release

* Fri Oct 26 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.4-1
- new upstream release
- add BuildRequires: ca-certificates
- add Requires: python-imaging

* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.3-1
- new upstream release

* Sun Sep 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release
- update Patch101 (cinnamon-vine-settings.patch)
- add BuildRequires: GConf2-devel, libcanberra-gtk3-devel

* Tue Jun 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4-UP1-1
- initial build for Vine Linux
