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