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