Name: 		xfce4-session
Summary: 	Xfce Session manager
Summary(ja):    Xfce セッションマネージャ
Version: 	4.8.0
Release: 	2%{?_dist_release}

Group: 		User Interface/Desktops
License:	GPLv2+
URL: 		http://www.xfce.org/

Source0: 	http://www.us.xfce.org/archive/xfce-%{version}/src/%{name}-%{version}.tar.bz2
Patch0:		xfce4-session-4.5.92-hide-tips.patch

BuildRoot: 	%{_tmppath}/%{name}-%{version}-root
BuildRequires:  chrpath
BuildRequires:  dbus-devel >= 1.0.0
BuildRequires:  dbus-glib-devel >= 0.73
BuildRequires:  GConf2-devel >= 2.4.0
BuildRequires:  gettext
BuildRequires:  gtk2-devel >= 2.14.0
BuildRequires:  intltool
BuildRequires:  libwnck-devel >= 2.22.0
BuildRequires: 	libxfce4ui-devel >= 4.8.0
BuildRequires: 	libxfce4util-devel >= 4.8.0
BuildRequires:  xfce4-panel-devel >= 4.8.0
BuildRequires:  xfconf-devel >= 4.8.0
BuildRequires:  libSM-devel
BuildRequires:  xorg-x11-server-utils

BuildRequires: 	hal-devel
BuildRequires:  upower-devel
BuildRequires:  ConsoleKit-devel
BuildRequires:  polkit-devel
#Requires:	libxfcegui4 >= 4.6.0
Requires:	xorg-x11-server-utils
Requires:       fortune-mod

%description
xfce4-session is the session manager for the Xfce desktop environment.

%package devel
Summary:	Development files for xfce4-session
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	libxfce4ui-devel >= 4.8.0
Requires:	xfconf-devel >= 4.8.0

%description devel
Header files for the Xfce Session Manager.

%package engines
Summary:	Additional engines for xfce4-session
Group:		User Interface/Desktops
Requires:	%{name} = %{version}-%{release}

%description engines
Additional splash screen engines for the Xfce Session Manager.

%prep
%setup -q
%patch0 -p1 -b .disable-tips

%build
%configure --enable-silent-rules --enable-gnome --enable-final --disable-static
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir}

chrpath --delete $RPM_BUILD_ROOT%{_libdir}/xfce4/session/xfsm-shutdown-helper

## remove unuse files
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{_libdir}/xfce4/panel/plugins/*.la
rm -rf $RPM_BUILD_ROOT%{_libdir}/xfce4/session/splash-engines/*.la

rm -rf _docs_to_include
mkdir -p _docs_to_include
mv $RPM_BUILD_ROOT%{_docdir}/%{name}/* _docs_to_include

%find_lang %{name}


%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor

%posttrans 
gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
    gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%doc _docs_to_include/html
%dir %{_sysconfdir}/xdg/autostart/
%config(noreplace) %{_sysconfdir}/xdg/autostart/xfce4-tips-autostart.desktop
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml
%{_bindir}/*
%{_libdir}/lib*.so.*
%{_libdir}/xfce4/panel/plugins/*.so
%dir %{_libdir}/xfce4/session
%{_libdir}/xfce4/session/splash-engines/libmice.so
%{_libdir}/xfce4/session/xfsm-shutdown-helper
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/xfce4/*
%{_mandir}/man1/*

%files devel
%defattr(-,root,root)
%{_includedir}/xfce4/xfce4-session-4.6
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc

%files engines
%defattr(-,root,root)
%{_libdir}/xfce4/session/balou-*-theme
%{_libdir}/xfce4/session/splash-engines/libbalou.*
%{_libdir}/xfce4/session/splash-engines/libsimple.*
%{_datadir}/themes/Default/balou/

%changelog
* Sun Apr 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.8.0-2
- add BuildRequires: libSM-devel

* Tue Mar 29 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.8.0-1
- new upstream release

* Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.6.2-2
- rebuild with rpm-4.8.1 for pkg-config file

* Sun May 23 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.2-1
- new upstream release
- built with new toolchain

* Sat May 23 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.1-1
- new upstream release
- added %%post and %%postun section

* Sun Sep 21 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.2-3vl5
- added BuildRequires: libxfce4util-devel
- added Japanese summary

* Sat Sep 20 2008 Shu KONNO <owa@bg.wakwak.com> 4.4.2-2vl5
- applied new versioning policy
- removed *.la

* Sun Dec 23 2007 UECHI Yasumasa <uechi@potaway.net> 4.4.2-1vl2
- new upstream release.

* Sun Jul 29 2007 UECHI Yasumasa <uechi@potaway.net> 4.4.1-1vl2
- build for VineSeed

* Sat Jul 28 2007 UECHI Yasumasa <uechi@potaway.net> 4.4.1-1vl1
- new upstream version
- add fortune-mod to Requires for xfce4-tips

* Sat Dec 10 2005 UECHI Yasumasa <uechi@potaway.net> 4.2.3-1vl1
- new upstream release

* Mon Jun 13 2005 UECHI Yasumasa <uechi@potaway.net> 4.2.2-1vl2
- new upstream release

* Thu Mar 31 2005 UECHI Yasumasa <uechi@potaway.net> 4.2.1-1vl2
- new upstream release

* Sun Jan 23 2005 UECHI Yasumasa <uechi@potaway.net> 4.2.0-1vl2
- initial release for VineSeedPlus

