Name:           lxde-common
Version:        0.5.5
Release:        2%{?_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
Source1:        lxde-desktop-preferences.desktop
Source2:        lxde-screenlock.desktop

#Vine specific customize
Patch0:         %{name}-0.5.5-lxpanel-config.patch
Patch1:         %{name}-0.5.5-pcmanfm-config.patch
Patch2:         %{name}-0.5.5-openbox-menu.patch
Patch3:         %{name}-lxde-logout.patch

Patch11:        10_ensure-dbus-launch.patch
Patch12:        11_ensure-desktop-folder.patch
Patch13:        13_ensure-menu-prefix.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
Requires:       xscreensaver

# needed because of new gdm
Requires:       xorg-x11-utils

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 .orig
%patch11 -p1
%patch12 -p1
%patch13 -p1

%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
desktop-file-install                                           \
      --dir=%{buildroot}%{_datadir}/applications               \
      %{SOURCE2}
install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/

%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
%dir %{_sysconfdir}/xdg/pcmanfm/
%config(noreplace) %{_sysconfdir}/xdg/pcmanfm/LXDE/pcmanfm.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
* Sun Apr 01 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5.5-2
- fixed Patch2

* Wed Feb 15 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5.5-1
- new upstream release
- removed patch1-6
  - recreated and renumbered patch 0,1,2,3
- added Patch11,12,13 from Debian sid
- added Source1,2 from Fedora rawhide
  - modified a little
- added Requires: xscreensaver

* 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