]>
Commit | Line | Data |
---|---|---|
8d93948c ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static libraries | |
ffd255af | 4 | %bcond_without avresample # avresample support via libavresample |
8d93948c | 5 | |
f99faf48 JB |
6 | Summary: FFmpegSource - FFmpeg wrapper library |
7 | Summary(pl.UTF-8): FFmpegSource - biblioteka obudowująca FFmpeg | |
8d93948c | 8 | Name: ffms2 |
45d1616e | 9 | Version: 2.40 |
a704d89e | 10 | Release: 2 |
f99faf48 JB |
11 | License: MIT (ffmpegsource itself), GPL v3+ (forced by ffmpeg) |
12 | Group: Libraries | |
3373fec7 | 13 | #Source0Download: https://github.com/FFMS/ffms2/releases |
8d93948c | 14 | Source0: https://github.com/FFMS/ffms2/archive/%{version}/%{name}-%{version}.tar.gz |
45d1616e | 15 | # Source0-md5: 141f194432d70bbf5456a847043f332a |
e99fb1c5 | 16 | Patch0: ffmpeg5.patch |
8d93948c | 17 | URL: https://github.com/FFMS/ffms2 |
f99faf48 | 18 | BuildRequires: autoconf >= 2.58 |
ffd255af | 19 | BuildRequires: automake >= 1:1.11 |
ce23f194 | 20 | # PKG_CHECK_MODULES(LIBAV, [libavformat >= 53.20.0 libavcodec >= 53.24.0 libswscale >= 0.7.0 libavutil >= 51.21.0 ]) |
7d6fea5e | 21 | BuildRequires: ffmpeg-devel >= 0.9 |
3373fec7 | 22 | # libavresample >= 1.0.0 or libswresample >= 1.0.0 |
ffd255af | 23 | %{?with_avresample:BuildRequires: ffmpeg-devel >= 1.1} |
a31926a4 JP |
24 | %ifarch %{armv6} |
25 | BuildRequires: libatomic-devel | |
26 | %endif | |
f99faf48 JB |
27 | BuildRequires: libstdc++-devel |
28 | BuildRequires: libtool >= 2:2.0 | |
f99faf48 | 29 | BuildRequires: pkgconfig >= 1:0.22 |
a31926a4 | 30 | BuildRequires: rpmbuild(macros) >= 2.007 |
f36cd6f2 | 31 | BuildRequires: sed >= 4.0 |
f99faf48 | 32 | BuildRequires: zlib-devel |
8d93948c | 33 | Obsoletes: ffmpegsource < 2.20 |
f99faf48 JB |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
36 | %description | |
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 | |
44 | FFmpeg API. | |
45 | ||
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 | |
8d93948c ER |
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. | |
f99faf48 JB |
54 | |
55 | %package devel | |
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} | |
ffd255af JB |
60 | %if %{with avresample} |
61 | Requires: ffmpeg-devel >= 1.1 | |
62 | %else | |
7d6fea5e | 63 | Requires: ffmpeg-devel >= 0.9 |
ffd255af | 64 | %endif |
f99faf48 JB |
65 | Requires: libstdc++-devel |
66 | Requires: zlib-devel | |
8d93948c ER |
67 | Provides: ffmpegsource-devel = %{version}-%{release} |
68 | Obsoletes: ffmpegsource-devel < 2.20 | |
f99faf48 JB |
69 | |
70 | %description devel | |
71 | Header files for FFmpegSource library. | |
72 | ||
73 | %description devel -l pl.UTF-8 | |
74 | Pliki nagłówkowe biblioteki FFmpegSource. | |
75 | ||
76 | %package static | |
77 | Summary: Static FFmpegSource library | |
78 | Summary(pl.UTF-8): Statyczna biblioteka FFmpegSource | |
79 | Group: Development/Libraries | |
80 | Requires: %{name}-devel = %{version}-%{release} | |
8d93948c | 81 | Obsoletes: ffmpegsource-static < 2.20 |
f99faf48 JB |
82 | |
83 | %description static | |
84 | Static FFmpegSource library. | |
85 | ||
86 | %description static -l pl.UTF-8 | |
87 | Statyczna biblioteka FFmpegSource. | |
88 | ||
89 | %prep | |
8d93948c | 90 | %setup -q |
e99fb1c5 | 91 | %patch0 -p1 |
f99faf48 | 92 | |
45d1616e JP |
93 | install -d src/config |
94 | ||
f99faf48 | 95 | %build |
3373fec7 | 96 | CXXFLAGS="%{rpmcxxflags} -Wall -Wextra" |
f99faf48 JB |
97 | %{__libtoolize} |
98 | %{__aclocal} -I m4 | |
99 | %{__autoconf} | |
100 | %{__autoheader} | |
101 | %{__automake} | |
102 | %configure \ | |
a31926a4 JP |
103 | %ifarch %{armv6} |
104 | LIBS=-latomic \ | |
105 | %endif | |
ffd255af | 106 | --enable-avresample%{!?with_avresample:=no} \ |
8d93948c | 107 | --disable-silent-rules \ |
ffd255af JB |
108 | --enable-shared \ |
109 | %{__enable_disable static_libs static} | |
cf17c716 | 110 | |
8d93948c | 111 | %{__make} |
f99faf48 JB |
112 | |
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
3373fec7 | 115 | |
f99faf48 JB |
116 | %{__make} install \ |
117 | DESTDIR=$RPM_BUILD_ROOT | |
118 | ||
3373fec7 JB |
119 | # obsoleted by pkg-config |
120 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libffms2.la | |
121 | ||
8d93948c ER |
122 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
123 | ||
f99faf48 JB |
124 | %clean |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %post -p /sbin/ldconfig | |
128 | %postun -p /sbin/ldconfig | |
129 | ||
130 | %files | |
131 | %defattr(644,root,root,755) | |
ffd255af | 132 | %doc COPYING README.md |
f99faf48 JB |
133 | %attr(755,root,root) %{_bindir}/ffmsindex |
134 | %attr(755,root,root) %{_libdir}/libffms2.so.*.*.* | |
3373fec7 | 135 | %attr(755,root,root) %ghost %{_libdir}/libffms2.so.4 |
f99faf48 JB |
136 | |
137 | %files devel | |
138 | %defattr(644,root,root,755) | |
3373fec7 | 139 | %doc doc/ffms2-*.md |
f99faf48 | 140 | %attr(755,root,root) %{_libdir}/libffms2.so |
f99faf48 JB |
141 | %{_includedir}/ffms.h |
142 | %{_includedir}/ffmscompat.h | |
143 | %{_pkgconfigdir}/ffms2.pc | |
144 | ||
8d93948c | 145 | %if %{with static_libs} |
f99faf48 JB |
146 | %files static |
147 | %defattr(644,root,root,755) | |
148 | %{_libdir}/libffms2.a | |
8d93948c | 149 | %endif |