diff --git a/add_audio_cover.patch b/add_audio_cover.patch new file mode 100644 index 0000000..e5c4aed --- /dev/null +++ b/add_audio_cover.patch @@ -0,0 +1,9 @@ +--- a/dist/ffmpegthumbnailer.thumbnailer ++++ b/dist/ffmpegthumbnailer.thumbnailer +@@ -1,4 +1,4 @@ + [Thumbnailer Entry] + TryExec=ffmpegthumbnailer + Exec=ffmpegthumbnailer -i %i -o %o -s %s -f +-MimeType=video/jpeg;video/mp4;video/mpeg;video/quicktime;video/x-ms-asf;video/x-ms-wm;video/x-ms-wmv;video/x-ms-asx;video/x-ms-wmx;video/x-ms-wvx;video/x-msvideo;video/x-flv;video/x-matroska;application/mxf;video/3gp;video/3gpp;video/dv;video/divx;video/fli;video/flv;video/mp2t;video/mp4v-es;video/msvideo;video/ogg;video/vivo;video/vnd.divx;video/vnd.mpegurl;video/vnd.rn-realvideo;application/vnd.rn-realmedia;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-m4v;video/x-mpeg;video/x-mpeg2;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg ++MimeType=video/jpeg;video/mp4;video/mpeg;video/quicktime;video/x-ms-asf;video/x-ms-wm;video/x-ms-wmv;video/x-ms-asx;video/x-ms-wmx;video/x-ms-wvx;video/x-msvideo;video/x-flv;video/x-matroska;application/mxf;video/3gp;video/3gpp;video/dv;video/divx;video/fli;video/flv;video/mp2t;video/mp4v-es;video/msvideo;video/ogg;video/vivo;video/vnd.divx;video/vnd.mpegurl;video/vnd.rn-realvideo;application/vnd.rn-realmedia;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-m4v;video/x-mpeg;video/x-mpeg2;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;audio/flac;audio/mpeg + diff --git a/ffmpegthumbnailer-2.2.2.tar.gz b/ffmpegthumbnailer-2.2.2.tar.gz new file mode 100644 index 0000000..5473bb8 Binary files /dev/null and b/ffmpegthumbnailer-2.2.2.tar.gz differ diff --git a/ffmpegthumbnailer.spec b/ffmpegthumbnailer.spec new file mode 100644 index 0000000..9550c7b --- /dev/null +++ b/ffmpegthumbnailer.spec @@ -0,0 +1,66 @@ +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 - 2.2.2-1 +- package init diff --git a/fix_object_target.patch b/fix_object_target.patch new file mode 100644 index 0000000..e332f7e --- /dev/null +++ b/fix_object_target.patch @@ -0,0 +1,57 @@ +From 339ebc5aa634b4680585d7c36317ab6f162ca2a9 Mon Sep 17 00:00:00 2001 +From: Dirk Vanden Boer +Date: Tue, 7 Jan 2020 13:00:59 +0100 +Subject: [PATCH] Fixed object target configuration + +--- + CMakeLists.txt | 23 +++++++++++------------ + 1 file changed, 11 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 671b93a..8616c56 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,6 +92,15 @@ add_library(libffmpegthumbnailerobj OBJECT + libffmpegthumbnailer/filmstripfilter.cpp + ) + ++target_link_libraries(libffmpegthumbnailerobj ++ FFmpeg::avformat ++ FFmpeg::avcodec ++ FFmpeg::avutil ++ FFmpeg::avfilter ++ $<$:${JPEG_LIBRARIES}> ++ $<$:PNG::PNG> ++) ++ + # we use our own deprecated struct menbers, so disable the warning about it + set_source_files_properties(libffmpegthumbnailer/videothumbnailerc.cpp PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations) + +@@ -118,12 +127,7 @@ set (FFMPEGTHUMBNAILER_SOVERSION_AGE 1) + if (ENABLE_STATIC) + add_library(libffmpegthumbnailerstatic STATIC $) + target_link_libraries(libffmpegthumbnailerstatic +- FFmpeg::avformat +- FFmpeg::avcodec +- FFmpeg::avutil +- FFmpeg::avfilter +- $<$:${JPEG_LIBRARIES}> +- $<$:PNG::PNG> ++ libffmpegthumbnailerobj + $<$:${CMAKE_DL_LIBS}> + ) + +@@ -140,12 +144,7 @@ endif () + if (ENABLE_SHARED) + add_library(libffmpegthumbnailer SHARED $) + target_link_libraries(libffmpegthumbnailer +- FFmpeg::avformat +- FFmpeg::avcodec +- FFmpeg::avutil +- FFmpeg::avfilter +- $<$:${JPEG_LIBRARIES}> +- $<$:PNG::PNG> ++ libffmpegthumbnailerobj + ) + + set_target_properties(libffmpegthumbnailer PROPERTIES