File deepin-voice-note.spec of Package deepin-voice-note

#
# spec file for package deepin-voice-note
#
# Copyright (c) 2025 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2025 Hillwood Yang <hillwood@opensuse.org>
#
# 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/
#

%if 0%{?is_opensuse}
    %define  distribution  openSUSE-Edition
%else
    %define  distribution  SUSE-Edition
%endif

Name:           deepin-voice-note
Version:        6.5.51
Release:        0
License:        GPL-3.0-or-later
Summary:        Deepin Voice Note 
Url:            https://github.com/linuxdeepin/deepin-voice-note
Group:          Productivity/Multimedia/Video/Editors and Convertors
Source0:        https://github.com/linuxdeepin/deepin-voice-note/archive/%{version}/%{name}-%{version}.tar.gz
# https://github.com/linuxdeepin/deepin-voice-note/pull/219
# PATCH-FIX-UPSTREAM add-missing-include-header.patch hillwood@opensuse.org - use CMAKE_INSTALL_LIBDIR for installation path
Patch0:         add-missing-include-header.patch
# PATCH-FIX-UPSTREAM fix-lrelease-path.patch hillwood@opensuse.org - Fix build error caused by missing QJsonDocument definition
Patch1:         fix-lrelease-path.patch
%ifarch ppc ppc64 ppc64le s390 s390x
BuildRequires:  deepin-desktop-base
%else
BuildRequires:  deepin-manual
%endif
BuildRequires:  fdupes
BuildRequires:  gtest
BuildRequires:  qt6-tools-linguist
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt6Widgets)
BuildRequires:  pkgconfig(Qt6DBus)
BuildRequires:  pkgconfig(Qt6Sql)
BuildRequires:  pkgconfig(Qt6Multimedia)
BuildRequires:  pkgconfig(Qt6Gui)
BuildRequires:  pkgconfig(Qt6Svg)
BuildRequires:  pkgconfig(Qt6Xml)
BuildRequires:  pkgconfig(Qt6Test)
BuildRequires:  pkgconfig(Qt6WebEngineQuick)
BuildRequires:  pkgconfig(Qt6WebEngineWidgets)
BuildRequires:  pkgconfig(dtk6widget)
BuildRequires:  pkgconfig(dtk6core)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(libvlc)
BuildRequires:  pkgconfig(libdmr)
BuildRequires:  pkgconfig(libffmpegthumbnailer)
Recommends:     %{name}-lang
# Qt5WebEngineWidgets is invalid on these arches
ExcludeArch:    ppc ppc64 ppc64le s390 s390x
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Voice Notes is a lightweight memo tool to make text notes and voice and audio
recordings. 

%lang_package

%prep
%autosetup -p1

%build
%cmake -DCMAKE_BUILD_TYPE=Release \
       -DAPP_VERSION=%{version}-%{distribution} \
       -DVERSION=%{version}-%{distribution}
%cmake_build

%install
%cmake_install

%suse_update_desktop_file -r %{name} Audio AudioVideoEditing
%fdupes %{buildroot}

%find_lang %{name} --with-qt

%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/%{name}.conf
%{_datadir}/%{name}/web
%{_datadir}/deepin-manual/manual-assets/application/%{name}
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/applications/%{name}.desktop

%files lang -f %{name}.lang
%dir %{_datadir}/%{name}/translations
%{_datadir}/%{name}/translations/%{name}.qm

%changelog

openSUSE Build Service is sponsored by