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