File gnome-screensaver.spec of Package gnome-screensaver

#
# spec file for package gnome-screensaver
#
# Copyright (c) 2012 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:           gnome-screensaver
Version:        3.4.4
Release:        0
Url:            http://www.gnome.org/
Summary:        GNOME Screen Saver and Locker
License:        GPL-2.0+
Group:          System/GUI/GNOME
Source:         http://download.gnome.org/sources/gnome-screensaver/3.4/%{name}-%{version}.tar.xz
# PATCH-FEATURE-OPENSUSE gnome-screensaver-suse-pam.diff
Patch:          gnome-screensaver-suse-pam.diff
# PATCH-FIX-UPSTREAM gnome-screensaver-helper.patch bgo#640647 fcrozat@novell.com -- Put back helper authentication, removed by upstream
Patch1:         gnome-screensaver-helper.patch
# PATCH-FEATURE-OPENSUSE gnome-screensaver-xvkbd-on-lock.patch rodrigo@novell.com -- Run xvkbd when locking the screen
Patch7:         gnome-screensaver-xvkbd-on-lock.patch
# PATCH-NEEDS-REBASE gnome-screensaver-2.19.1.1-securitytoken.patch
Patch8:         gnome-screensaver-2.19.1.1-securitytoken.patch
# PATCH-FEATURE-UPSTREAM gnome-screensaver-finger-print.patch fate#301953 bgo#563703
Patch10:        gnome-screensaver-finger-print.patch
# PATCH-FIX-UPSTREAM gnome-screensaver-multihead-unlock.patch bnc#444157 bgo#455118 rodrigo@novell.com
Patch12:        gnome-screensaver-multihead-unlock.patch
BuildRequires:  Mesa-devel
BuildRequires:  fdupes
BuildRequires:  gnome-common
BuildRequires:  gnome-patch-translation
BuildRequires:  intltool
BuildRequires:  libXScrnSaver-devel
BuildRequires:  libXext-devel
BuildRequires:  libXxf86misc-devel
BuildRequires:  libXxf86vm-devel
BuildRequires:  pam-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gnome-desktop-3.0) >= 3.1.91
BuildRequires:  pkgconfig(gsettings-desktop-schemas) >= 0.1.7
BuildRequires:  pkgconfig(gtk+-3.0) >= 2.99.3
# Needed by gnome-screensaver-finger-print.patch
BuildRequires:  pkgconfig(libfprint)
BuildRequires:  pkgconfig(libgnomekbdui)
BuildRequires:  pkgconfig(libsystemd-daemon)
BuildRequires:  pkgconfig(libsystemd-login)
BuildRequires:  pkgconfig(libxklavier)
BuildRequires:  pkgconfig(x11) >= 1.0
Requires:       /sbin/unix2_chkpwd
Recommends:     %{name}-lang
Provides:       %{name}-devel = %{version}-%{release}
Obsoletes:      %{name}-extra < 3.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
gnome-screensaver is a screen saver and locker that aims to have
simple, sane, secure defaults and be well integrated in the desktop.
It is designed to support:

        * the ability to lock down configuration settings
        * translation into other languages
        * user switching

%lang_package
%prep
%setup -q
translation-update-upstream
gnome-patch-translation-prepare
%patch
%patch1 -p1
%patch7 -p1
# %patch8 -p1
%patch10
%patch12
gnome-patch-translation-update

%build
# gnome-common intltool are needed only here
# needed by patch1
autoreconf -f -i
# FIXME: Maybe libexecdir the same as xscreensaver.
%configure\
	--libexecdir=%{_libexecdir}/%{name}\
	--with-pam-prefix=/etc\
	--enable-authentication-scheme=helper\
	--with-passwd-helper="/sbin/unix2_chkpwd"\
	--with-console-kit\
	--with-systemd\
	--disable-docbook-docs
%__make %{?jobs:-j%jobs}

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%find_lang %{name} %{?no_lang_C}
%suse_update_desktop_file gnome-screensaver
sed -e 's/common-auth/common-auth-smartcard/g' < $RPM_BUILD_ROOT/etc/pam.d/gnome-screensaver > $RPM_BUILD_ROOT/etc/pam.d/gnome-screensaver-smartcard
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post
%glib2_gsettings_schema_post
%desktop_database_post

%postun
%glib2_gsettings_schema_postun
%desktop_database_postun

%files
%defattr (-, root, root)
%doc AUTHORS COPYING NEWS README
%config /etc/pam.d/gnome-screensaver
%config /etc/pam.d/gnome-screensaver-smartcard
%{_sysconfdir}/xdg/autostart/*.desktop
%{_bindir}/*
%{_mandir}/man1/gnome-screensaver*.1.gz
%{_libexecdir}/%{name}

%files lang -f %{name}.lang

%changelog