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

BuildRequires:  qt5-devel
BuildRequires:  dtkcore-devel
BuildRequires:  qt5-linguist
BuildRequires:  dtkwidget-devel
#BuildRequires:  pkgconfig(dtkwm)
#BuildRequires:  pkgconfig(libprocps)
BuildRequires:  procps-ng-devel
BuildRequires:  qt5-qtmultimedia-devel
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(dframeworkdbus)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xtst)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-util)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  desktop-file-utils
BuildRequires:  libappstream-glib
BuildRequires:  gcc-c++
BuildRequires:  gcc
BuildRequires:  dde-dock-devel
BuildRequires:  qt5-qtbase-private-devel
Requires:       byzanz
Requires:       ffmpeg
Requires:       hicolor-icon-theme
Requires:       dbus
Requires:       gstreamer1-plugins-good
Requires:       gstreamer1-plugins-ugly-free
Requires:       deepin-turbo


%description
%{summary}.

%prep
%autosetup -p1

sed -i 's|/lib|/%{_lib}|' src/dde-dock-plugins/recordtime/recordtime.pro

%build
export PATH=%{_qt5_bindir}:$PATH
%qmake_qt5 PREFIX=%{_prefix}
%make_build

%install
%make_install INSTALL_ROOT=%{buildroot}


%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/deepin-manual/manual-assets/application/%{name}/

%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.svg
%{_datadir}/icons/hicolor/scalable/apps/deepin-screenshot.svg
%{_datadir}/dbus-1/services/com.deepin.ScreenRecorder.service
%{_libdir}/dde-dock/plugins/libdeepin-screen-recorder-plugin.so
%{_sysconfdir}/due-shell/json/screenRecorder.json
%{_datadir}/dbus-1/services/com.deepin.Screenshot.service

%changelog
* Tue Jul 19 2022 loong_C <loong_c@yeah.net> - 5.9.13-1
- update to 5.9.13

* Tue Feb 08 2022 liweigang <liweiganga@uniontech.com> - 5.8.0.52-3
- fix build error

* 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. 
