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 #Source0Download: https://github.com/FFMS/ffms2/releases
14 Source0: https://github.com/FFMS/ffms2/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 141f194432d70bbf5456a847043f332a
17 URL: https://github.com/FFMS/ffms2
18 BuildRequires: autoconf >= 2.58
19 BuildRequires: automake >= 1:1.11
20 # PKG_CHECK_MODULES(LIBAV, [libavformat >= 53.20.0 libavcodec >= 53.24.0 libswscale >= 0.7.0 libavutil >= 51.21.0 ])
21 BuildRequires: ffmpeg-devel >= 0.9
22 # libavresample >= 1.0.0 or libswresample >= 1.0.0
23 %{?with_avresample:BuildRequires: ffmpeg-devel >= 1.1}
25 BuildRequires: libatomic-devel
27 BuildRequires: libstdc++-devel
28 BuildRequires: libtool >= 2:2.0
29 BuildRequires: pkgconfig >= 1:0.22
30 BuildRequires: rpmbuild(macros) >= 2.007
31 BuildRequires: sed >= 4.0
32 BuildRequires: zlib-devel
33 Obsoletes: ffmpegsource < 2.20
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 FFmpegSource (usually known as FFMS or FFMS2) is a cross-platform
38 wrapper library around FFmpeg, plus some additional components to deal
39 with file formats FFmpeg's libavformat has (or used to have) problems
40 with. It gives you an easy, convenient way to say "open and decompress
41 this media file for me, I don't care how you do it" and get frame- and
42 sample-accurate access (usually), without having to bother with the
43 sometimes less than straightforward and less than perfectly documented
46 %description -l pl.UTF-8
47 FFmpegSource (zwykle zwana FFMS lub FFMS2) to wieloplatformowa
48 biblioteka obudowująca FFmpeg wraz z paroma dodatkowymi komponentami
49 mającymi radzić sobie z formatami plików, z którymi libavformat z
50 FFmpeg ma (lub miał) problemy. Umożliwia w łatwy sposób zażądanie
51 "otwórz i zdekompresuj ten plik, nieważne jak" i uzyskanie dostępu
52 (zwykle) z dokładnością do ramek i próbek, bez potrzeby zajmowania się
53 często złożonym, nie najlepiej udokumentowanym API FFmpeg.
56 Summary: Header files for FFmpegSource library
57 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FFmpegSource
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 %if %{with avresample}
61 Requires: ffmpeg-devel >= 1.1
63 Requires: ffmpeg-devel >= 0.9
65 Requires: libstdc++-devel
67 Provides: ffmpegsource-devel = %{version}-%{release}
68 Obsoletes: ffmpegsource-devel < 2.20
71 Header files for FFmpegSource library.
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe biblioteki FFmpegSource.
77 Summary: Static FFmpegSource library
78 Summary(pl.UTF-8): Statyczna biblioteka FFmpegSource
79 Group: Development/Libraries
80 Requires: %{name}-devel = %{version}-%{release}
81 Obsoletes: ffmpegsource-static < 2.20
84 Static FFmpegSource library.
86 %description static -l pl.UTF-8
87 Statyczna biblioteka FFmpegSource.
96 CXXFLAGS="%{rpmcxxflags} -Wall -Wextra"
106 --enable-avresample%{!?with_avresample:=no} \
107 --disable-silent-rules \
109 %{__enable_disable static_libs static}
114 rm -rf $RPM_BUILD_ROOT
117 DESTDIR=$RPM_BUILD_ROOT
119 # obsoleted by pkg-config
120 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libffms2.la
122 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
125 rm -rf $RPM_BUILD_ROOT
127 %post -p /sbin/ldconfig
128 %postun -p /sbin/ldconfig
131 %defattr(644,root,root,755)
132 %doc COPYING README.md
133 %attr(755,root,root) %{_bindir}/ffmsindex
134 %attr(755,root,root) %{_libdir}/libffms2.so.*.*.*
135 %attr(755,root,root) %ghost %{_libdir}/libffms2.so.4
138 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/libffms2.so
141 %{_includedir}/ffms.h
142 %{_includedir}/ffmscompat.h
143 %{_pkgconfigdir}/ffms2.pc
145 %if %{with static_libs}
147 %defattr(644,root,root,755)
148 %{_libdir}/libffms2.a