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