File lightdm-gtk-greeter.spec of Package lightdm-gtk-greeter

#
# spec file for package lightdm-gtk-greeter
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Guido Berhoerster.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           lightdm-gtk-greeter
Version:        1.3.1
Release:        1.1
Summary:        GTK-based Greeter for LightDM
License:        GPL-3.0+
Group:          System/X11/Displaymanagers
Url:            https://launchpad.net/lightdm-gtk-greeter
Source0:        %{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM lightdm-gtk-greeter-use-new-autologin-api.patch gber@opensuse.org -- Use the new autologin API in liblightdm-gobject-1 >= 1.3.5 (backported from upstream git)
Patch0:         lightdm-gtk-greeter-use-new-autologin-api.patch
# PATCH-FIX-UPSTREAM lightdm-gtk-greeter-fix-cursor.patch lp#1024482 gber@opensuse.org -- Fix the cursor theme by setting the cursor after selecting a GTK theme
Patch1:         lightdm-gtk-greeter-fix-cursor.patch
# PATCH-FIX-UPSTREAM lightdm-gtk-greeter-fix-background.patch lp#1086199 gber@opensuse.org -- Fix the background image not being displayed when the pixmap does not have an alpha channel
Patch2:         lightdm-gtk-greeter-fix-background.patch
# PATCH-FEATURE-UPSTREAM lightdm-gtk-greeter-improve-background-scaling.patch gber@opensuse.org -- Scale the background pixmap while preserving the aspect until width and height are at least as big as the screen width and height, then clip as needed
Patch3:         lightdm-gtk-greeter-improve-background-scaling.patch
# PATCH-FEATURE-UPSTREAM lightdm-gtk-greeter-fix-ui.patch gber@opensuse.org -- Various usability fixes, in particular switch back to a tree view inside a scrolled window in order make it usable with a lot of users
Patch4:         lightdm-gtk-greeter-fix-ui.patch
BuildRequires:  gnome-common
BuildRequires:  gobject-introspection
BuildRequires:  intltool
BuildRequires:  pkgconfig(gmodule-export-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(liblightdm-gobject-1)
BuildRequires:  pkgconfig(x11)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       lightdm-greeter
Requires:       %{name}-branding = %{version}
Requires:       lightdm
Recommends:     %{name}-lang = %{version}
Recommends:     gnome-themes-accessibility
Requires(post): update-alternatives
Requires(postun):   update-alternatives
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is the reference implementation of a LightDM greeter based on the GTK
toolkit.

%package branding-upstream
Summary:        Upstream branding of %{name}-gtk-greeter
Group:          System/X11/Displaymanagers
Requires:       %{name} = %{version}
Provides:       %{name}-branding = %{version}
Conflicts:      otherproviders(%{name}-branding)
Supplements:    packageand(%{name}:branding-upstream)
BuildArch:      noarch
#BRAND: /etc/lightdm/lightdm-gtk-greeter.conf: Determines a number of greeter
#BRAND: settings, in particular the background image.

%description branding-upstream
This package provides the upstream look and feel for lightdm-gtk-greeter.

%lang_package

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
autoreconf -fi
%configure
make %{?_smp_mflags} V=1

%install
%make_install

%find_lang %{name} %{?no_lang_C}

%clean
rm -rf %{buildroot}

%post
/usr/sbin/update-alternatives --install \
    %{_datadir}/xgreeters/lightdm-default-greeter.desktop \
    lightdm-default-greeter.desktop \
    %{_datadir}/xgreeters/lightdm-gtk-greeter.desktop \
    20

%postun
if [ $1 -eq 0 ]; then
    /usr/sbin/update-alternatives --remove lightdm-default-greeter.desktop \
        %{_datadir}/xgreeters/lightdm-gtk-greeter.desktop
fi

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_sbindir}/lightdm-gtk-greeter
%{_datadir}/lightdm-gtk-greeter
%dir %{_datadir}/xgreeters/
%{_datadir}/xgreeters/lightdm-gtk-greeter.desktop
%ghost %attr(644,root,root) %{_datadir}/xgreeters/lightdm-default-greeter.desktop
%ghost %attr(644,root,root) %{_sysconfdir}/alternatives/lightdm-default-greeter.desktop

%files branding-upstream
%defattr(-,root,root,-)
%dir %{_sysconfdir}/lightdm/
%config(noreplace) %{_sysconfdir}/lightdm/lightdm-gtk-greeter.conf

%files lang -f %{name}.lang

%changelog
* Thu Jan 31 2013 gber@opensuse.org
- add lightdm-gtk-greeter-fix-cursor.patch in order to fix the
  cursor theme by setting the cursor after selecting a GTK theme
  (lp#1024482)
- add lightdm-gtk-greeter-fix-background.patch in order to fix the
  background image not being displayed when the pixmap does not
  have an alpha channel (lp#1086199)
- add lightdm-gtk-greeter-improve-background-scaling.patch which
  scales the background pixmap while preserving the aspect until
  width and height are at least as big as the screen width and
  height, then clips as needed
- add lightdm-gtk-greeter-fix-ui.patch with various usability
  fixes, in particular switch back to a tree view inside a scrolled
  window in order make it usable with a lot of users
* Tue Jan 15 2013 gber@opensuse.org
- update to version 1.3.1
  - drop custom icons now that there's a config option for the icon
    theme
  - rename the 'Login' button to 'Unlock' when the user is already
    logged in
  - don't hide the login box when cancel is pressed, instead
    refresh the prompt box to show the correct username prompt
  - hide the Cancel button, useless with the userlist combobox
  - properly center the login window after a resize
  - add names to widgets to ease theming
  - replace the userlist's treeview with a combobox
  - document the option to show the language chooser
  - add a config option to set the path to the logo image
  - add a config option to set the icon theme
  - use a known icon name for the accessibility menu
  - remember the last session used
- added lightdm-gtk-greeter-use-new-autologin-api.patch in order to
  use the new autologin API in liblightdm-gobject-1 >= 1.3.5
  (backported from upstream git)
* Wed May 30 2012 gber@opensuse.org
- update to version 1.1.6
  - fix 'Large Font' option for fontnames containing spaces
  - fix 'Cancel' button action, and clear the error label
  - add missing include for setlocale
  - updated translations
* Sat Apr  7 2012 gber@opensuse.org
- initial packaging