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