File kshutdown.spec of Package kshutdown

#
# spec file for package kshutdown
#
# Copyright (c) 2010 Lubos Lunak <llunak@novell.com>
# Copyright (c) 2011 Buschmann <buschmann23@opensuse.org>
# 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/
#


Name:             kshutdown
Version:          4.0
Release:          0
Summary:          Graphical shutdown utility
License:          GPL-2.0+
Url:              http://kshutdown.sourceforge.net/
Group:            System/GUI/KDE
Source0:          http://downloads.sourceforge.net/%{name}/KShutdown/%{version}/%{name}-source-%{version}.zip
# PATCH-FIX-UPSTREAM - kshutdown-src_kshutdown.desktop.patch -- Fix Categories and uncomment some entries
Patch0:           %{name}-src_kshutdown.desktop.patch
Requires(post):   hicolor-icon-theme
Requires(post):   update-desktop-files
Requires(postun): hicolor-icon-theme
Requires(postun): update-desktop-files
BuildRequires:    cmake(KF5Config)
BuildRequires:    cmake(KF5ConfigWidgets)
BuildRequires:    cmake(KF5DBusAddons)
BuildRequires:    cmake(KF5GlobalAccel)
BuildRequires:    cmake(KF5I18n)
BuildRequires:    cmake(KF5IdleTime)
BuildRequires:    cmake(KF5Notifications)
BuildRequires:    cmake(KF5NotifyConfig)
BuildRequires:    cmake(KF5XmlGui)
BuildRequires:    pkgconfig(Qt5Core)
BuildRequires:    pkgconfig(Qt5DBus)
BuildRequires:    pkgconfig(Qt5Gui)
BuildRequires:    pkgconfig(Qt5Widgets)
BuildRequires:    unzip
BuildRoot:        %{_tmppath}/%{name}-%{version}-build

%description
KShutdown is an advanced graphical shutdown utility.

Features:

- Turn Off Computer (logout and halt the system)
- Restart Computer (logout and reboot the system)
- Hibernate to disk or Suspend
- Lock Screen (lock the screen using a screen saver)
- End Current Session (end the current KDE session and logout the user)
- Various time and delay options (time from now, inactivity detection, ...)
- Command line support
- Extras (external user commands)
- System tray and panel applet
- Visual and sound notifications
- Simple, easy-to-use User Interface
- Works with many Desktop Environments

%prep
%setup -q
%patch0

%build
%cmake_kf5 -d build -- -DKS_KF5=ON
%make_jobs

%install
%kf5_makeinstall -C build

%suse_update_desktop_file %{name}

# Remove not needed files
find %{buildroot}%{_kf5_sharedir}/%{name} -name '.directory' -exec rm -f {} ';'

%find_lang %{name}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc ChangeLog LICENSE TODO
%{_kf5_bindir}/%{name}
%{_kf5_applicationsdir}/%{name}.desktop
%{_kf5_notifydir}/%{name}.notifyrc
%dir %{_kf5_sharedir}/%{name}
%dir %{_kf5_sharedir}/%{name}/extras
%dir %{_kf5_sharedir}/%{name}/extras/multimedia
%{_kf5_sharedir}/%{name}/extras/multimedia/kaffeine.desktop
%{_kf5_sharedir}/%{name}/extras/multimedia/kscd.desktop
%{_kf5_sharedir}/%{name}/extras/multimedia/juk.desktop
%{_kf5_sharedir}/%{name}/extras/multimedia/vlc.desktop
%{_kf5_sharedir}/%{name}/extras/multimedia/tvtime.desktop
%{_kf5_sharedir}/%{name}/extras/multimedia/xmms.desktop
%{_kf5_sharedir}/%{name}/extras/multimedia/amarok.desktop
%{_kf5_sharedir}/%{name}/extras/multimedia/mplayer.desktop
%dir %{_kf5_sharedir}/%{name}/extras/system
%{_kf5_sharedir}/%{name}/extras/system/kppp.desktop
%{_kf5_iconsdir}/hicolor/*/actions/%{name}.png

%changelog
openSUSE Build Service is sponsored by