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