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