File mate-screensaver.spec of Package mate-screensaver

#
# spec file for package mate-screensaver
#
# Copyright (c) 2016 SUSE LINUX 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/
#


%define _version 1.16
Name:           mate-screensaver
Version:        1.16.0
Release:        0
Summary:        MATE Desktop screensaver
License:        GPL-2.0+ and LGPL-2.0+
Group:          System/GUI/Other
Url:            http://mate-desktop.org/
Source:         http://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE mate-screensaver-1.7.1-vendor_pam_integration.patch nmarques@mate-desktop.org -- PAM integration with SUSE.
Patch0:         %{name}-1.7.1-vendor_pam_integration.patch
BuildRequires:  libmatekbd-devel
BuildRequires:  mate-common >= %{_version}
BuildRequires:  pam-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-devel
BuildRequires:  xscreensaver-data
BuildRequires:  xscreensaver-data-extra
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(libmate-menu) >= 1.5.0
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(mate-desktop-2.0) >= %{_version}
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)
Requires:       mate-session-manager-gschemas >= %{_version}
Recommends:     %{name}-lang
Recommends:     xscreensaver-data
Suggests:       mate-power-manager >= %{_version}
%glib2_gsettings_schema_requires
%if 0%{?suse_version} > 1310
BuildRequires:  pkgconfig(libsystemd)
%else
BuildRequires:  pkgconfig(libsystemd-login)
%endif

%description
mate-screensaver is a screen saver and locker that aims to have simple,
sane, secure defaults and be well integrated with the desktop.

%package devel
Summary:        Development files for mate-screensaver
Group:          Development/Sources
Requires:       %{name} = %{version}

%description devel
mate-screensaver is a screen saver and locker that aims to have simple,
sane, secure defaults and be well integrated with the desktop.

%lang_package

%prep
%setup -q
%patch0 -p1

%build
NOCONFIGURE=1 mate-autogen
%configure  \
  --libexecdir=%{_libexecdir}/%{name}                \
  --with-xscreensaverdir=%{_sysconfdir}/xscreensaver \
  --with-pam-prefix=%{_sysconfdir}                   \
  --with-gtk=2.0                                     \
  --with-systemd                                     \
  --without-console-kit                              \
  --disable-docbook-docs
make %{?_smp_mflags}

%install
%make_install
%find_lang %{name} %{?no_lang_C}

pushd %{buildroot}%{_datadir}/applications/
for desktop in $(ls | grep \.desktop); do
    %suse_update_desktop_file %{buildroot}%{_datadir}/applications/$desktop
done
popd

%post
%desktop_database_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc README COPYING COPYING.LIB NEWS
%dir %{_sysconfdir}/xdg/menus/
%config %{_sysconfdir}/xdg/menus/mate-screensavers.menu
%config %{_sysconfdir}/xdg/autostart/mate-screensaver.desktop
%config %{_sysconfdir}/pam.d/mate-screensaver
%{_bindir}/%{name}*
%{_libexecdir}/%{name}/
%{_datadir}/applications/*.desktop
%{_datadir}/applications/screensavers/
%{_datadir}/backgrounds/
%{_datadir}/dbus-1/services/*.service
%{_datadir}/desktop-directories/
%{_datadir}/mate-background-properties/
%{_datadir}/%{name}/
%{_datadir}/pixmaps/gnome-logo-white.svg
%{_datadir}/pixmaps/mate-logo-white.svg
%{_datadir}/glib-2.0/schemas/*.xml
%{_mandir}/man?/*.?%{?ext_man}

%files devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/mate-screensaver.pc

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by