]>
Commit | Line | Data |
---|---|---|
356dfb23 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without autodeps # don't BR packages needed only for resolving deps | |
4 | %bcond_with tests # perform "make test". needs running flixd on localhost | |
5 | # | |
6 | %include /usr/lib/rpm/macros.perl | |
2cc44e6c | 7 | Summary: On2 Flix Engine |
27c0e367 ER |
8 | Name: flixengine |
9 | Version: 8.0.7.0 | |
44a0377b | 10 | Release: 0.9 |
27c0e367 ER |
11 | License: not distributable |
12 | Group: Applications | |
13 | # download demo from http://flix.on2.com/demos/ | |
14 | Source0: %{name}linuxdemo.tar.gz | |
15 | # Source0-md5: ea7d3a0efaf08611aad9374259015d71 | |
16 | NoSource: 0 | |
3522469a | 17 | Source1: %{name}.init |
27c0e367 | 18 | URL: http://www.on2.com/developer/flix-engine-sdk |
356dfb23 | 19 | %if %{with autodeps} |
27c0e367 | 20 | BuildRequires: ffmpeg-libs |
27c0e367 | 21 | BuildRequires: lame-libs |
356dfb23 ER |
22 | %endif |
23 | BuildRequires: bash | |
24 | BuildRequires: jre | |
27c0e367 ER |
25 | BuildRequires: perl-base |
26 | BuildRequires: php-devel | |
27 | BuildRequires: python | |
356dfb23 | 28 | BuildRequires: rpm-perlprov >= 4.1-13 |
44a0377b ER |
29 | BuildRequires: rpmbuild(macros) >= 1.268 |
30 | Requires(post,preun): /sbin/chkconfig | |
2cc44e6c | 31 | Requires: %{name}-libs = %{version}-%{release} |
44a0377b ER |
32 | Requires: portmap |
33 | Requires: rc-scripts | |
27c0e367 ER |
34 | ExclusiveArch: %{ix86} |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %define _libexecdir %{_prefix}/libexec | |
356dfb23 | 38 | %define extensionsdir %(php-config --extension-dir 2>/dev/null) |
27c0e367 ER |
39 | |
40 | %description | |
2cc44e6c ER |
41 | The On2 Flix Engine provides many of the Flash 8 video encoding |
42 | features of our industry leading On2 Flix Pro video encoder in a | |
43 | powerful software SDK. | |
44 | ||
45 | The Engine enables you to add the power and efficiency of Flash video | |
46 | with On2 VP6 encoding to your intranet, website and other server-based | |
47 | applications, preserve alpha channel in the video output, and much | |
48 | more. | |
49 | ||
50 | The major feature of the On2 Flix Engine 8 is support for Adobe Flash | |
51 | 8 video with the On2 VP6 codec and FLV video output that can be played | |
52 | directly in the Flash Player, streamed through the Adobe Flash Media | |
53 | Server, or imported into Flash Studio. The new FLV output also is | |
54 | fully compliant with FLV format metadata and Adobe Flash Player | |
55 | standards. | |
27c0e367 ER |
56 | |
57 | %package libs | |
2cc44e6c | 58 | Summary: Shared libraries for On2 Flix Engine |
27c0e367 ER |
59 | Group: Libraries |
60 | ||
61 | %description libs | |
2cc44e6c | 62 | Shared libraries for On2 Flix Engine. |
27c0e367 ER |
63 | |
64 | %package devel | |
2cc44e6c | 65 | Summary: Header files for On2 Flix Engine library |
27c0e367 ER |
66 | Group: Development/Libraries |
67 | ||
68 | %description devel | |
2cc44e6c | 69 | Header files for On2 Flix Engine library. |
27c0e367 | 70 | |
3d68873f ER |
71 | %package -n java-flixengine |
72 | Summary: Java bindings for On2 Flix Engine | |
73 | Group: Libraries | |
74 | Requires: %{name}-libs = %{version}-%{release} | |
75 | ||
76 | %description -n java-flixengine | |
77 | Java bindings for On2 Flix Engine. | |
78 | ||
79 | %package -n perl-flixengine | |
80 | Summary: Perl bindings for On2 Flix Engine | |
81 | Group: Libraries | |
82 | Requires: %{name}-libs = %{version}-%{release} | |
83 | ||
84 | %description -n perl-flixengine | |
85 | Perl bindings for On2 Flix Engine. | |
86 | ||
87 | %package -n php-flixengine | |
88 | Summary: PHP bindings for On2 Flix Engine | |
3522469a | 89 | %{?requires_php_extension} |
3d68873f ER |
90 | Group: Libraries |
91 | Requires: %{name}-libs = %{version}-%{release} | |
ae1c9292 | 92 | Requires: /etc/php/conf.d |
3d68873f ER |
93 | |
94 | %description -n php-flixengine | |
95 | PHP bindings for On2 Flix Engine. | |
96 | ||
97 | %package -n python-flixengine | |
98 | Summary: Python bindings for On2 Flix Engine | |
99 | Group: Libraries | |
100 | Requires: %{name}-libs = %{version}-%{release} | |
101 | ||
102 | %description -n python-flixengine | |
103 | Python bindings for On2 Flix Engine. | |
104 | ||
27c0e367 ER |
105 | %prep |
106 | %setup -q -n flix-engine-installer-linux-%{version}_DEMO | |
2cc44e6c ER |
107 | bin=flix-engine-installer-linux-%{version}_DEMO.bin |
108 | tar=flix-engine-linux-%{version}_DEMO.tar.gz | |
109 | ||
110 | OFFSET=$( awk -F= '/OFFSET=/{print $2; exit}' $bin) | |
111 | dd bs=8 if=$bin of=$tar skip=$OFFSET | |
112 | %{__tar} zxf $tar | |
113 | ||
114 | %{__sed} -ne '/## FUNCTIONS common/,/## END - common function/p' $bin > functions.sh | |
115 | cat <<'EOF' > install.sh | |
116 | #!/bin/bash | |
117 | export VERSION=%{version}_DEMO | |
118 | export FLIXENGINEDEMO=1 | |
119 | export nullout=/dev/null | |
120 | export tempdir=%{_builddir}/flix-engine-installer-linux-%{version}_DEMO | |
121 | ||
122 | . $(dirname "$0")/functions.sh | |
123 | cd .flix-engine-installation-files | |
124 | ||
125 | export -f getinput inset ynanswer | |
126 | ./install.sh "$@" | |
127 | EOF | |
128 | chmod +x install.sh | |
129 | ||
130 | cd .flix-engine-installation-files | |
131 | %{__sed} -i -e ' | |
356dfb23 | 132 | # force installing initscript into buildroot without detection |
2cc44e6c | 133 | s,^initchk$,inittype=sysv1; INITDIR=$RPM_BUILD_ROOT/etc/rc.d/init.d, |
356dfb23 ER |
134 | |
135 | # cls is annoying | |
2cc44e6c | 136 | s,clear 2>\$nullout,#&, |
356dfb23 ER |
137 | |
138 | # we want to install examples, but not compile them in install | |
139 | # and somewhy --no-compile didn not work, had to specify also --no-modules, | |
140 | # which made no modules installed either, chicken-egg problem. | |
141 | s,COMPILEMODULES=y,COMPILEMODULES=n, | |
142 | s,INSTALLEDPERLFILES="n",INSTALLEDPERLFILES="y", | |
143 | s,INSTALLEDPHPFILES="n",INSTALLEDPHPFILES="y", | |
144 | s,INSTALLEDPYTHONFILES="n",INSTALLEDPYTHONFILES="y", | |
145 | s,INSTALLEDFLIXLIBRARIES="n",INSTALLEDFLIXLIBRARIES="y", | |
146 | s,INSTALLEDJAVAFILES="n",INSTALLEDJAVAFILES="y", | |
147 | ||
2cc44e6c ER |
148 | ' install.sh |
149 | ||
150 | %build | |
151 | cd .flix-engine-installation-files | |
27c0e367 | 152 | |
356dfb23 ER |
153 | ln -snf flixhdrs flixengine2 |
154 | export C_INCLUDE_PATH=$(pwd) | |
155 | ||
156 | ldconfig -n flixlibs | |
157 | export LD_LIBRARY_PATH=$(pwd)/flixlibs | |
158 | export LIBRARY_PATH=$(pwd)/flixlibs | |
159 | ||
160 | # PHP | |
161 | %{__make} -C flixphp \ | |
162 | CC="%{__cc}" \ | |
163 | -f target.mk \ | |
164 | ||
165 | # Perl | |
166 | cd flixperl | |
167 | %{__perl} Makefile.PL \ | |
168 | INSTALLDIRS=vendor | |
169 | %{__make} \ | |
170 | CC="%{__cc}" \ | |
171 | OPTIMIZE="%{rpmcflags}" | |
172 | %{?with_tests:%{__make} test} | |
173 | cd .. | |
174 | ||
175 | # Python | |
176 | cd flixpython | |
177 | %{__python} setup.py build | |
178 | cd .. | |
179 | ||
180 | # Java | |
181 | %{__make} -C flixjava \ | |
182 | CC="%{__cc}" \ | |
183 | -f target.mk | |
184 | ||
27c0e367 ER |
185 | %install |
186 | rm -rf $RPM_BUILD_ROOT | |
27c0e367 | 187 | |
2cc44e6c | 188 | ./install.sh \ |
27c0e367 ER |
189 | --prefix=$RPM_BUILD_ROOT%{_prefix} \ |
190 | --mandir=$RPM_BUILD_ROOT%{_mandir} \ | |
356dfb23 ER |
191 | --flixsamples=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \ |
192 | --pidfile=$RPM_BUILD_ROOT/var/run/flixd.pid \ | |
2cc44e6c | 193 | --authdir=$RPM_BUILD_ROOT/var/lib/on2 \ |
27c0e367 ER |
194 | --just-install \ |
195 | --offline \ | |
196 | --yesireadtheon2license \ | |
2cc44e6c | 197 | --no-compile \ |
356dfb23 | 198 | --no-modules \ |
2cc44e6c | 199 | --no-init \ |
356dfb23 ER |
200 | --noprereqlibs |
201 | ||
3522469a ER |
202 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/flixengine |
203 | ||
356dfb23 ER |
204 | # install bindings |
205 | cd .flix-engine-installation-files | |
206 | # PHP | |
207 | %{__make} -C flixphp \ | |
208 | install \ | |
209 | PHPINST=$RPM_BUILD_ROOT%{extensionsdir} \ | |
210 | -f target.mk | |
3522469a ER |
211 | install -d $RPM_BUILD_ROOT/etc/php/conf.d |
212 | cat <<'EOF' > $RPM_BUILD_ROOT/etc/php/conf.d/flixengine.ini | |
213 | ; Enable flixengine extension module | |
214 | extension=flixengine2.so | |
215 | EOF | |
356dfb23 ER |
216 | |
217 | # Perl | |
218 | cd flixperl | |
219 | %{__make} pure_install \ | |
220 | DESTDIR=$RPM_BUILD_ROOT | |
3d68873f | 221 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/On2/flixengine2/.packlist |
356dfb23 ER |
222 | cd .. |
223 | ||
224 | # Python | |
225 | cd flixpython | |
226 | %{__python} setup.py install \ | |
227 | --optimize=2 \ | |
228 | --root=$RPM_BUILD_ROOT | |
3d68873f | 229 | %py_postclean |
356dfb23 ER |
230 | cd .. |
231 | ||
232 | # Java | |
233 | %{__make} -C flixjava \ | |
234 | SOINST=$RPM_BUILD_ROOT%{_libdir} \ | |
235 | JARINST=$RPM_BUILD_ROOT%{_javadir} \ | |
236 | install \ | |
237 | -f target.mk | |
27c0e367 ER |
238 | |
239 | # symlink without buildroot | |
2cc44e6c ER |
240 | ln -snf %{_prefix}/src/flixmodules/flixjava/doc $RPM_BUILD_ROOT%{_docdir}/on2/flixengine/javadoc |
241 | ||
242 | # do not put hardware fingerprint to rpm package | |
243 | > $RPM_BUILD_ROOT/var/lib/on2/hostinfo | |
27c0e367 ER |
244 | |
245 | # use poldek -e | |
246 | rm -f $RPM_BUILD_ROOT%{_sbindir}/flix-engine-uninstall.sh | |
247 | ||
248 | %clean | |
249 | rm -rf $RPM_BUILD_ROOT | |
250 | ||
251 | %post libs -p /sbin/ldconfig | |
252 | %postun libs -p /sbin/ldconfig | |
253 | ||
2cc44e6c | 254 | %post |
44a0377b | 255 | /sbin/chkconfig --add %{name} |
356dfb23 | 256 | if [ ! -s /var/lib/on2/hostinfo ]; then |
2cc44e6c ER |
257 | %{_sbindir}/on2_host_info > /var/lib/on2/hostinfo |
258 | fi | |
44a0377b ER |
259 | %service %{name} restart |
260 | ||
261 | %preun | |
262 | if [ "$1" = "0" ]; then | |
263 | %service -q %{name} stop | |
264 | /sbin/chkconfig --del %{name} | |
265 | fi | |
2cc44e6c | 266 | |
3522469a ER |
267 | %post -n php-flixengine |
268 | [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart | |
269 | [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart | |
270 | ||
271 | %postun -n php-flixengine | |
272 | if [ "$1" = 0 ]; then | |
273 | [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart | |
274 | [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart | |
275 | fi | |
276 | ||
27c0e367 ER |
277 | %files |
278 | %defattr(644,root,root,755) | |
279 | %doc %{_docdir}/on2 | |
280 | %attr(755,root,root) %{_sbindir}/flixd | |
281 | %attr(755,root,root) %{_sbindir}/lget | |
282 | %attr(755,root,root) %{_sbindir}/on2_host_info | |
2cc44e6c | 283 | %attr(754,root,root) /etc/rc.d/init.d/flixengine |
27c0e367 | 284 | %{_mandir}/man8/flixd.8* |
2cc44e6c ER |
285 | %dir /var/lib/on2 |
286 | %config(noreplace) %verify(not md5 mtime size) /var/lib/on2/hostinfo | |
27c0e367 | 287 | %{_libexecdir}/on2/flixengine/mencoder |
27c0e367 ER |
288 | |
289 | %files libs | |
290 | %defattr(644,root,root,755) | |
2cc44e6c ER |
291 | %attr(755,root,root) %{_libdir}/libflixengine2.so.*.* |
292 | %attr(755,root,root) %{_libdir}/libflixengine2_core.so.*.* | |
27c0e367 ER |
293 | |
294 | %files devel | |
295 | %defattr(644,root,root,755) | |
356dfb23 ER |
296 | %attr(755,root,root) %{_libdir}/libflixengine2.so |
297 | %attr(755,root,root) %{_libdir}/libflixengine2_core.so | |
27c0e367 | 298 | %{_includedir}/flixengine2 |
356dfb23 ER |
299 | |
300 | %dir %{_examplesdir}/%{name}-%{version} | |
301 | %{_examplesdir}/%{name}-%{version}/c | |
302 | %{_examplesdir}/%{name}-%{version}/java | |
303 | %{_examplesdir}/%{name}-%{version}/perl | |
304 | %{_examplesdir}/%{name}-%{version}/php | |
305 | %{_examplesdir}/%{name}-%{version}/python | |
3d68873f ER |
306 | |
307 | %files -n java-flixengine | |
308 | %defattr(644,root,root,755) | |
3522469a | 309 | %attr(755,root,root) %{_libdir}/libflixengine2_jni.so |
3d68873f ER |
310 | %{_javadir}/flixengine2.jar |
311 | ||
312 | %files -n perl-flixengine | |
313 | %defattr(644,root,root,755) | |
314 | %dir %{perl_vendorarch}/On2 | |
315 | %{perl_vendorarch}/On2/flixengine2.pm | |
316 | %dir %{perl_vendorarch}/auto/On2 | |
317 | %dir %{perl_vendorarch}/auto/On2/flixengine2 | |
318 | %{perl_vendorarch}/auto/On2/flixengine2/flixengine2.bs | |
319 | %attr(755,root,root) %{perl_vendorarch}/auto/On2/flixengine2/flixengine2.so | |
320 | ||
321 | %files -n php-flixengine | |
322 | %defattr(644,root,root,755) | |
3522469a ER |
323 | %config(noreplace) %verify(not md5 mtime size) /etc/php/conf.d/flixengine.ini |
324 | %attr(755,root,root) %{extensionsdir}/flixengine2.so | |
3d68873f ER |
325 | %{_libdir}/flixengine2.php |
326 | ||
327 | %files -n python-flixengine | |
328 | %defattr(644,root,root,755) | |
3522469a | 329 | %attr(755,root,root) %{py_sitedir}/_flixengine2.so |
3d68873f ER |
330 | %{py_sitedir}/flixengine2.pyc |
331 | %{py_sitedir}/flixengine2.pyo |