Name:           lxde-common
Version:        0.5.0
Release:        3%{?_dist_release}
Summary:        The default settings configuration files of LXDE

Summary(ja):    LXDE のデフォルト設定ファイル
Group:          User Interface/Desktops
License:        GPLv2+
URL:            http://lxde.sourceforge.net/
Source0:        http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz

Patch0:         %{name}-0.5.0-lxpanel-config.patch
Patch1:         %{name}-0.4-openbox.patch
Patch2:         %{name}-0.3.2.1-pcmanfm.patch

# Because of new gdm
# http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?24:mss:5608:200804:keopkmedognljeggknac
Patch3:         %{name}-0.3.2.1-gdm-number-of-desktops.patch

# Pulseaudio
Patch4:         %{name}-0.5.0-pulseaudio.patch

#Patch5:         %{name}-0.4-lxde-logout.desktop.patch
Patch6:         lxde-common-0.5.0-fix-session-startup.patch

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

BuildRequires:  desktop-file-utils
BuildRequires:  pkgconfig glib2-devel libX11-devel
Requires:       lxsession >= 0.4.0
Requires:       lxpanel pcmanfm openbox xdg-utils xorg-x11-xsm
Requires:       lxmenu-data
Requires:       lxde-icon-theme

Obsoletes:      %{name}-data <= 0.4.2

%description
This package manages the system behavior and functions
to integrate icons and artwork of LXDE. 

%description -l ja
このパッケージは LXDE - the Lightweight X11 Desktop Environment - の
アイコンやアートワークを調和するためにシステムの動作や機能を管理します。

%prep
%setup -q
%patch0 -p1 -b .orig
%patch1 -p1 -b .orig
%patch2 -p1 -b .orig
%patch3 -p1 -b .gdm-desktops
%patch4 -p1 -b .pulseaudio
#%patch5 -p1 -b .orig
%patch6 -p2 -b .session-startup

%build
%configure

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'

# only used by obsolete lxsession, not lxsession-lite
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/lxsession/LXDE/default

desktop-file-install                                           \
      --dir=$RPM_BUILD_ROOT%{_datadir}/applications            \
      lxde-logout.desktop

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%dir %{_sysconfdir}/xdg/lxsession/LXDE/
%config(noreplace) %{_sysconfdir}/xdg/lxsession/LXDE/autostart
%config(noreplace) %{_sysconfdir}/xdg/lxsession/LXDE/desktop.conf
%{_bindir}/startlxde
%{_bindir}/lxde-logout
%{_bindir}/openbox-lxde
%{_datadir}/lxde/*
%{_datadir}/lxpanel/profile/LXDE/
%{_mandir}/man1/*.1.gz
%{_datadir}/xsessions/LXDE.desktop
%{_datadir}/applications/lxde-*.desktop

%changelog
* Mon May 10 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5.0-3
- recreated and renamed Patch0
- dropt Requires: lxde-settings-daemon

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

* Thu Mar 4 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5.0-1
- new upstream release
- replaced patch4 from Fedora
- dropt Patch5
- added Patch6 from Fedora
- added Requires: lxde-icon-theme
- changed Requires: lxsession >= 0.4.0
- didn't generate lxde-icon-theme in this package 

* Wed Aug 5 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.2-2vl5
- cleaned up spec
- added Patch4 again
- changed BuildArch: noarch
- new splitted lxde-icon-theme, instead of lxde-common
  -added Obsoletes: lxde-common-data <= 0.4.2

* Sat Jul 11 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.2-1vl5
- new upstream release
- dropt Patch4

* Sat Jun 20 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.1-5vl5
- cleaned up spec
- renumbered Patch
- added Patch5 (to fixed lxde-logout.desktop)
- added BuildRequires: desktop-file-utils
- added Requires: lxmenu-data lxde-settings-daemon
- included lxde-logout.desktop
- dropt %{_sysconfdir}/xdg/lxsession/LXDE/default (not used)

* Sun Jun 7 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.1-4vl5
- deleted Obsoletes: lxsession-lite < 0.3.8

* Tue May 19 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.1-3vl5
- reverted Requires: lxsession
- changed Obsoletes: lxsession-lite < 0.3.8

* Sat May 9 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.1-2vl5
- changed Summary, description
- changed Requires: lxsession to lxsession-lite
- added Obsoletes: lxsession <= 0.3.2
- rebuilt with lxsession-lite

* Wed May 6 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4.1-1vl5
- Update to 0.4.1

* Mon May 4 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4-1vl5
- Update to 0.4
- updated Patch0,1,11
- spec in UTF-8

* Thu Mar 26 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.3.2.1-2vl5
- added Requires:xorg-x11-xsm

* Mon Mar 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.3.2.1-1vl5
- initial build for VineSeed (import from Fedora package)

* Fri Mar 06 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.2.1-4
- Workaround for new gdm
- Add Pulseaudio support
- Add mixer plugin to the panel
- Require xdg-utils

* Fri Oct 10 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.2.1-3
- Require fedora-icon-theme and system-logos

* Thu Oct 09 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.2.1-2
- Rebase patches for rpm's new fuzz=0 behaviour

* Thu Jul 10 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.2.1-1
- Update to 0.3.2.1
- Switch from ROXTerm to LXterminal
- Rebased most patches
- Add mixer to the panel 

* Mon Apr 14 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.0.1-2
- Make a separate package for lxde-icon-theme

* Sat Apr 12 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.0.1-1
- Update to 0.3.0.1
- Use distros default artwork

* Sat Mar 29 2008 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.0.0-1
- Initial Fedora RPM
- Use roxterm instead of gnome-terminal and xterm
- Patch default panel config
