3 %bcond_without static_libs # don't build static libraries
4 %bcond_without avresample # avresample support via libavresample
6 Summary: FFmpegSource - FFmpeg wrapper library
7 Summary(pl.UTF-8): FFmpegSource - biblioteka obudowująca FFmpeg
11 License: MIT (ffmpegsource itself), GPL v3+ (forced by ffmpeg)
13 Source0: https://github.com/FFMS/ffms2/archive/%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: d6f2faa9e0ffed2e2d8d926592a87744
15 Patch0: ffmpegsource-ffmpeg011.patch
18 URL: https://github.com/FFMS/ffms2
19 BuildRequires: autoconf >= 2.58
20 BuildRequires: automake >= 1:1.11
21 # PKG_CHECK_MODULES(LIBAV, [libavformat >= 53.20.0 libavcodec >= 53.24.0 libswscale >= 0.7.0 libavutil >= 51.21.0 ])
22 BuildRequires: ffmpeg-devel >= 0.9
23 # libavresample >= 1.0.0
24 %{?with_avresample:BuildRequires: ffmpeg-devel >= 1.1}
25 BuildRequires: libstdc++-devel
26 BuildRequires: libtool >= 2:2.0
27 BuildRequires: pkgconfig >= 1:0.22
28 BuildRequires: rpmbuild(macros) >= 1.566
29 BuildRequires: sed >= 4.0
30 BuildRequires: zlib-devel
31 Obsoletes: ffmpegsource < 2.20
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 FFmpegSource (usually known as FFMS or FFMS2) is a cross-platform
36 wrapper library around FFmpeg, plus some additional components to deal
37 with file formats FFmpeg's libavformat has (or used to have) problems
38 with. It gives you an easy, convenient way to say "open and decompress
39 this media file for me, I don't care how you do it" and get frame- and
40 sample-accurate access (usually), without having to bother with the
41 sometimes less than straightforward and less than perfectly documented
44 %description -l pl.UTF-8
45 FFmpegSource (zwykle zwana FFMS lub FFMS2) to wieloplatformowa
46 biblioteka obudowująca FFmpeg wraz z paroma dodatkowymi komponentami
47 mającymi radzić sobie z formatami plików, z którymi libavformat z
48 FFmpeg ma (lub miał) problemy. Umożliwia w łatwy sposób zażądanie
49 "otwórz i zdekompresuj ten plik, nieważne jak" i uzyskanie dostępu
50 (zwykle) z dokładnością do ramek i próbek, bez potrzeby zajmowania się
51 często złożonym, nie najlepiej udokumentowanym API FFmpeg.
54 Summary: Header files for FFmpegSource library
55 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FFmpegSource
56 Group: Development/Libraries
57 Requires: %{name} = %{version}-%{release}
58 %if %{with avresample}
59 Requires: ffmpeg-devel >= 1.1
61 Requires: ffmpeg-devel >= 0.9
63 Requires: libstdc++-devel
65 Provides: ffmpegsource-devel = %{version}-%{release}
66 Obsoletes: ffmpegsource-devel < 2.20
69 Header files for FFmpegSource library.
71 %description devel -l pl.UTF-8
72 Pliki nagłówkowe biblioteki FFmpegSource.
75 Summary: Static FFmpegSource library
76 Summary(pl.UTF-8): Statyczna biblioteka FFmpegSource
77 Group: Development/Libraries
78 Requires: %{name}-devel = %{version}-%{release}
79 Obsoletes: ffmpegsource-static < 2.20
82 Static FFmpegSource library.
84 %description static -l pl.UTF-8
85 Statyczna biblioteka FFmpegSource.
92 %undos src/core/{indexing,lavfindexer,utils}.cpp
96 CXXFLAGS="%{rpmcxxflags} -Wall -Wextra -Wno-missing-field-initializers"
103 --enable-avresample%{!?with_avresample:=no} \
104 --disable-silent-rules \
106 %{__enable_disable static_libs static}
111 rm -rf $RPM_BUILD_ROOT
113 DESTDIR=$RPM_BUILD_ROOT
115 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
118 rm -rf $RPM_BUILD_ROOT
120 %post -p /sbin/ldconfig
121 %postun -p /sbin/ldconfig
124 %defattr(644,root,root,755)
125 %doc COPYING README.md
126 %attr(755,root,root) %{_bindir}/ffmsindex
127 %attr(755,root,root) %{_libdir}/libffms2.so.*.*.*
128 %attr(755,root,root) %ghost %{_libdir}/libffms2.so.3
131 %defattr(644,root,root,755)
132 %doc doc/*.{html,css}
133 %attr(755,root,root) %{_libdir}/libffms2.so
134 %{_libdir}/libffms2.la
135 %{_includedir}/ffms.h
136 %{_includedir}/ffmscompat.h
137 %{_pkgconfigdir}/ffms2.pc
139 %if %{with static_libs}
141 %defattr(644,root,root,755)
142 %{_libdir}/libffms2.a