]> git.pld-linux.org Git - packages/ffms2.git/blob - ffms2.spec
132a3d11b316050eac2a206308272b2514051c6d
[packages/ffms2.git] / ffms2.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # don't build static libraries
4 %bcond_without  avresample      # avresample support via libavresample
5
6 Summary:        FFmpegSource - FFmpeg wrapper library
7 Summary(pl.UTF-8):      FFmpegSource - biblioteka obudowująca FFmpeg
8 Name:           ffms2
9 Version:        2.40
10 Release:        1
11 License:        MIT (ffmpegsource itself), GPL v3+ (forced by ffmpeg)
12 Group:          Libraries
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
16 Patch0:         ffmpeg5.patch
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}
24 %ifarch %{armv6}
25 BuildRequires:  libatomic-devel
26 %endif
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)
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
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.
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}
60 %if %{with avresample}
61 Requires:       ffmpeg-devel >= 1.1
62 %else
63 Requires:       ffmpeg-devel >= 0.9
64 %endif
65 Requires:       libstdc++-devel
66 Requires:       zlib-devel
67 Provides:       ffmpegsource-devel = %{version}-%{release}
68 Obsoletes:      ffmpegsource-devel < 2.20
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}
81 Obsoletes:      ffmpegsource-static < 2.20
82
83 %description static
84 Static FFmpegSource library.
85
86 %description static -l pl.UTF-8
87 Statyczna biblioteka FFmpegSource.
88
89 %prep
90 %setup -q
91 %patch0 -p1
92
93 install -d src/config
94
95 %build
96 CXXFLAGS="%{rpmcxxflags} -Wall -Wextra"
97 %{__libtoolize}
98 %{__aclocal} -I m4
99 %{__autoconf}
100 %{__autoheader}
101 %{__automake}
102 %configure \
103 %ifarch %{armv6}
104         LIBS=-latomic \
105 %endif
106         --enable-avresample%{!?with_avresample:=no} \
107         --disable-silent-rules \
108         --enable-shared \
109         %{__enable_disable static_libs static}
110
111 %{__make}
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 %{__make} install \
117         DESTDIR=$RPM_BUILD_ROOT
118
119 # obsoleted by pkg-config
120 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libffms2.la
121
122 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
123
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)
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
136
137 %files devel
138 %defattr(644,root,root,755)
139 %doc doc/ffms2-*.md
140 %attr(755,root,root) %{_libdir}/libffms2.so
141 %{_includedir}/ffms.h
142 %{_includedir}/ffmscompat.h
143 %{_pkgconfigdir}/ffms2.pc
144
145 %if %{with static_libs}
146 %files static
147 %defattr(644,root,root,755)
148 %{_libdir}/libffms2.a
149 %endif
This page took 0.068718 seconds and 2 git commands to generate.