Summary: Reference GTK+ greeter for LightDM
Name: lightdm-gtk
Version: 2.0.7
Release: 1%{?_dist_release}
Group: system
Vendor: Project Vine
Distribution: Vine Linux

License: GPL3
URL: https://launchpad.net/lightdm-gtk-greeter/
Source: https://launchpad.net/%{name}-greeter/2.0/%{version}/+download/%{name}-greeter-%{version}.tar.gz
Patch0:         fix_arm_compile.patch
Patch1:         lightdm-gtk_add-language-button-to-layout.patch

# for Vine Linux
Patch1000: lightdm-gtk-greeter-2.0.1-vine.patch
Patch1001: lightdm-gtk-greeter-2.0.7-ja.po.patch

Requires: lightdm
Requires: gnome-icon-theme

BuildRequires: gtk3-devel
BuildRequires: lightdm-gobject-devel
BuildRequires: libX11-devel
BuildRequires: gobject-introspection-devel
BuildRequires: libexo-devel

Provides: lightdm-greeter

%description
%{summary}


%prep
%setup -q -n %{name}-greeter-%{version}
%autopatch -p1


%build
%configure \
  --disable-silent-rules \
  --disable-static \
  --disable-libindicator \
  --enable-kill-on-sigterm

make %{?_smp_mflags}
make -C po update-po


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

pushd $RPM_BUILD_ROOT%{_datadir}/xgreeters/
	ln -s lightdm-gtk-greeter.desktop lightdm-greeter.desktop
popd

find $RPM_BUILD_ROOT -name '*.a' -delete
find $RPM_BUILD_ROOT -name '*.la' -delete

## unpackaged files
rm -fv %{buildroot}%{_docdir}/lightdm-gtk-greeter/sample-lightdm-gtk-greeter.css

%find_lang %{name}-greeter


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files -f %{name}-greeter.lang
%defattr(-, root, root, -)
%license COPYING
%doc ChangeLog NEWS README
%doc data/sample-lightdm-gtk-greeter.css
%{_sysconfdir}/lightdm/lightdm-gtk-greeter.conf
%{_sbindir}/lightdm-gtk-greeter
%{_datadir}/icons/hicolor/scalable/places/*
%{_datadir}/xgreeters/lightdm-greeter.desktop
%{_datadir}/xgreeters/lightdm-gtk-greeter.desktop


%changelog
* Tue Aug 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.7-1
- new upstream release.

* Sat Nov 28 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.1-1
- new upstream release
- update Patch1000 (lightdm-gtk-greeter-2.0.1-vine.patch)
- update Patch1001 (lightdm-gtk-greeter-2.0.1-ja.po.patch)
- remove Patch1002 (lightdm-gtk-greeter-1.8.5-background.patch)
- add BuildRequires: gtk3-devel
- remove Requires: gtk2-engines

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.5-3
- add Requires: gnome-icon-theme, gtk2-engines

* Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.5-2
- add Patch1002 (lightdm-gtk-greeter-1.8.5-background.patch)

* Sun Jun 01 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.5-1
- initial build

