LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File lightdm-gtk-greeter.spec of Package lightdm-gtk-greeter (Project home:X0F)

#
# 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 http://bugs.opensuse.org/
#

Name:           lightdm-gtk-greeter
Version:        2.0.1
Release:        0
License:        GPL-3.0
Summary:        A GTK+ greeter for LightDM
Url:            https://launchpad.net/lightdm-gtk-greeter
Group:          System/X11/Displaymanagers
Source:         https://launchpad.net/%{name}/1.9/%{version}/+download/%{name}-%{version}.tar.gz
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

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

%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.

%lang_package

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

%build
./autogen.sh
%configure
make %{?_smp_mflags}

%install
%make_install

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

%find_lang %{name}

%clean
rm -rf %{buildroot}

%post
%{_sbindir}/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
    %{_sbindir}/update-alternatives --remove lightdm-default-greeter.desktop \
        %{_datadir}/xgreeters/lightdm-gtk-greeter.desktop
fi

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

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

%files lang -f %{name}.lang

%changelog