]>
Commit | Line | Data |
---|---|---|
0e801e1d JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | # | |
7a0f7637 | 5 | Summary: Lightweight video thumbnailer |
a8b04dac | 6 | Summary(pl.UTF-8): Lekki program do wykonywania miniaturek dla filmów |
7a0f7637 | 7 | Name: ffmpegthumbnailer |
edfe753a | 8 | Version: 2.2.2 |
d10132a1 | 9 | Release: 2 |
7a0f7637 | 10 | License: GPL v2 |
c507c284 | 11 | Group: Applications/Graphics |
0e801e1d JB |
12 | #Source0Download: https://github.com/dirkvdb/ffmpegthumbnailer/releases |
13 | Source0: https://github.com/dirkvdb/ffmpegthumbnailer/releases/download/%{version}/%{name}-%{version}.tar.bz2 | |
edfe753a | 14 | # Source0-md5: ef466e64df666ba006c0b071eb48018e |
0e801e1d | 15 | Patch0: %{name}-pc.patch |
d10132a1 | 16 | Patch1: git.patch |
893cf8a4 | 17 | URL: https://github.com/dirkvdb/ffmpegthumbnailer |
edfe753a | 18 | BuildRequires: cmake >= 3.5 |
fae5264b | 19 | # libavcodec >= 52.26.0 libavformat libavutil libswscale |
191710e7 | 20 | BuildRequires: ffmpeg-devel >= 0.6 |
e12f335b | 21 | BuildRequires: libjpeg-devel |
7a0f7637 | 22 | BuildRequires: libpng-devel |
2d5a747b | 23 | BuildRequires: libstdc++-devel |
c507c284 | 24 | BuildRequires: pkgconfig |
191710e7 | 25 | BuildRequires: sed >= 4.0 |
fae5264b | 26 | # dlopens libglib-2.0.so.0 libgobject-2.0.so.0 libgio-2.0.so.0 |
0e801e1d | 27 | Requires: glib2 >= 2.0 |
7a0f7637 MB |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | ffmpegthumbnailer can be used by file managers to create thumbnails | |
32 | for your video files. It uses ffmpeg to decode frames from the video | |
33 | files. | |
34 | ||
a8b04dac JB |
35 | %description -l pl.UTF-8 |
36 | ffmpegthumbnailer może być używany przez zarządców plików do tworzenia | |
37 | miniaturek dla plików filmów. Wykorzystuje ffmpeg do dekodowania | |
38 | klatek. | |
39 | ||
2d5a747b MB |
40 | %package devel |
41 | Summary: Header files for libffmpegthumbnailer library | |
42 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libffmpegthumbnailer | |
43 | Group: Development/Libraries | |
44 | Requires: %{name} = %{version}-%{release} | |
45 | Requires: ffmpeg-devel | |
fae5264b | 46 | Requires: libjpeg-devel |
2d5a747b MB |
47 | Requires: libpng-devel |
48 | ||
49 | %description devel | |
50 | Header files for libffmpegthumbnailer library. | |
51 | ||
52 | %description devel -l pl.UTF-8 | |
53 | Pliki nagłówkowe biblioteki libffmpegthumbnailer. | |
54 | ||
55 | %package static | |
56 | Summary: Static libffmpegthumbnailer library | |
57 | Summary(pl.UTF-8): Statyczna biblioteka libffmpegthumbnailer | |
58 | Group: Development/Libraries | |
59 | Requires: %{name}-devel = %{version}-%{release} | |
60 | ||
61 | %description static | |
62 | Static libffmpegthumbnailer library. | |
63 | ||
64 | %description static -l pl.UTF-8 | |
65 | Statyczna biblioteka libffmpegthumbnailer. | |
66 | ||
7a0f7637 MB |
67 | %prep |
68 | %setup -q | |
0e801e1d | 69 | %patch0 -p1 |
d10132a1 | 70 | %patch1 -p1 |
191710e7 | 71 | |
7a0f7637 | 72 | %build |
893cf8a4 JR |
73 | mkdir build |
74 | cd build | |
0e801e1d | 75 | %cmake .. \ |
893cf8a4 | 76 | -DENABLE_GIO=ON \ |
0e801e1d JB |
77 | -DENABLE_TESTS=ON \ |
78 | %{?with_static_libs:-DENABLE_STATIC=ON} \ | |
79 | -DENABLE_THUMBNAILER=ON | |
3fd37711 | 80 | |
7a0f7637 MB |
81 | %{__make} |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
edfe753a | 86 | %{__make} -C build install \ |
7a0f7637 MB |
87 | DESTDIR=$RPM_BUILD_ROOT |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
2d5a747b MB |
92 | %post -p /sbin/ldconfig |
93 | %postun -p /sbin/ldconfig | |
94 | ||
7a0f7637 MB |
95 | %files |
96 | %defattr(644,root,root,755) | |
97 | %doc AUTHORS ChangeLog README TODO | |
98 | %attr(755,root,root) %{_bindir}/ffmpegthumbnailer | |
2d5a747b | 99 | %attr(755,root,root) %{_libdir}/libffmpegthumbnailer.so.*.*.* |
191710e7 | 100 | %attr(755,root,root) %ghost %{_libdir}/libffmpegthumbnailer.so.4 |
3fd37711 | 101 | %{_datadir}/thumbnailers/ffmpegthumbnailer.thumbnailer |
2d5a747b MB |
102 | %{_mandir}/man1/ffmpegthumbnailer.1* |
103 | ||
104 | %files devel | |
105 | %defattr(644,root,root,755) | |
106 | %attr(755,root,root) %{_libdir}/libffmpegthumbnailer.so | |
2d5a747b MB |
107 | %{_includedir}/libffmpegthumbnailer |
108 | %{_pkgconfigdir}/libffmpegthumbnailer.pc | |
109 | ||
0e801e1d | 110 | %if %{with static_libs} |
2d5a747b MB |
111 | %files static |
112 | %defattr(644,root,root,755) | |
113 | %{_libdir}/libffmpegthumbnailer.a | |
0e801e1d | 114 | %endif |