]>
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 |
4aa15439 | 25 | URL: http://www.vapoursynth.com/ |
49f229e1 | 26 | %{?with_im:BuildRequires: ImageMagick-c++-devel >= 1:7} |
4aa15439 JB |
27 | BuildRequires: autoconf >= 2.50 |
28 | BuildRequires: automake >= 1:1.11 | |
29 | # libavcodec libavformat libavutil | |
30 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel} | |
31 | %{?with_ffmpeg:BuildRequires: libass-devel} | |
32 | BuildRequires: libstdc++-devel >= 6:4.8 | |
33 | BuildRequires: libtool >= 2:2 | |
49f229e1 JB |
34 | %if %{with sse} |
35 | BuildRequires: nasm | |
36 | %endif | |
4aa15439 JB |
37 | BuildRequires: pkgconfig |
38 | BuildRequires: python3-Cython | |
39 | BuildRequires: python3-devel >= 1:3.2 | |
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 | |
133 | %if "%{_rpmversion}" >= "5" | |
134 | BuildArch: noarch | |
135 | %endif | |
136 | ||
137 | %description doc | |
138 | Documentation for VapourSynth library. | |
139 | ||
140 | %description doc -l pl.UTF-8 | |
141 | Dokumentacja do biblioteki VapourSynth. | |
142 | ||
143 | %prep | |
144 | %setup -q -n %{name}-R%{version} | |
145 | %patch0 -p1 | |
ba967eb8 | 146 | %if "%{py3_ver}" >= "3.8" |
cc0f3fb6 | 147 | %patch1 -p1 |
ba967eb8 | 148 | %endif |
4aa15439 JB |
149 | |
150 | %if %{without sse} | |
151 | %{__sed} -i -e 's/"-mfpmath=sse -msse2"/""/' configure.ac | |
152 | %endif | |
153 | ||
154 | %build | |
155 | %{__libtoolize} | |
156 | %{__aclocal} | |
157 | %{__autoconf} | |
158 | %{__automake} | |
159 | %configure \ | |
49f229e1 | 160 | %{!?with_im:--disable-imwri} \ |
4aa15439 JB |
161 | --disable-silent-rules \ |
162 | %{!?with_ffmpeg:--disable-subtext} \ | |
163 | %{!?with_static_libs:--disable-static} \ | |
164 | %{!?with_sse:--disable-x86-asm} | |
165 | %{__make} | |
166 | ||
167 | %if %{with doc} | |
168 | %{__make} -C doc html | |
169 | %endif | |
170 | ||
171 | %install | |
172 | rm -rf $RPM_BUILD_ROOT | |
173 | ||
174 | %{__make} install \ | |
175 | DESTDIR=$RPM_BUILD_ROOT | |
176 | ||
177 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/vapoursynth.la | |
178 | # obsoleted by pkg-config | |
179 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvapoursynth*.la | |
180 | # dlopened modules | |
181 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/vapoursynth/*.la | |
182 | ||
183 | %clean | |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | ||
186 | %post -p /sbin/ldconfig | |
187 | %postun -p /sbin/ldconfig | |
188 | ||
189 | %files | |
190 | %defattr(644,root,root,755) | |
191 | %doc ChangeLog ofl.txt | |
192 | %attr(755,root,root) %{_bindir}/vspipe | |
193 | %attr(755,root,root) %{_libdir}/libvapoursynth.so | |
194 | %attr(755,root,root) %{_libdir}/libvapoursynth-script.so.*.*.* | |
195 | %attr(755,root,root) %ghost %{_libdir}/libvapoursynth-script.so.0 | |
196 | %attr(755,root,root) %{py3_sitedir}/vapoursynth.so | |
197 | %dir %{_libdir}/vapoursynth | |
198 | %attr(755,root,root) %{_libdir}/vapoursynth/libeedi3.so | |
199 | %attr(755,root,root) %{_libdir}/vapoursynth/libmiscfilters.so | |
200 | %attr(755,root,root) %{_libdir}/vapoursynth/libmorpho.so | |
201 | %attr(755,root,root) %{_libdir}/vapoursynth/libremovegrain.so | |
202 | %attr(755,root,root) %{_libdir}/vapoursynth/libvinverse.so | |
203 | %attr(755,root,root) %{_libdir}/vapoursynth/libvivtc.so | |
204 | ||
49f229e1 | 205 | %if %{with im} |
4aa15439 JB |
206 | %files plugin-imwri |
207 | %defattr(644,root,root,755) | |
208 | # R: ImageMagick-c++ >= 1:7 | |
209 | %attr(755,root,root) %{_libdir}/vapoursynth/libimwri.so | |
49f229e1 | 210 | %endif |
4aa15439 JB |
211 | |
212 | %files plugin-ocr | |
213 | %defattr(644,root,root,755) | |
214 | # R: tesseract | |
215 | %attr(755,root,root) %{_libdir}/vapoursynth/libocr.so | |
216 | ||
217 | %if %{with ffmpeg} | |
218 | %files plugin-subtext | |
219 | %defattr(644,root,root,755) | |
220 | # R: libass ffmpeg | |
221 | %attr(755,root,root) %{_libdir}/vapoursynth/libsubtext.so | |
222 | %endif | |
223 | ||
224 | %files devel | |
225 | %defattr(644,root,root,755) | |
226 | %attr(755,root,root) %{_libdir}/libvapoursynth-script.so | |
227 | %{_includedir}/vapoursynth | |
228 | %{_pkgconfigdir}/vapoursynth.pc | |
229 | %{_pkgconfigdir}/vapoursynth-script.pc | |
230 | ||
231 | %if %{with static_libs} | |
232 | %files static | |
233 | %defattr(644,root,root,755) | |
234 | %{_libdir}/libvapoursynth.a | |
235 | %{_libdir}/libvapoursynth-script.a | |
236 | %endif | |
237 | ||
238 | %if %{with doc} | |
239 | %files doc | |
240 | %defattr(644,root,root,755) | |
241 | %doc doc/_build/html/{_static,api,functions,plugins,*.html,*.js} | |
242 | %endif |