# Review at https://bugzilla.redhat.com/show_bug.cgi?id=540034

#%global alphatag 20091231svn2262

Name:           lxdm
Version:        0.3.0
Release:        1%{?_dist_release}
Summary:        Lightweight X11 Display Manager
Summary(ja):    軽量な X11 ディスプレイマネージャ

Group:          User Interface/Desktops
License:        GPLv2+ and LGPLv2+
URL:            http://lxde.org
Source0:        http://downloads.sourceforge.net/sourceforge/lxde/%{name}-%{version}.tar.gz
## distro specific patches ##
# we use tty1 by default
#Patch10:        lxdm-svn2145-tty1-patch

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

BuildRequires:  gtk2-devel >= 2.12.0
BuildRequires:  ConsoleKit-devel
BuildRequires:  gettext
BuildRequires:  intltool >= 0.40.0
BuildRequires:  iso-codes
BuildRequires:  libXmu-devel
BuildRequires:  pam-devel
BuildRequires:  perl-XML-Parser
Requires:       pam
Requires:       /sbin/shutdown
Requires:       desktop-backgrounds
# needed for anaconda to boot into runlevel 5 after install
Provides:       service(graphical-login)


%description
LXDM is the future display manager of LXDE, the Lightweight X11 Desktop 
environment. It is designed as a lightweight alternative to replace GDM or 
KDM in LXDE distros. It's still in very early stage of development.

%description -l ja
LXDM は LXDE - Lightweight X11 Desktop environment - の次世代型
ディスプレイマネージャです。これは LXDE のディストリビューションで
GDM あるいは KDM を置き換える軽量化の代替手段として設計されています。
LXDM はまだ開発のごく初期の段階にあります。

%prep
%setup -q
#%patch10 -p1 -b .tty7


%build
%configure
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

# these files are not in the package, but should be owned by lxdm
touch %{buildroot}%{_sysconfdir}/%{name}/xinitrc
mkdir -p %{buildroot}%{_localstatedir}/run
touch %{buildroot}%{_localstatedir}/run/%{name}.pid
mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/%{name}.log

%find_lang %{name}



%clean
rm -rf %{buildroot}


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README TODO gpl-2.0.txt lgpl-2.1.txt
%dir %{_sysconfdir}/lxdm
%ghost %config(noreplace,missingok) %{_sysconfdir}/%{name}/xinitrc
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/Xsession
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/LoginReady
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PostLogin
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PostLogout
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreLogin
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreReboot
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreShutdown
%config %{_sysconfdir}/%{name}/lxdm.conf
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
%{_sbindir}/%{name}
%{_sbindir}/lxdm-binary
%{_libexecdir}/lxdm-greeter-gdk
%{_libexecdir}/lxdm-greeter-gtk
%{_libexecdir}/lxdm-numlock
%{_datadir}/%{name}/
%ghost %{_localstatedir}/run/%{name}.pid
%ghost %{_localstatedir}/log/%{name}.log


%changelog
* Thu Sep 30 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.3.0-1
- new upstream release

* Sat May 8 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.2.0-1
- new upstream release
- added BuildRequires: gettext, perl-XML-Parser, iso-codes
- almost improved %files section

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

* Wed Feb 17 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.1.0-2
- dropt Patch10
- added Japanese description
- added %doc in %files section

* Tue Feb 2 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.1.0-1
- initial build for VineSeed

* Fri Jan 08 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.1.0-1
- Update to 0.1.0
- Change license to GPLv2+ and LGPLv2+
- Use tty1 by default
- PAM fixes for SELinux (#552885)

* Mon Nov 16 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.0.3-0.2.20091116svn2145
- Review fixes

* Mon Nov 16 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.0.3-0.1.20091116svn2145
- Update to SVN release 2145

* Thu Nov 05 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.0.3-0.1.20091105svn2132
- Update to SVN release 2132

* Sat Oct 31 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.0.3-0.1.20091031svn2100
- Update to SVN release 2100

* Tue Oct 20 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.0.3-0.1.20091020svn2082
- Update to SVN release 2082

* Fri Sep 18 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.0.2-1
- Initial Fedora package