File drwright.spec of Package drwright

#
# spec file for package drwright
#
# 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:           drwright
Version:        3.5.0
Release:        0
Summary:        Typing monitor to force typing breaks
License:        GPL-2.0+
Group:          Productivity/Scientific/Math
Url:            https://live.gnome.org/drwright
Source:         http://download.gnome.org/sources/drwright/3.5/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM drwright-gnome36.patch dimstar@opensuse.org -- Fix build with gnome-settings-daemon >= 3.5.91.
Patch0:         drwright-gnome36.patch
# PATCH-FIX-UPSTREAM drwright-gsd38.patch bgo#698413 dimstar@opensuse.org -- Fix build with gnome-settings-daemon >= 3.7.3
Patch1:         drwright-gsd38.patch
# For directory ownership
BuildRequires:  gnome-control-center
# This is needed for gtk-builder-convert
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  libXScrnSaver-devel
BuildRequires:  libXext-devel
BuildRequires:  libxml2-tools
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gdk-pixbuf-2.0) >= 2.25.3
BuildRequires:  pkgconfig(gdk-x11-3.0)
BuildRequires:  pkgconfig(gio-2.0) >= 2.31.13
BuildRequires:  pkgconfig(glib-2.0) >= 2.31.13
BuildRequires:  pkgconfig(gnome-settings-daemon) >= 3.7.3
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.0.0
BuildRequires:  pkgconfig(libcanberra-gtk3) >= 0
BuildRequires:  pkgconfig(libnotify) >= 0.7
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xscrnsaver)
# For the g-c-c panel
Requires:       gnome-control-center
# For the g-s-d plugin
Requires:       gnome-settings-daemon
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%description
drwright is a program that forces you to take regular breaks to prevent
RSI (Repetitive Strain Injury).

%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
%configure --disable-static
make %{?_smp_mflags}

%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%suse_update_desktop_file gnome-typing-break-panel
%find_lang %{name} %{?no_lang_C}

%post
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post

%postun
%glib2_gsettings_schema_postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS
%dir %{_libexecdir}/drwright
%{_libexecdir}/drwright/gnome-typing-monitor
%dir %{_libdir}/control-center-1
%dir %{_libdir}/control-center-1/panels
%{_libdir}/control-center-1/panels/libdrwrightccp.so
%{_libdir}/gnome-settings-daemon-3.0/libtyping-break.so
%{_libdir}/gnome-settings-daemon-3.0/typing-break.gnome-settings-plugin
%{_datadir}/applications/gnome-typing-break-panel.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.typing-break.gschema.xml
%{_datadir}/icons/hicolor/*/apps/typing-monitor.*

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by