Name:			gdm2setup
Summary:		GDM2 Setup utility
Summary(ja):		GDM2 設定ユーティリティ
Version:		0.5.3
Release:                6%{?_dist_release}
License:		GPLv3
Group:			User Interface/X
URL:			https://launchpad.net/gdm2setup

Source0:                http://launchpad.net/gdm2setup/0.2/0.5.0/+download/gdm2setup.tar.gz
Source1:                gdm2setup-0.5.3-ja.tar.bz2
Source2:                gdm2setup.desktop
Patch0:                 gdm2setup-0.5.3-install-fix.patch
Patch1:                 gdm2setup-0.5.3-vine.patch
Patch2:                 gdm2setup-0.5.3-gettext.patch
Patch3:                 gdm2setup-0.5.3-remove-blur-option.patch
Patch4:			gdm2setup-0.5.3-fix-case-sensitive.patch
Patch5:			gdm2setup-0.5.3-fix-typo.patch
Patch6:			gdm2setup-0.5.3-enable-show-userlist.patch
Patch7:			gdm2setup-0.5.3-disable-debug.patch
Patch8:			gdm2setup-0.5.3-fix-timedlogin.patch

BuildRoot:              %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch:		noarch
BuildRequires:		python-devel, python-setuptools
Requires:		pygtk2, gksu, python-imaging

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke

%description
A simple setup utility for the new GDM2 included in Karmic Ubuntu.
GDM2Setup allows the user to set login wallpaper, select automatic 
login or prompted, user list or input box login, and much more. 
This application's goal is to put the older GDM setup utility 
functionality back into Ubuntu and other Gnome based Linux distributions.

%prep

%setup -q -n %{name}-%{version}-lucid -a 1
%patch0 -p1
%patch1 -p1 -b .vine
%patch2 -p1 -b .gettext
%patch3 -p1 -b .no-blur
%patch4 -p1 -b .case-sensitive
%patch5 -p1 -b .fix-typo
%patch6 -p1 -b .enable-show-userlist
%patch7 -p1 -b .disable-debug
%patch8 -p1 -b .fix-timedlogin

cp -f %{SOURCE2} gdm2setup.desktop

%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --prefix=$RPM_BUILD_ROOT%{_prefix}

mv $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir}

mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale/ja/LC_MESSAGES
%{__install} -m644 po/ja.mo $RPM_BUILD_ROOT%{_datadir}/locale/ja/LC_MESSAGES/gdm2setup.mo

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc ChangeLog LICENSE README
%{_sbindir}/*
%{python_sitelib}/*
%{_datadir}/applications/*
%{_datadir}/locale/ja/LC_MESSAGES/*

%changelog
* Mon Jul 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5.3-6
- update Patch1 (gdm2setup-0.5.3-vine.patch)

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5.3-5
- rebuild with python-2.7.2

* Tue Jul 05 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.3-4
- add patch8 to disable Autologin if TimedLogin is enabled.

* Tue Jun 28 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.3-3
- add patch4: ConfigParser should be case-sensitive.
- add patch5 to fix typo
- add patch6 to enable show userlist even if autologin is enabled.
- add patch7 to disable debug message

* Sat Jun 04 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.3-2
- add R: python-imaging

* Thu Jun 02 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.3-1
- initial build for Vine Linux
- add Vine patch(1,3)
- add gettext patch(2) and Japanese translation
