Summary:	The MATE Session Handler
Name:		mate-session-manager
Version:	1.14.0
Release:	1%{?_dist_release}
Source0:	http://pub.mate-desktop.org/releases/1.14/%{name}-%{version}.tar.xz
License:	GPLv2
Group:		User Interface/Desktops
URL:		http://mate-desktop.org/

# patch for Vine
Patch1001:	mate-session-manager-1.12.2-use-vine-sleep-helper.patch
Patch1002:	mate-session-manager-1.12.0-mate-wm.patch

BuildRequires:	mate-common
BuildRequires:	gtk2-devel
BuildRequires:	dbus-glib-devel
BuildRequires:	libSM-devel
BuildRequires:	libXtst-devel
BuildRequires:	mate-desktop-devel
BuildRequires:	gtk-doc
BuildRequires:	autoconf
BuildRequires:	automake

Requires:	vine-sleep-helper
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
mate-session contains the MATE session manager, as well as a
configuration program to choose applications starting on login.


%prep
%setup -q
%patch1001 -p1 -b .vine
%patch1002 -p1 -b .vine


%build
NOCONFIGURE=1 ./autogen.sh
%configure \
	--disable-static \
	--disable-upower \
	--with-default-wm=mate-wm

%{__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
/usr/bin/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
  /usr/bin/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 %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_bindir}/mate-session
%{_bindir}/mate-session-inhibit
%{_bindir}/mate-session-properties
%{_bindir}/mate-session-save
%{_bindir}/mate-wm
%{_datadir}/applications/mate-session-properties.desktop
%{_datadir}/applications/mate-wm.desktop
%{_datadir}/glib-2.0/schemas/org.mate.session.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/mate-session-manager/gsm-inhibit-dialog.ui
%{_datadir}/mate-session-manager/session-properties.ui
%{_datadir}/xsessions/mate.desktop
%{_mandir}/man1/*.1.gz


%changelog
* 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.2-1
- new upstream release
- update Patch1001 (mate-session-manager-1.12.2-use-vine-sleep-helper.patch)

* Tue Dec 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-1
- new upstream release

* Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.0-1
- new upstream release
- add Patch1002 (mate-session-manager-1.12.0-mate-wm.patch)

* Wed Sep 02 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.2-3
- add configure option (--with-default-wm=mate-wm)

* Sun Aug 30 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.2-2
- add Patch1001 (mate-session-manager-1.10.2-use-vine-sleep-helper.patch)
- add Requires: vine-sleep-helper

* 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

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release
- add BuildRequires: mate-desktop-devel

* Sun Sep 21 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-2
- remove BuildRequires: libupower09-devel

* Mon Apr 14 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-1
- new upstream release
- add BuildRequires: libupower09-devel
- remove BuildRequires: upower-devel

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-2
- rebuild with VineSeed environment

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

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.0-1
- new upstream release
- remove BuildRequires: mate-conf-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.1-1
- new upstream release

* 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

