File deepin-movie.spec of Package deepin-movie

# spec file for package deepin-movie
# Copyright (c) 2020 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

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

%define sover 0_1

Name:           deepin-movie
Version:        5.10.8
Release:        0
Summary:        Deepin Video Players
License:        GPL-3.0-or-later AND OpenSSL
Group:          Productivity/Multimedia/Video/Players
# PATCH-FIX-UPSTEAM Fix-library-link.patch
# fix library link error and add this includedir for ffmpeg
Patch0:         Fix-library-link.patch
%ifarch aarch64
# PATCH-FIX-UPSTEAM fix-build-on-ARM.patch
Patch1:         fix-build-on-ARM.patch
BuildRequires:  dtkcore >= 5.0.0
BuildRequires:  fdupes
BuildRequires:  libQt5Gui-private-headers-devel
%ifarch ppc ppc64 ppc64le s390 s390x
BuildRequires:  deepin-desktop-base
BuildRequires:  deepin-manual
BuildRequires:  glslang-devel
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(dtkcore) >= 5.0.0
BuildRequires:  pkgconfig(dtkgui) >= 5.0.0
BuildRequires:  pkgconfig(dtkwidget) >= 5.0.0
BuildRequires:  pkgconfig(dvdnav)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(gsettings-qt)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavresample)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libffmpegthumbnailer)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libpulse-simple)
BuildRequires:  pkgconfig(libva)
BuildRequires:  pkgconfig(mpv)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(xcb-aux)
BuildRequires:  pkgconfig(xcb-ewmh)
BuildRequires:  pkgconfig(xcb-proto)
BuildRequires:  pkgconfig(xcb-shape)
BuildRequires:  pkgconfig(xcb-util)
BuildRequires:  pkgconfig(xtst)
BuildRequires:  pkgconfig(mpris-qt5)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires:  cmake(Qt5MultimediaWidgets)
BuildRequires:  pkgconfig(dbusextended-qt5)
%if 0%{?suse_version} <= 1500
BuildRequires:  qtdbusextended-devel < 3.1.2
BuildRequires:  qtmpris-devel < 3.1.2
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The default media player for Deepin. QML is used to build its
graphical interface, combined with QtAV as its multimedia backend.

%package -n libdmr%{sover}
Summary:        Deepin Video Players
Group:          System/Libraries

%description -n libdmr%{sover}
libdmr is a library for accessing the Direct Rendering Manager on Linux, BSD and
other operating systems that support the ioctl interface, and for chipsets with
DRM memory manager, support for tracking relocations and buffers. libdmr is a
low-level library, typically used by graphics drivers such as the Mesa DRI and X

%package devel
Summary:        Development tools for deepin movie
Group:          Development/Languages/C and C++
Requires:       libdmr%{sover} = %{version}

%description devel
The deepin-movie-devel package contains the header files and developer docs for
deepin movie.


%autosetup -p1 -n %{name}-reborn-%{version}
sed -i 's/Exec=deepin-movie/Exec=env QT_QPA_PLATFORMTHEME=deepin deepin-movie/g' %{name}.desktop
%if %{?suse_version} > 1500
sed -i 's/MPV_EVENT_TRACKS_CHANGED/MP_EVENT_TRACKS_CHANGED/g' src/backends/mpv/mpv_proxy.cpp

%cmake -DCMAKE_BUILD_TYPE=Release \


%fdupes %{buildroot}

%post -n libdmr%{sover} -p /sbin/ldconfig

%postun -n libdmr%{sover} -p /sbin/ldconfig

%exclude %{_datadir}/%{name}/translations
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps

%files -n libdmr%{sover}

%files devel

%files lang

openSUSE Build Service is sponsored by