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

# spec file for package lightdm-gtk-greeter
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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

Name:           lightdm-gtk-greeter
Version:        2.0.1
Release:        0
License:        GPL-3.0
Summary:        A GTK+ greeter for LightDM
Group:          System/X11/Displaymanagers
BuildRequires:  automake >= 1.7
BuildRequires:  gnome-common
BuildRequires:  gobject-introspection >= 0.9.5
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(gmodule-export-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(liblightdm-gobject-1) >= 1.3.5
BuildRequires:  pkgconfig(x11)
BuildRequires:  fdupes
Requires:       lightdm
Requires:       %{name}-branding = %{version}
Recommends:     %{name}-lang = %{version}
Recommends:     gnome-themes-accessibility
Requires(post):   update-alternatives
Requires(postun): update-alternatives
Provides:       lightdm-greeter
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This is the reference implementation of a LightDM greeter based on the Gtk

%package branding-upstream
Summary:        Upstream branding of %{name}
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.


%setup -q
sed -i '/^docdir/s|/doc|/doc/packages|' data/
cp -f data/badges/xubuntu_badge-symbolic.svg data/badges/xfce_badge-symbolic.svg

make %{?_smp_mflags}


install -dm 755 %{buildroot}%{_sysconfdir}/alternatives/
touch %{buildroot}%{_sysconfdir}/alternatives/lightdm-default-greeter.desktop
ln -s %{_sysconfdir}/alternatives/lightdm-default-greeter.desktop \
%fdupes -s %{buildroot}%{_datadir}/icons/hicolor/

%find_lang %{name}

rm -rf %{buildroot}

%{_sbindir}/update-alternatives --install \
    %{_datadir}/xgreeters/lightdm-default-greeter.desktop \
    lightdm-default-greeter.desktop \
    %{_datadir}/xgreeters/lightdm-gtk-greeter.desktop \

if [ $1 -eq 0 ]; then
    %{_sbindir}/update-alternatives --remove lightdm-default-greeter.desktop \

%ghost %{_sysconfdir}/alternatives/lightdm-default-greeter.desktop

%files branding-upstream
%dir %{_sysconfdir}/lightdm
%config(noreplace) %{_sysconfdir}/lightdm/%{name}.conf

%files lang -f %{name}.lang