File deepin-calculator.spec of Package deepin-calculator

#
# spec file for package deepin-calculator
#
# Copyright (c) 2021 SUSE LLC
#
# 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:           deepin-calculator
Version:        6.5.12
Release:        0
Summary:        The Deepin Calculator Application
License:        GPL-3.0-or-later
Group:          Productivity/Scientific/Math
URL:            https://github.com/linuxdeepin/deepin-calculator
Source:         https://github.com/linuxdeepin/deepin-calculator/archive/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-lrelease-path.patch hillwood@opensuse.org - Detect lrelease path dynamically
Patch0:         fix-lrelease-path.patch
%ifarch ppc ppc64 ppc64le s390 s390x
BuildRequires:  deepin-desktop-base
%else
BuildRequires:  deepin-manual
%endif
BuildRequires:  gtest
BuildRequires:  gmock
BuildRequires:  fdupes
%if 0%{?suse_version} < 1600
BuildRequires:  gcc13-c++
%endif
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig(Qt6Widgets)
BuildRequires:  pkgconfig(Qt6Core)
BuildRequires:  pkgconfig(Qt6Gui)
BuildRequires:  pkgconfig(Qt6DBus)
BuildRequires:  pkgconfig(Qt6Linguist)
BuildRequires:  pkgconfig(Qt6Xml)
BuildRequires:  pkgconfig(Qt6Svg)
BuildRequires:  pkgconfig(Qt6Test)
BuildRequires:  pkgconfig(dtk6widget)
BuildRequires:  pkgconfig(dtk6gui)
BuildRequires:  pkgconfig(dtk6core)
BuildRequires:  qt6-tools-linguist
Recommends:     %{name}-lang

%description
Deepin calculator is an easy to use calculator for ordinary users.

%lang_package

%prep
%setup

%build
%if 0%{?suse_version} < 1600
    export CXX=g++-13
%endif
%cmake
%cmake_build

%install
%cmake_install

%fdupes %{buildroot}%{_datadir}
%find_lang %{name} --with-qt

%files
%defattr(-,root,root,-)
%doc README.md CHANGELOG.md
%license LICENSE
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/deepin-manual/manual-assets/application/%{name}

%files lang -f %{name}.lang
%defattr(-,root,root,-)
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%{_datadir}/%{name}/translations/%{name}.qm

%changelog
openSUSE Build Service is sponsored by