File kronometer.spec of Package kronometer

# spec file for package kronometer
# Copyright (c) 2017 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

Name:           kronometer
Version:        2.2.1
Release:        0
Summary:        A stopwatch application by KDE
License:        GPL-2.0+
Group:          Productivity/Other
BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5Crash)
BuildRequires:  cmake(KF5DocTools)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5WidgetsAddons)
BuildRequires:  cmake(KF5XmlGui)
BuildRequires:  cmake(Qt5Core) >= 5.9.0
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5Test)
BuildRequires:  cmake(Qt5Widgets)

Kronometer is a stopwatch application.

Kronometer's main features are the following:

* Start/pause/resume the stopwatch widget
* Laps recording: you can capture the stopwatch time when you want and add a note to it
* Lap times sorting: you can easily find the shortest lap time or the longest one
* Reset the stopwatch widget and the lap times
* Time format settings: you can choose the stopwatch granularity
* Times saving and resuming: you can save the stopwatch status and resume it later
* Font customization: you can choose the fonts for each of the stopwatch digits
* Color customization: you can choose the color for the stopwatch digits and the stopwatch background
* Lap times export: you can export the lap times on a file using the JSON or CSV format

%setup -q

  %cmake_kf5 -d build

  %kf5_makeinstall -C build
  %find_lang %{name} --with-kde --with-man
%if 0%{?opensuse_version} > 1320 || 0%{?sle_version} >= 120300
# %%kf5_find_htmldocs is only defined since Leap 42.3
  pushd %{buildroot}%{_kf5_htmldir}
  for i in *; do
    if ! [ -d "/usr/share/locale/${i}" ]; then
        echo "Removing unsupported translation %{_kf5_htmldir}/${i}"
        rm -rf "$i"
    elif [ "$i" != "en" ]; then
        echo "%doc %lang($i) %{_kf5_htmldir}/${i}" >> $CURDIR/%{name}.lang

%files -f %{name}.lang
%defattr(-, root, root)
%dir %{_kf5_configkcfgdir}
%if 0%{?suse_version} == 1315 && 0%{?sle_version} < 120200
%dir %{_kf5_appstreamdir}
%doc %lang(en) %{_kf5_htmldir}/en/%{name}
%doc %lang(en) %{_kf5_mandir}/man1/%{name}.1.gz
%if 0%{?suse_version} == 1315 && 0%{?sle_version} < 120300
%dir %{_kf5_mandir}/uk
%dir %{_kf5_mandir}/uk/man1

openSUSE Build Service is sponsored by