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

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

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

# patch from alt
# http://git.altlinux.org/people/cow/packages/?p=cinnamon.git;a=summary

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

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

BuildRequires: 	muffin-devel >= 1.9.1
BuildRequires: 	cjs-devel >= 1.9.0
BuildRequires: 	gstreamer1-plugins-base-devel >= 1.0.0
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: 	cinnamon-menus-devel
BuildRequires: 	NetworkManager-glib-devel
BuildRequires: 	libgnome-keyring-devel
BuildRequires: 	libcroco-devel >= 0.6.2
BuildRequires: 	cinnamon-desktop-devel
BuildRequires: 	pulseaudio-libs-devel
BuildRequires: 	eudev-libgudev1-devel
BuildRequires: 	libcanberra-gtk3-devel
BuildRequires: 	gnome-bluetooth-devel
BuildRequires:	ca-certificates
BuildRequires:	GConf2-devel
BuildRequires: 	gnome-common

Requires(postun,posttrans):	glib2
Requires(postun,posttrans):	desktop-file-utils
Requires:	muffin
Requires:	pciutils
Requires:	cinnamon-session
Requires:	cinnamon-menus
Requires:	gksu
Requires:	python-imaging
Requires:	python-pam
Requires:	python-pexpect
Requires:	python-lxml
Requires:	ca-certificates

Vendor:			Project Vine
Distribution:	Vine Linux
Packager:		Takemikaduchi

%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}
%patch101 -p1 -b .vine

# fix PAM module
sed -i 's:import PAM:import pam:' files/usr/lib/cinnamon-settings/modules/cs_user.py

%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 {} \;


