]> git.pld-linux.org Git - packages/flixengine.git/blob - flixengine.spec
- listen locally
[packages/flixengine.git] / flixengine.spec
1 #
2 # Conditional build:
3 %bcond_without  autodeps        # don't BR packages needed only for resolving deps
4 %bcond_without          python  # do not build Python bindings
5 %bcond_without          java    # do not build Java bindings
6 %bcond_with     tests           # perform "make test". needs running flixd on localhost
7 #
8 %ifarch %{x8664}
9 %undefine       with_python
10 %undefine       with_java
11 %endif
12 #
13 %include        /usr/lib/rpm/macros.perl
14 Summary:        On2 Flix Engine
15 Summary(pl):    Silnik On2 Flix
16 Name:           flixengine
17 Version:        8.0.7.1
18 Release:        0.11
19 License:        not distributable
20 Group:          Applications
21 # download demo from http://flix.on2.com/demos/
22 Source0:        %{name}linuxdemo.tar.gz
23 # NoSource0-md5:        fb7cc89ce2689d3c43434291620cfd0f
24 NoSource:       0
25 Source1:        %{name}.init
26 Patch0:         %{name}-libdir.patch
27 Patch1:         %{name}-phploader.patch
28 URL:            http://www.on2.com/developer/flix-engine-sdk
29 BuildRequires:  bash
30 %{?with_java:BuildRequires:     jre}
31 BuildRequires:  perl-base
32 BuildRequires:  php-devel
33 %{?with_python:BuildRequires:   python}
34 BuildRequires:  rpm-perlprov >= 4.1-13
35 BuildRequires:  rpmbuild(macros) >= 1.344
36 %if %{with autodeps}
37 BuildRequires:  ffmpeg-libs
38 BuildRequires:  lame-libs
39 %endif
40 Requires(post,preun):   /sbin/chkconfig
41 Requires:       portmap
42 Requires:       rc-scripts
43 Conflicts:      %{name}-libs < %{version}-%{release}
44 Conflicts:      %{name}-libs > %{version}-%{release}
45 ExclusiveArch:  %{ix86} %{x8664}
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 The On2 Flix Engine provides many of the Flash 8 video encoding
50 features of our industry leading On2 Flix Pro video encoder in a
51 powerful software SDK.
52
53 The Engine enables you to add the power and efficiency of Flash video
54 with On2 VP6 encoding to your intranet, website and other server-based
55 applications, preserve alpha channel in the video output, and much
56 more.
57
58 The major feature of the On2 Flix Engine 8 is support for Adobe Flash
59 8 video with the On2 VP6 codec and FLV video output that can be played
60 directly in the Flash Player, streamed through the Adobe Flash Media
61 Server, or imported into Flash Studio. The new FLV output also is
62 fully compliant with FLV format metadata and Adobe Flash Player
63 standards.
64
65 %description -l pl
66 Silnik On2 Flix Engine udostêpnia wiele spo¶ród mo¿liwo¶ci kodowania
67 filmów Flash 8 wiod±cego kodera On2 Flix Pro w postaci potê¿nego SDK.
68
69 Silnik pozwala wykorzystywaæ mo¿liwo¶ci i wydajno¶æ filmów Flash z
70 kodowaniem On2 VP6 w intranecie, na stronie WWW i w innych
71 zastosowaniach serwerowych, z zachowaniem kana³u alpha na wyj¶ciu
72 obrazu i innymi opcjami.
73
74 G³ówn± cech± silnika On2 Flix Engine 8 jest obs³uga filmów Adobe Flash
75 8 z kodekiem On2 VP6 oraz wyj¶ciem obrazu FLV, które mo¿na odtwarzaæ
76 bezpo¶rednio w odtwarzaczu Flash, przekazywaæ strumieniem poprzez
77 Adobe Flash Media Server lub importowaæ do Flash Studio. Nowe wyj¶cie
78 FLV jest tak¿e w pe³ni zgodne z formatem metadanych FLV i standardami
79 Adobe Flash Playera.
80
81 %package libs
82 Summary:        Shared libraries for On2 Flix Engine
83 Summary(pl):    Biblioteki wspó³dzielone silnika On2 Flix
84 Group:          Libraries
85
86 %description libs
87 Shared libraries for On2 Flix Engine.
88
89 %description libs -l pl
90 Biblioteki wspó³dzielone silnika On2 Flix.
91
92 %package devel
93 Summary:        Header files for On2 Flix Engine library
94 Summary(pl):    Pliki nag³ówkowe biblioteki silnika On2 Flix
95 Group:          Development/Libraries
96
97 %description devel
98 Header files for On2 Flix Engine library.
99
100 %description devel -l pl
101 Pliki nag³ówkowe biblioteki silnika On2 Flix.
102
103 %package -n java-flixengine
104 Summary:        Java bindings for On2 Flix Engine
105 Summary(pl):    Wi±zania Javy dla silnika On2 Flix
106 Group:          Libraries
107 Requires:       %{name}-libs = %{version}-%{release}
108
109 %description -n java-flixengine
110 Java bindings for On2 Flix Engine.
111
112 %description -n java-flixengine -l pl
113 Wi±zania Javy dla silnika On2 Flix.
114
115 %package -n perl-flixengine
116 Summary:        Perl bindings for On2 Flix Engine
117 Summary(pl):    Wi±zania perla dla silnika On2 Flix
118 Group:          Libraries
119 Requires:       %{name}-libs = %{version}-%{release}
120
121 %description -n perl-flixengine
122 Perl bindings for On2 Flix Engine.
123
124 %description -n perl-flixengine -l pl
125 Wi±zania perla dla silnika On2 Flix.
126
127 %package -n php-flixengine
128 Summary:        PHP bindings for On2 Flix Engine
129 Summary(pl):    Wi±zania PHP dla silnika On2 Flix
130 %{?requires_php_extension}
131 Group:          Libraries
132 Requires:       %{name}-libs = %{version}-%{release}
133 Requires:       php-common >= 4:5.0.4
134
135 %description -n php-flixengine
136 PHP bindings for On2 Flix Engine.
137
138 %description -n php-flixengine -l pl
139 Wi±zania PHP dla silnika On2 Flix.
140
141 %package -n python-flixengine
142 Summary:        Python bindings for On2 Flix Engine
143 Summary(pl):    Wi±zania Pythona dla silnika On2 Flix
144 Group:          Libraries
145 Requires:       %{name}-libs = %{version}-%{release}
146
147 %description -n python-flixengine
148 Python bindings for On2 Flix Engine.
149
150 %description -n python-flixengine -l pl
151 Wi±zania Pythona dla silnika On2 Flix.
152
153 %package docs
154 Summary:        HTML Documentation for On2 Flix Engine
155 Group:          Documentation
156
157 %description docs
158 HTML Documentation for On2 Flix Engine
159
160 %prep
161 %setup -q -n flix-engine-installer-linux-%{version}_DEMO
162 bin=flix-engine-installer-linux-%{version}_DEMO.bin
163 tar=flix-engine-linux-%{version}_DEMO.tar.gz
164
165 OFFSET=$( awk -F= '/OFFSET=/{print $2; exit}' $bin)
166 dd bs=8 if=$bin of=$tar skip=$OFFSET
167 %{__tar} zxf $tar
168
169 %patch0 -p1
170 %patch1 -p1
171
172 %{__sed} -ne '/## FUNCTIONS common/,/## END - common function/p' $bin > functions.sh
173 cat <<'EOF' > install.sh
174 #!/bin/bash
175 export VERSION=%{version}_DEMO
176 export FLIXENGINEDEMO=1
177 export nullout=/dev/null
178 export tempdir=%{_builddir}/flix-engine-installer-linux-%{version}_DEMO
179
180 . $(dirname "$0")/functions.sh
181 cd .flix-engine-installation-files
182
183 export -f getinput inset ynanswer
184 ./install.sh "$@"
185 EOF
186 chmod +x install.sh
187
188 cd .flix-engine-installation-files
189 %{__sed} -i -e '
190 # force installing initscript into buildroot without detection
191 s,^initchk$,inittype=sysv1; INITDIR=$RPM_BUILD_ROOT/etc/rc.d/init.d,
192
193 # cls is annoying
194 s,clear 2>\$nullout,#&,
195
196 # we want to install examples, but not compile them in install
197 # and somewhy --no-compile didn not work, had to specify also --no-modules,
198 # which made no modules installed either, chicken-egg problem.
199 s,COMPILEMODULES=y,COMPILEMODULES=n,
200 s,INSTALLEDPERLFILES="n",INSTALLEDPERLFILES="y",
201 s,INSTALLEDPHPFILES="n",INSTALLEDPHPFILES="y",
202 s,INSTALLEDPYTHONFILES="n",INSTALLEDPYTHONFILES="y",
203 s,INSTALLEDFLIXLIBRARIES="n",INSTALLEDFLIXLIBRARIES="y",
204 s,INSTALLEDJAVAFILES="n",INSTALLEDJAVAFILES="y",
205
206 ' install.sh
207
208 %build
209 cd .flix-engine-installation-files
210
211 ln -snf flixhdrs flixengine2
212 export C_INCLUDE_PATH=$(pwd)
213
214 %ifarch %{x8664}
215 export LD_LIBRARY_PATH=$(pwd)/testing/lib64
216 ldconfig -n testing/lib64
217 %else
218 export LD_LIBRARY_PATH=$(pwd)/flixlibs
219 ldconfig -n flixlibs
220 %endif
221 export LIBRARY_PATH=$LD_LIBRARY_PATH
222
223 # PHP
224 %{__make} -C flixphp \
225         CC="%{__cc}" \
226         -f target.mk
227
228 # Perl
229 cd flixperl
230 %{__perl} Makefile.PL \
231         INSTALLDIRS=vendor
232 %{__make} \
233         CC="%{__cc}" \
234         OPTIMIZE="%{rpmcflags}"
235 %{?with_tests:%{__make} test}
236 cd ..
237
238 %if %{with python}
239 cd flixpython
240 %{__python} setup.py build
241 cd ..
242 %endif
243
244 %if %{with java}
245 %{__make} -C flixjava \
246         CC="%{__cc}" \
247         -f target.mk
248 %endif
249
250 %install
251 rm -rf $RPM_BUILD_ROOT
252
253 ./install.sh \
254         --prefix=$RPM_BUILD_ROOT%{_prefix} \
255         --mandir=$RPM_BUILD_ROOT%{_mandir} \
256         --mencoderbin=$RPM_BUILD_ROOT%{_bindir} \
257         --flixsamples=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
258         --pidfile=$RPM_BUILD_ROOT/var/run/flixd.pid \
259         --authdir=$RPM_BUILD_ROOT/var/lib/on2 \
260         --just-install \
261         --offline \
262         --yesireadtheon2license \
263         --no-compile \
264         --no-modules \
265         --no-init \
266         --noprereqlibs
267
268 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/flixd
269
270 cd .flix-engine-installation-files
271
272 # install bindings
273 # PHP
274 %{__make} -C flixphp \
275         install \
276         PHPINST=%{php_extensiondir} \
277         DESTDIR=$RPM_BUILD_ROOT \
278         -f target.mk
279 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
280 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/flixengine.ini
281 ; Enable flixengine extension module
282 extension=flixengine2.so
283 EOF
284
285 # Perl
286 cd flixperl
287 %{__make} pure_install \
288         DESTDIR=$RPM_BUILD_ROOT
289 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/On2/flixengine2/.packlist
290 cd ..
291
292 %if %{with python}
293 cd flixpython
294 %{__python} setup.py install \
295         --optimize=2 \
296         --root=$RPM_BUILD_ROOT
297 %py_postclean
298 cd ..
299 %endif
300
301 rm -f $RPM_BUILD_ROOT%{_docdir}/on2/flixengine/javadoc
302 %if %{with java}
303 %{__make} -C flixjava \
304         SOINST=$RPM_BUILD_ROOT%{_libdir} \
305         JARINST=$RPM_BUILD_ROOT%{_javadir} \
306         install \
307         -f target.mk
308
309 # symlink without buildroot
310 ln -snf %{_prefix}/src/flixmodules/flixjava/doc $RPM_BUILD_ROOT%{_docdir}/on2/flixengine/javadoc
311 %endif
312
313 %ifarch %{x8664}
314 cp -a testing/lib64/libflixengine2.so* $RPM_BUILD_ROOT%{_libdir}
315 %endif
316
317 # avoid collision from mplayer package
318 mv $RPM_BUILD_ROOT%{_bindir}/mencoder{,-flixengine}
319
320 # do not put hardware fingerprint to rpm package
321 > $RPM_BUILD_ROOT/var/lib/on2/hostinfo
322
323 # use poldek -e
324 rm -f $RPM_BUILD_ROOT%{_sbindir}/flix-engine-uninstall.sh
325
326 %clean
327 rm -rf $RPM_BUILD_ROOT
328
329 %post   libs -p /sbin/ldconfig
330 %postun libs -p /sbin/ldconfig
331
332 %post
333 /sbin/chkconfig --add flixd
334 if [ ! -s /var/lib/on2/hostinfo ]; then
335         %{_sbindir}/on2_host_info > /var/lib/on2/hostinfo
336 %banner -e %{name} <<EOF
337 To register your copy of flixd invoke:
338 # %{_sbindir}/lget -u '<username>' -s '<serial>' -i /var/lib/on2/hostinfo -o /var/lib/on2/on2product.lic -a 'On2FlixEngine/%{version}_DEMO (%(uname -o))'
339 EOF
340 fi
341 %service flixd restart
342
343 %preun
344 if [ "$1" = "0" ]; then
345         %service -q flixd stop
346         /sbin/chkconfig --del flixd
347 fi
348
349 %post -n php-flixengine
350 %php_webserver_restart
351
352 %postun -n php-flixengine
353 if [ "$1" = 0 ]; then
354         %php_webserver_restart
355 fi
356
357 %files
358 %defattr(644,root,root,755)
359 %doc doc/*
360 %{?with_java:%exclude %{_docdir}/on2/flixengine/javadoc}
361 %attr(755,root,root) %{_sbindir}/flixd
362 %attr(755,root,root) %{_sbindir}/lget
363 %attr(755,root,root) %{_sbindir}/on2_host_info
364 %attr(754,root,root) /etc/rc.d/init.d/flixd
365 %{_mandir}/man8/flixd.8*
366 %dir /var/lib/on2
367 %config(noreplace) %verify(not md5 mtime size) /var/lib/on2/hostinfo
368 %attr(755,root,root) %{_bindir}/mencoder-flixengine
369
370 %files libs
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_prefix}/lib/libflixengine2.so.*.*
373 %attr(755,root,root) %{_prefix}/lib/libflixengine2_core.so.*.*
374 %ifarch %{x8664}
375 %attr(755,root,root) %{_libdir}/libflixengine2.so.*.*
376 %endif
377 %dir %{_examplesdir}/%{name}-%{version}
378
379 %files devel
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_prefix}/lib/libflixengine2.so
382 %attr(755,root,root) %{_prefix}/lib/libflixengine2_core.so
383 %ifarch %{x8664}
384 %attr(755,root,root) %{_libdir}/libflixengine2.so
385 %endif
386 %{_includedir}/flixengine2
387 %{_examplesdir}/%{name}-%{version}/c
388
389 %if %{with java}
390 %files -n java-flixengine
391 %defattr(644,root,root,755)
392 %doc %{_docdir}/on2/flixengine/javadoc
393 %attr(755,root,root) %{_libdir}/libflixengine2_jni.so
394 %{_javadir}/flixengine2.jar
395 %{_examplesdir}/%{name}-%{version}/java
396 %endif
397
398 %files -n perl-flixengine
399 %defattr(644,root,root,755)
400 %dir %{perl_vendorarch}/On2
401 %{perl_vendorarch}/On2/flixengine2.pm
402 %dir %{perl_vendorarch}/auto/On2
403 %dir %{perl_vendorarch}/auto/On2/flixengine2
404 %{perl_vendorarch}/auto/On2/flixengine2/flixengine2.bs
405 %attr(755,root,root) %{perl_vendorarch}/auto/On2/flixengine2/flixengine2.so
406 %{_examplesdir}/%{name}-%{version}/perl
407
408 %files -n php-flixengine
409 %defattr(644,root,root,755)
410 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/flixengine.ini
411 %attr(755,root,root) %{php_extensiondir}/flixengine2.so
412 %{_prefix}/lib/flixengine2.php
413 %{_examplesdir}/%{name}-%{version}/php
414
415 %if %{with python}
416 %files -n python-flixengine
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{py_sitedir}/_flixengine2.so
419 %{py_sitedir}/flixengine2.pyc
420 %{py_sitedir}/flixengine2.pyo
421 %{_examplesdir}/%{name}-%{version}/python
422 %endif
423
424 %files docs
425 %defattr(644,root,root,755)
426 %doc %{_docdir}/on2
This page took 0.207486 seconds and 3 git commands to generate.