Name:           lxsession
Version:        0.4.6.1
Release:        2%{?_dist_release}
Summary:        Lightweight X11 session manager
Summary(ja):    軽量な X11 セッションマネージャ

Group:          User Interface/Desktops
License:        GPLv2+
URL:            http://lxde.sourceforge.net/
Source0:        http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
Patch0:         lxsession-0.4.6-dsofix.patch
#Patch1:         01_fix_free_name.patch
Patch2:         04_fix-ltsp-shutdown-reboot.patch

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

BuildRequires:  gtk2-devel >= 2.6 glib2-devel >= 2.6 libICE-devel libSM-devel dbus-glib-devel
BuildRequires:  docbook-utils intltool gettext
Requires:       dbus
Obsoletes:      lxsession-lite < 0.3.8
Provides:       lxsession = %{version}-%{release}

# lxde-settings-daemon was merged into lxsession
Obsoletes:      lxde-settings-daemon <= 0.4.1
Provides:       lxde-settings-daemon = %{version}

%description
LXSession is a standard-compliant X11 session manager with shutdown/
reboot/suspend support via HAL. In connection with gdm it also supports user 
switching.

LXSession is derived from XSM and is developed as default X11 session manager 
of LXDE, the Lightweight X11 Desktop Environment. Though being part of LXDE, 
it's totally desktop-independent and only has few dependencies.

%description -l ja
LXSession は HAL を介してシャットダウン/再起動/サスペンドをサポートする
標準準拠の X11 セッションマネージャです。


%prep
%setup -q
%patch0 -p1 -b .dsofix
#%patch1 -p1
%patch2 -p1

%build
%configure
make %{?_smp_flags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
%find_lang lxsession
mkdir -p -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/xdg/lxsession

%clean
rm -rf $RPM_BUILD_ROOT


%files -f lxsession.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README desktop.conf.example
%{_bindir}/lxlock
%{_bindir}/lxsession
%{_bindir}/lxsession-logout
%{_datadir}/lxsession/
%{_mandir}/man1/lxsession*.1*
# we need to own
%dir %{_sysconfdir}/xdg/lxsession

%changelog
* Sat Aug 09 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.6.1-2
- rebuilt with current environment

* Thu Jul 28 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.6.1-1
- new upstream release
- dropt patch1

* Tue Jul 26 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.6-1
- Update to 0.4.6
- recreated Patch0
- added Patch1,2 from Ubuntu Oneiric
- dropt BuildRequires: hal-devel
- dropt Requires: hal

* Sat Nov 20 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.5-1
- Update to 0.4.5
- fixed and changed description
- dropt BuildRequires: docbook2X
- changed Provides: lxde-settings-daemon = %%{version}
- included desktop.conf.example in %%files

* Thu May 6 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.4-1
- Update to 0.4.4

* Sat Mar 20 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.3-1
- Update to 0.4.3

* Sat Mar 13 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.2-2
- applied new naming policy to spec

* Wed Mar 10 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.2-1
- Update to 0.4.2

* Thu Mar 4 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.1-1
- Update to 0.4.1
- clean up spec
- added Patch0 from Fedora
- added Obsoletes: lxde-settings-daemon <= 0.4.1
- added Provides:  lxde-settings-daemon = 0.4.1
  - Because lxde-settings-daemon was merged into lxsession

* Tue May 19 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.3.8-1
- Update to 0.3.8
- renamed lxsession (because upstream renamed)
- Source0,1 and all Patches dropped
- chaned Obsoletes: lxsession-lite < 0.3.8

* Sat May 9 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.3.6-1
- initial build for VineSeed (import from Fedora)

* Thu Oct 09 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.6-2
- Preserve timestamps during install

* Thu Jun 12 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.6-1
- Update to 0.3.6
- Remove docbook hack

* Sun Apr 20 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.5-1
- Switch to LXSession lite and drop xorg-x11-xsm requirement again.

* Sat Apr 12 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.2-2
- Require xorg-x11-xsm

* Sat Apr 12 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.2-1
- Update to 0.3.2

* Mon Mar 10 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.0-1
- Initial Fedora RPM