%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
%defattr(-,root,root)
%doc README NEWS COPYING AUTHORS
%{_sysconfdir}/xdg/menus/cinnamon-applications.menu
%{_sysconfdir}/xdg/menus/cinnamon-applications-merged
%{_bindir}/cinnamon
%{_bindir}/cinnamon-desktop-editor
%{_bindir}/cinnamon-extension-tool
%{_bindir}/cinnamon-json-makepot
%{_bindir}/cinnamon-launcher
%{_bindir}/cinnamon-looking-glass
%{_bindir}/cinnamon-menu-editor
%{_bindir}/cinnamon-preview-gtk-theme
%{_bindir}/cinnamon-screensaver-lock-dialog
%{_bindir}/cinnamon-settings
%{_bindir}/cinnamon-session-cinnamon
%{_bindir}/cinnamon-session-cinnamon2d
%{_bindir}/cinnamon-settings-users
%{_bindir}/cinnamon-slideshow
%{_bindir}/cinnamon2d
%{_prefix}/lib/cinnamon-desktop-editor
%{_prefix}/lib/cinnamon-json-makepot
%{_prefix}/lib/cinnamon-looking-glass
%{_prefix}/lib/cinnamon-menu-editor
%{_prefix}/lib/cinnamon-screensaver-lock-dialog
%{_prefix}/lib/cinnamon-settings
%{_prefix}/lib/cinnamon-settings-users
%{_prefix}/lib/cinnamon-slideshow/cinnamon-slideshow.py
%{_libdir}/%{name}/Cinnamon-0.1.typelib
%{_libdir}/%{name}/CinnamonJS-0.1.typelib
%{_libdir}/%{name}/Gvc-1.0.typelib
%{_libdir}/%{name}/St-1.0.typelib
%{_libdir}/%{name}/libcinnamon.so
%{_libdir}/%{name}/libcinnamon-js.so
%{_libexecdir}/%{name}/cinnamon-hotplug-sniffer
%{_libexecdir}/%{name}/cinnamon-perf-helper
%{_datadir}/applications/cinnamon-menu-editor.desktop
%{_datadir}/applications/cinnamon-settings.desktop
%{_datadir}/applications/cinnamon-settings-applets.desktop
%{_datadir}/applications/cinnamon-settings-backgrounds.desktop
%{_datadir}/applications/cinnamon-settings-calendar.desktop
%{_datadir}/applications/cinnamon-settings-default.desktop
%{_datadir}/applications/cinnamon-settings-desklets.desktop
%{_datadir}/applications/cinnamon-settings-desktop.desktop
%{_datadir}/applications/cinnamon-settings-effects.desktop
%{_datadir}/applications/cinnamon-settings-extensions.desktop
%{_datadir}/applications/cinnamon-settings-fonts.desktop
%{_datadir}/applications/cinnamon-settings-general.desktop
%{_datadir}/applications/cinnamon-settings-hotcorner.desktop
%{_datadir}/applications/cinnamon-settings-info.desktop
%{_datadir}/applications/cinnamon-settings-keyboard.desktop
%{_datadir}/applications/cinnamon-settings-mouse.desktop
%{_datadir}/applications/cinnamon-settings-notifications.desktop
%{_datadir}/applications/cinnamon-settings-panel.desktop
%{_datadir}/applications/cinnamon-settings-power.desktop
%{_datadir}/applications/cinnamon-settings-privacy.desktop
%{_datadir}/applications/cinnamon-settings-screensaver.desktop
%{_datadir}/applications/cinnamon-settings-themes.desktop
%{_datadir}/applications/cinnamon-settings-tiling.desktop
%{_datadir}/applications/cinnamon-settings-user.desktop
%{_datadir}/applications/cinnamon-settings-users.desktop
%{_datadir}/applications/cinnamon-settings-windows.desktop
%{_datadir}/applications/cinnamon-settings-workspaces.desktop
%{_datadir}/applications/cinnamon.desktop
%{_datadir}/applications/cinnamon2d.desktop
%{_datadir}/cinnamon-session/sessions/cinnamon.session
%{_datadir}/cinnamon-session/sessions/cinnamon2d.session
%{_datadir}/%{name}/applets
%{_datadir}/%{name}/bumpmaps
%{_datadir}/%{name}/desklets
%{_datadir}/%{name}/faces
%{_datadir}/%{name}/icons
%{_datadir}/%{name}/js
%{_datadir}/%{name}/search_providers
%{_datadir}/%{name}/theme
%{_datadir}/%{name}/thumbnails
%{_datadir}/dbus-1/services/org.Cinnamon.HotplugSniffer.service
%{_datadir}/dbus-1/services/org.Cinnamon.Melange.service
%{_datadir}/dbus-1/services/org.Cinnamon.Slideshow.service
%{_datadir}/desktop-directories
%{_datadir}/glib-2.0/schemas/org.cinnamon.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/polkit-1/actions/org.cinnamon.settings-users.policy
%{_datadir}/xsessions/cinnamon.desktop
%{_datadir}/xsessions/cinnamon2d.desktop
%{_mandir}/man1/*.1.gz


%changelog
* Sun May 10 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.8-1
- new upstream release
- add BuildRequires: gnome-bluetooth-devel
- add Requires: pciutils, gksu, python-lxml
- changeg BuildRequires:i gstreamer1-plugins-base-devel instead of gstreamer-plugins-base-devel

* Sat Jan 03 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.5-1
- new upstream release
- update Patch101 (cinnamon-2.4.5-vine-settings.patch)

* Sun Aug 31 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.16-1
- new upstream release

* Wed Jul 02 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.14-1
- new upstream release
- change BuildRequires: eudev-libgudev1-devel instead of libgudev1-devel
- update Patch101 (cinnamon-vine-settings.patch)

* Sun Apr 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.3-1
- new upstream release
- remove Patch0 (cinnamon-1.7.6-gjs-1.0.patch)
- remove Patch1 (cinnamon-1.7.6-clutter_disable_xinput.patch)
- remove Patch2 (cinnamon-1.8.8.1-gjs-1.38.x.patch)

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.8.1-2
- rebuild with cogl-1.16.0
- add Patch2 (cinnamon-1.8.8.1-gjs-1.38.x.patch)

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

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

* Sun Apr 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7.6-1
- new upstream release
- add Patch0 (cinnamon-1.7.6-gjs-1.0.patch)
- add Patch1 (cinnamon-1.7.6-clutter_disable_xinput.patch)

* 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
