]>
Commit | Line | Data |
---|---|---|
4aa15439 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # documentation | |
4 | %bcond_without ffmpeg # subtext plugin (libass+ffmpeg based) | |
49f229e1 | 5 | %bcond_with im # imwri plugin (requires ImageMagick with Q16 or Q32 and HDRI support) |
4aa15439 JB |
6 | %bcond_with sse # use SSE/SSE2 instructions on x86 (no runtime detection) |
7 | %bcond_without static_libs # static libraries | |
8 | # | |
601fdc1d JB |
9 | %ifarch pentium4 %{x8664} |
10 | # x32 asm is not supported (as of 38) | |
4aa15439 JB |
11 | %define with_sse 1 |
12 | %endif | |
13 | Summary: A video processing framework with simplicity in mind | |
14 | Summary(pl.UTF-8): Szkielet do przetwarzania obrazu stworzony z myślą o prostocie | |
15 | Name: vapoursynth | |
4b369a84 | 16 | Version: 54 |
d6524fc8 | 17 | Release: 1 |
4aa15439 JB |
18 | License: LGPL v2.1+ |
19 | Group: Libraries | |
20 | #Source0Download: https://github.com/vapoursynth/vapoursynth/releases | |
21 | Source0: https://github.com/vapoursynth/vapoursynth/archive/R%{version}/%{name}-%{version}.tar.gz | |
4b369a84 | 22 | # Source0-md5: b1710b4a8d28b70116d282082977d28b |
e7e4ec47 | 23 | Patch0: %{name}-sse2.patch |
4aa15439 | 24 | URL: http://www.vapoursynth.com/ |
49f229e1 | 25 | %{?with_im:BuildRequires: ImageMagick-c++-devel >= 1:7} |
4aa15439 JB |
26 | BuildRequires: autoconf >= 2.50 |
27 | BuildRequires: automake >= 1:1.11 | |
28 | # libavcodec libavformat libavutil | |
29 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel} | |
30 | %{?with_ffmpeg:BuildRequires: libass-devel} | |
31 | BuildRequires: libstdc++-devel >= 6:4.8 | |
32 | BuildRequires: libtool >= 2:2 | |
49f229e1 JB |
33 | %if %{with sse} |
34 | BuildRequires: nasm | |
35 | %endif | |
4aa15439 JB |
36 | BuildRequires: pkgconfig |
37 | BuildRequires: python3-Cython | |
38 | BuildRequires: python3-devel >= 1:3.2 | |
87d3612d | 39 | BuildRequires: rpmbuild(macros) >= 1.752 |
4aa15439 JB |
40 | BuildRequires: sed >= 4.0 |
41 | %{?with_doc:BuildRequires: sphinx-pdg} | |
42 | BuildRequires: tesseract-devel >= 3 | |
4aa15439 JB |
43 | BuildRequires: zimg-devel >= 2.5 |
44 | %if %{with sse} | |
45 | Requires: cpuinfo(sse2) | |
46 | %endif | |
47 | Requires: python3-libs >= 1:3.2 | |
48 | Requires: zimg >= 2.5 | |
49f229e1 JB |
49 | %if %{without im} |
50 | Obsoletes: vapoursynth-plugin-imwri | |
51 | %endif | |
4aa15439 JB |
52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
54 | # non-function std::__once_call, std::__once_callable symbols | |
55 | %define skip_post_check_so libvapoursynth-script.so.* | |
56 | ||
57 | %description | |
58 | VapourSynth is an application for video manipulation. Or a plugin. Or | |
59 | a library. It's hard to tell because it has a core library written in | |
60 | C++ and a Python module to allow video scripts to be created. | |
61 | ||
62 | %description -l pl.UTF-8 | |
63 | VapourSynth to aplikacja do obróbki obrazu. Albo wtyczka. Albo | |
64 | biblioteka. Trudno stwierdzić, ponieważ ma główną bibliotekę napisaną | |
65 | w C++ oraz moduł Pythona pozwalający na tworzenie skryptów do obrazu. | |
66 | ||
67 | %package plugin-imwri | |
68 | Summary: Image reader/writer plugin for VapourSynth | |
69 | Summary(pl.UTF-8): Wtyczka VapourSynth odczytująca i zapisują obrazy | |
70 | Group: Libraries | |
71 | Requires: %{name} = %{version}-%{release} | |
72 | ||
73 | %description plugin-imwri | |
74 | Image reader/writer plugin for VapourSynth. | |
75 | ||
76 | %description plugin-imwri -l pl.UTF-8 | |
77 | Wtyczka VapourSynth odczytująca i zapisują obrazy. | |
78 | ||
79 | %package plugin-ocr | |
80 | Summary: OCR plugin for VapourSynth | |
81 | Summary(pl.UTF-8): Wtyczka OCR dla VapourSyntha | |
82 | Group: Libraries | |
83 | Requires: %{name} = %{version}-%{release} | |
84 | ||
85 | %description plugin-ocr | |
86 | OCR plugin for VapourSynth. | |
87 | ||
88 | %description plugin-ocr -l pl.UTF-8 | |
89 | Wtyczka OCR dla VapourSyntha. | |
90 | ||
91 | %package plugin-subtext | |
92 | Summary: Subtitle rendering plugin for VapourSynth | |
93 | Summary(pl.UTF-8): Wtyczka VapourSynth nanosząca podpisy | |
94 | Group: Libraries | |
95 | Requires: %{name} = %{version}-%{release} | |
96 | ||
97 | %description plugin-subtext | |
98 | Subtitle rendering plugin for VapourSynth. | |
99 | ||
100 | %description plugin-subtext -l pl.UTF-8 | |
101 | Wtyczka VapourSynth nanosząca podpisy. | |
102 | ||
103 | %package devel | |
104 | Summary: Header files for VapourSynth libraries | |
105 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek VapourSynth | |
106 | Group: Development/Libraries | |
107 | Requires: %{name} = %{version}-%{release} | |
108 | Requires: python3-devel >= 1:3.2 | |
109 | Requires: zimg-devel >= 2.5 | |
110 | ||
111 | %description devel | |
112 | Header files for VapourSynth libraries. | |
113 | ||
114 | %description devel -l pl.UTF-8 | |
115 | Pliki nagłówkowe bibliotek VapourSynth. | |
116 | ||
117 | %package static | |
118 | Summary: Static VapourSynth libraries | |
119 | Summary(pl.UTF-8): Statyczne biblioteki VapourSynth | |
120 | Group: Development/Libraries | |
121 | Requires: %{name}-devel = %{version}-%{release} | |
122 | ||
123 | %description static | |
124 | Static VapourSynth libraries. | |
125 | ||
126 | %description static -l pl.UTF-8 | |
127 | Statyczne biblioteki VapourSynth. | |
128 | ||
129 | %package doc | |
130 | Summary: Documentation for VapourSynth library | |
131 | Summary(pl.UTF-8): Dokumentacja do biblioteki VapourSynth | |
132 | Group: Documentation | |
266d43e2 | 133 | BuildArch: noarch |
4aa15439 JB |
134 | |
135 | %description doc | |
136 | Documentation for VapourSynth library. | |
137 | ||
138 | %description doc -l pl.UTF-8 | |
139 | Dokumentacja do biblioteki VapourSynth. | |
140 | ||
141 | %prep | |
142 | %setup -q -n %{name}-R%{version} | |
143 | %patch0 -p1 | |
144 | ||
145 | %if %{without sse} | |
146 | %{__sed} -i -e 's/"-mfpmath=sse -msse2"/""/' configure.ac | |
147 | %endif | |
148 | ||
149 | %build | |
150 | %{__libtoolize} | |
151 | %{__aclocal} | |
152 | %{__autoconf} | |
153 | %{__automake} | |
154 | %configure \ | |
49f229e1 | 155 | %{!?with_im:--disable-imwri} \ |
4aa15439 JB |
156 | --disable-silent-rules \ |
157 | %{!?with_ffmpeg:--disable-subtext} \ | |
158 | %{!?with_static_libs:--disable-static} \ | |
159 | %{!?with_sse:--disable-x86-asm} | |
160 | %{__make} | |
161 | ||
162 | %if %{with doc} | |
163 | %{__make} -C doc html | |
164 | %endif | |
165 | ||
166 | %install | |
167 | rm -rf $RPM_BUILD_ROOT | |
168 | ||
169 | %{__make} install \ | |
170 | DESTDIR=$RPM_BUILD_ROOT | |
171 | ||
172 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/vapoursynth.la | |
173 | # obsoleted by pkg-config | |
174 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvapoursynth*.la | |
175 | # dlopened modules | |
176 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/vapoursynth/*.la | |
177 | ||
178 | %clean | |
179 | rm -rf $RPM_BUILD_ROOT | |
180 | ||
181 | %post -p /sbin/ldconfig | |
182 | %postun -p /sbin/ldconfig | |
183 | ||
184 | %files | |
185 | %defattr(644,root,root,755) | |
87d3612d | 186 | %doc ChangeLog README.md |
4aa15439 JB |
187 | %attr(755,root,root) %{_bindir}/vspipe |
188 | %attr(755,root,root) %{_libdir}/libvapoursynth.so | |
189 | %attr(755,root,root) %{_libdir}/libvapoursynth-script.so.*.*.* | |
190 | %attr(755,root,root) %ghost %{_libdir}/libvapoursynth-script.so.0 | |
191 | %attr(755,root,root) %{py3_sitedir}/vapoursynth.so | |
192 | %dir %{_libdir}/vapoursynth | |
193 | %attr(755,root,root) %{_libdir}/vapoursynth/libeedi3.so | |
194 | %attr(755,root,root) %{_libdir}/vapoursynth/libmiscfilters.so | |
195 | %attr(755,root,root) %{_libdir}/vapoursynth/libmorpho.so | |
196 | %attr(755,root,root) %{_libdir}/vapoursynth/libremovegrain.so | |
197 | %attr(755,root,root) %{_libdir}/vapoursynth/libvinverse.so | |
198 | %attr(755,root,root) %{_libdir}/vapoursynth/libvivtc.so | |
199 | ||
49f229e1 | 200 | %if %{with im} |
4aa15439 JB |
201 | %files plugin-imwri |
202 | %defattr(644,root,root,755) | |
203 | # R: ImageMagick-c++ >= 1:7 | |
204 | %attr(755,root,root) %{_libdir}/vapoursynth/libimwri.so | |
49f229e1 | 205 | %endif |
4aa15439 JB |
206 | |
207 | %files plugin-ocr | |
208 | %defattr(644,root,root,755) | |
209 | # R: tesseract | |
210 | %attr(755,root,root) %{_libdir}/vapoursynth/libocr.so | |
211 | ||
212 | %if %{with ffmpeg} | |
213 | %files plugin-subtext | |
214 | %defattr(644,root,root,755) | |
215 | # R: libass ffmpeg | |
216 | %attr(755,root,root) %{_libdir}/vapoursynth/libsubtext.so | |
217 | %endif | |
218 | ||
219 | %files devel | |
220 | %defattr(644,root,root,755) | |
221 | %attr(755,root,root) %{_libdir}/libvapoursynth-script.so | |
222 | %{_includedir}/vapoursynth | |
223 | %{_pkgconfigdir}/vapoursynth.pc | |
224 | %{_pkgconfigdir}/vapoursynth-script.pc | |
225 | ||
226 | %if %{with static_libs} | |
227 | %files static | |
228 | %defattr(644,root,root,755) | |
229 | %{_libdir}/libvapoursynth.a | |
230 | %{_libdir}/libvapoursynth-script.a | |
231 | %endif | |
232 | ||
233 | %if %{with doc} | |
234 | %files doc | |
235 | %defattr(644,root,root,755) | |
236 | %doc doc/_build/html/{_static,api,functions,plugins,*.html,*.js} | |
237 | %endif |