Name:           deepin-screen-recorder
Version:        5.8.0.52
Release:        2
Summary:        Deepin Screen Recorder
License:        GPLv3+
URL:            https://github.com/linuxdeepin/deepin-screen-recorder
Source0:        %{name}_%{version}.orig.tar.xz
Patch0:		Fix-build-failure-with-gcc-10.patch

BuildRequires:  gcc-c++ qt5-devel dtkwidget-devel dtkcore-devel procps-ng-devel
BuildRequires:  pkgconfig(dframeworkdbus) pkgconfig(x11) pkgconfig(xext)  pkgconfig(xtst) pkgconfig(xcb) pkgconfig(xcb-util) pkgconfig(xcursor)
BuildRequires:  desktop-file-utils libappstream-glib

Requires:       byzanz ffmpeg
Requires:       hicolor-icon-theme dbus deepin-turbo

Provides:       deepin-screenshot
Obsoletes:      deepin-screenshot

%description
%{summary}.

%prep
%autosetup -p1

%build
export PATH=%{_qt5_bindir}:$PATH
mkdir build && pushd build
%qmake_qt5 ../ VERSION=%{version} DEFINES+="VERSION=%{version}"
%make_build
popd

%install
%make_install -C build INSTALL_ROOT="%buildroot"


%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/dman/%{name}/

%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.svg
%{_datadir}/dbus-1/services/com.deepin.ScreenRecorder.service

%{_sysconfdir}/modprobe.d/deepin-screen-recorder.conf
%{_sysconfdir}/modules-load.d/deepin-screen-recorder.conf
%{_datarootdir}/dbus-1/services/com.deepin.Screenshot.service

%changelog
* Wed Aug 11 2021 weidong <weidong@uniontech.com> - 5.8.0.52-2
- Fix build failure with gcc-10.

* Sat May 08 2021 weidong <weidong@uniontech.com> - 5.8.0.52-1
- Initial package. 
