File xfce4-screensaver.spec of Package xfce4-screensaver

#
# spec file for package xfce4-screensaver
#
# Copyright (c) 2018 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 https://bugs.opensuse.org/
#


Name:           xfce4-screensaver
Version:        @SERVICE@
Release:        0
Summary:        Screensaver and locker for Xfce
License:        GPL-2.0-only
Group:          System/GUI/XFCE
URL:            https://github.com/xfce-mirror/xfce4-screensaver
# PATCH-FIX-OPENSUSE xfce4-screensaver-0.1.0_pam_fix_opensuse.patch maurizio.galli@gmail.com -- PAM fix for openSUSE
Patch0:         %{name}-0.1.0_pam_fix_opensuse.patch
Source:         %{name}-%{version}.tar.xz
BuildRequires:  pam-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(garcon-1)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libwnck-3.0)
BuildRequires:  pkgconfig(libxfce4ui-2)
BuildRequires:  pkgconfig(libxfce4util-1.0)
BuildRequires:  pkgconfig(libxfconf-0)
BuildRequires:  pkgconfig(libxklavier)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xscrnsaver)
BuildRequires:  systemd-devel
BuildRequires:  xfce4-dev-tools
BuildRequires:  xrandr
Requires:       xfconf
Recommends:     %{name}-lang
Recommends:     xscreensaver-data

%description
xfce4-screensaver is a screen saver and locker that integrates with the Xfce desktop.

%lang_package

%prep
%setup -q
%patch0 -p1
sed -i 's/\(OnlyShowIn=\)XFCE/\1MATE/' savers/*.desktop.in.in
sed -i 's/\(_Name=Screensaver\)/\1 Xfce/' ./data/xfce4-screensaver-preferences.desktop.in ./src/xfce4-screensaver.desktop.in.in
sed -i 's/>\(Screensaver\)</>\1 Xfce</' ./src/xfce4-screensaver-preferences.ui
sed -i '/#: ..\/src\/xfce4-screensaver.desktop.in.in.h:1/{n;s/\"$/ Xfce\"/}' po/*.po
sed -i '/msgid \"Screensaver Xfce\"/{n;s/\"$/ Xfce\"/}' po/*.po

%build
NOCONFIGURE=1 ./autogen.sh
%configure  \
  --enable-maintainer-mode \
  --enable-locking \
  --with-xscreensaverdir=%{_sysconfdir}/xscreensaver \
  --with-pam-prefix=%{_sysconfdir}    \
  --with-systemd                      \
  --without-console-kit               

make %{?_smp_mflags} V=1

%install
%make_install

%find_lang %{name} %{?no_lang_C}

%files
%doc NEWS README.md TODO 
%config %{_sysconfdir}/xdg/autostart/%{name}.desktop
%dir %{_sysconfdir}/xdg/menus
%config %{_sysconfdir}/xdg/menus/%{name}s.menu
%config %{_sysconfdir}/pam.d/%{name}
%{_bindir}/%{name}
%{_bindir}/%{name}-configure
%{_bindir}/%{name}-command
%{_bindir}/%{name}-preferences
%{_libexecdir}/%{name}-dialog
%{_libexecdir}/%{name}-gl-helper
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/floaters
%{_libexecdir}/%{name}/popsquares
%{_libexecdir}/%{name}/slideshow
%dir %{_datadir}/applications/screensavers
%{_datadir}/applications/screensavers/xfce-floaters.desktop
%{_datadir}/applications/screensavers/xfce-personal-slideshow.desktop
%{_datadir}/applications/screensavers/xfce-popsquares.desktop
%{_datadir}/applications/%{name}-preferences.desktop
%{_datadir}/dbus-1/services/org.xfce.ScreenSaver.service
%dir %{_datadir}/desktop-directories
%{_datadir}/desktop-directories/%{name}.directory
%{_mandir}/man?/%{name}-command.?%{?ext_man}
%{_mandir}/man?/%{name}-preferences.?%{?ext_man}
%{_mandir}/man?/%{name}.?%{?ext_man}
%{_datadir}/pixmaps/xfce-logo-white.svg
#%%dir %%{_datadir}/%%{name}
#%%{_datadir}/%%{name}/lock-dialog-default.ui
#%%{_datadir}/%%{name}/%%{name}-preferences.ui
%license COPYING COPYING.LGPL COPYING.LIB

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by