Name:           ffmpegthumbnailer
Version:        2.2.2
Release:        1
Summary:        Lightweight video thumbnailer that can be used by file managers

License:        GPLv2+
URL:            https://github.com/dirkvdb/%{name}
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0:         fix_object_target.patch
Patch1:         add_audio_cover.patch

BuildRequires:  ffmpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libjpeg-devel
BuildRequires:  chrpath
BuildRequires:  cmake3
BuildRequires:  gcc-c++


%description
This video thumbnailer can be used to create thumbnails for your video files.

%package devel
Summary:        Headers and libraries for building apps that use ffmpegthumbnailer
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel
This video thumbnailer can be used to create thumbnails for your video files,
development package.

%prep
%autosetup -p1
chmod -x README INSTALL COPYING AUTHORS

%build
%cmake3 -DENABLE_GIO=ON -DENABLE_THUMBNAILER=ON .

%make_build

 
%install
%make_install
#chrpath --delete $RPM_BUILD_ROOT%%{_bindir}/ffmpegthumbnailer
find %{buildroot} -name '*.la' -exec rm -f {} ';'

%ldconfig_scriptlets

%files
%doc README AUTHORS
%license COPYING
%{_bindir}/ffmpegthumbnailer
%{_libdir}/libffmpegthumbnailer.so.4*
%{_mandir}/man1/ffmpegthumbnailer.1.gz
# gnome thumbnailer registration
%dir %{_datadir}/thumbnailers
%{_datadir}/thumbnailers/ffmpegthumbnailer.thumbnailer

%files devel
%{_libdir}/libffmpegthumbnailer.so
%{_libdir}/pkgconfig/libffmpegthumbnailer.pc
%{_includedir}/libffmpegthumbnailer/


%changelog
* Thu May 13 2021 He Rengui <herengui@uniontech.com> - 2.2.2-1
- package init
