]> git.pld-linux.org Git - packages/flixengine.git/blame - flixengine.spec
automatic change: use py_build/py_install macros
[packages/flixengine.git] / flixengine.spec
CommitLineData
356dfb23
ER
1#
2# Conditional build:
3%bcond_without autodeps # don't BR packages needed only for resolving deps
00cd1c2c
ER
4%bcond_without python # Python bindings
5%bcond_without java # Java bindings
6%bcond_without php # PHP bindings
7%bcond_without perl # Perl bindings
8%bcond_without tests # perform "make test". needs running flixd on localhost
9%bcond_without demo # use non-demo tarball (you need valid license to start daemon)
c3871d26
ER
10%bcond_without apis # disable all apis, build just flixd
11%bcond_without apidocs # without apidocs
12
c3871d26
ER
13%if %{without apis}
14%undefine with_python
15%undefine with_java
16%undefine with_php
17%undefine with_perl
18%undefine with_apidocs
19%endif
20
6fc8cf70 21%define full_version %{version}%{?with_demo:_DEMO}%{?_extra}
02d12547 22%define _extra %{nil}
c3871d26
ER
23
24%{?with_perl:%include /usr/lib/rpm/macros.perl}
2cc44e6c 25Summary: On2 Flix Engine
e45506f7 26Summary(pl.UTF-8): Silnik On2 Flix
27c0e367 27Name: flixengine
d52ff25a 28Version: 8.0.13.0
ab083730 29Release: 2
f8494186 30License: (probably) not distributable
27c0e367
ER
31Group: Applications
32# download demo from http://flix.on2.com/demos/
d8688be2 33# check for newer versions at http://flix.on2.com/flix/download/
e9b1b01f 34# Source0Download: http://flix.on2.com/demos/flixenginelinuxdemo.tar.gz
c67dbec0 35%if %{with demo}
8c85be7f 36Source0: %{name}linuxdemo-%{version}.tar.gz
d52ff25a 37# NoSource0-md5: 883d227eeeb4973f65c4c12aed6b0e02
27c0e367 38NoSource: 0
c67dbec0
ER
39%endif
40%if %{without demo}
d8688be2 41# Source1Download: http://flix.on2.com/flix/download/flix-engine-installer-linux-%{version}.tar.gz
6fc8cf70 42Source1: flix-engine-installer-linux-%{version}%{?_extra}.tar.gz
ab083730 43# NoSource1-md5: 60fd126a8d4aa81d286d6ea534a11f08
c67dbec0
ER
44NoSource: 1
45%endif
46Source2: %{name}.init
d84efd8a 47Source3: %{name}.sysconfig
a5747b91 48Patch0: %{name}-libdir.patch
748f3cdf 49Patch1: %{name}-phploader.patch
d52ff25a 50URL: http://support.on2.com/
356dfb23 51BuildRequires: bash
a8e655c0 52%{?with_java:BuildRequires: jdk}
c3871d26
ER
53%{?with_perl:BuildRequires: perl-base}
54%{?with_php:BuildRequires: php-devel}
a8e655c0 55%{?with_python:BuildRequires: python-devel}
c3871d26 56%{?with_perl:BuildRequires: rpm-perlprov >= 4.1-13}
a8e655c0 57%{?with_python:BuildRequires: rpm-pythonprov}
9d8f979c 58BuildRequires: rpmbuild(macros) >= 1.344
40472a64
JB
59%if %{with autodeps}
60BuildRequires: ffmpeg-libs
61BuildRequires: lame-libs
62%endif
c3871d26
ER
63%if %{without demo} && "%{version}" == "8.0.13.0"
64BuildRequires: flixengine-libs = %{version}
65%endif
44a0377b 66Requires(post,preun): /sbin/chkconfig
825446df
ER
67Requires(postun): /usr/sbin/groupdel
68Requires(postun): /usr/sbin/userdel
69Requires(pre): /bin/id
70Requires(pre): /usr/bin/getgid
71Requires(pre): /usr/sbin/groupadd
72Requires(pre): /usr/sbin/useradd
44a0377b 73Requires: portmap
f609d41d 74Requires: rc-scripts >= 0.4.1.5
825446df
ER
75Provides: group(flixd)
76Provides: user(flixd)
a5747b91 77ExclusiveArch: %{ix86} %{x8664}
27c0e367
ER
78BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79
593b9d17 80%define _sysconfdir /etc/on2
00cd1c2c 81%define _libexecdir %{_prefix}/lib/flixd
593b9d17 82
d52ff25a 83# don't satisfy other packages for ffmpeg library deps (don't use %{name} here)
00cd1c2c 84%define _noautoprovfiles %{_libexecdir}
d52ff25a
ER
85
86# and as we don't provide them, don't require either
87%define _noautoreq libavutil.so libavformat.so libavcodec.so
88
00cd1c2c
ER
89# these match for java-sun
90%ifarch %{ix86}
91%define _jvmlibdir %{_jvmdir}/jre/lib/i386
92%endif
93%ifarch %{x8664}
94%define _jvmlibdir %{_jvmdir}/jre/lib/amd64
95%endif
96
27c0e367 97%description
2cc44e6c
ER
98The On2 Flix Engine provides many of the Flash 8 video encoding
99features of our industry leading On2 Flix Pro video encoder in a
100powerful software SDK.
101
102The Engine enables you to add the power and efficiency of Flash video
103with On2 VP6 encoding to your intranet, website and other server-based
104applications, preserve alpha channel in the video output, and much
105more.
106
107The major feature of the On2 Flix Engine 8 is support for Adobe Flash
1088 video with the On2 VP6 codec and FLV video output that can be played
109directly in the Flash Player, streamed through the Adobe Flash Media
110Server, or imported into Flash Studio. The new FLV output also is
111fully compliant with FLV format metadata and Adobe Flash Player
112standards.
27c0e367 113
04a8bc7a 114%description -l pl.UTF-8
b88a126a
ER
115Silnik On2 Flix Engine udostępnia wiele spośród możliwości kodowania
116filmów Flash 8 wiodącego kodera On2 Flix Pro w postaci potężnego SDK.
40472a64 117
b88a126a
ER
118Silnik pozwala wykorzystywać możliwości i wydajność filmów Flash z
119kodowaniem On2 VP6 w intranecie, na stronie WWW i w innych
04a8bc7a 120zastosowaniach serwerowych, z zachowaniem kanału alpha na wyjściu
40472a64
JB
121obrazu i innymi opcjami.
122
b88a126a
ER
123Główną cechą silnika On2 Flix Engine 8 jest obsługa filmów Adobe Flash
1248 z kodekiem On2 VP6 oraz wyjściem obrazu FLV, które można odtwarzać
125bezpośrednio w odtwarzaczu Flash, przekazywać strumieniem poprzez
126Adobe Flash Media Server lub importować do Flash Studio. Nowe wyjście
127FLV jest także w pełni zgodne z formatem metadanych FLV i standardami
128Adobe Flash Playera.
40472a64 129
27c0e367 130%package libs
2cc44e6c 131Summary: Shared libraries for On2 Flix Engine
e45506f7 132Summary(pl.UTF-8): Biblioteki współdzielone silnika On2 Flix
27c0e367
ER
133Group: Libraries
134
135%description libs
2cc44e6c 136Shared libraries for On2 Flix Engine.
27c0e367 137
04a8bc7a
JR
138%description libs -l pl.UTF-8
139Biblioteki współdzielone silnika On2 Flix.
40472a64 140
27c0e367 141%package devel
2cc44e6c 142Summary: Header files for On2 Flix Engine library
e45506f7 143Summary(pl.UTF-8): Pliki nagłówkowe biblioteki silnika On2 Flix
27c0e367
ER
144Group: Development/Libraries
145
146%description devel
2cc44e6c 147Header files for On2 Flix Engine library.
27c0e367 148
04a8bc7a
JR
149%description devel -l pl.UTF-8
150Pliki nagłówkowe biblioteki silnika On2 Flix.
40472a64 151
00cd1c2c 152%package -n java-%{name}
3d68873f 153Summary: Java bindings for On2 Flix Engine
e45506f7 154Summary(pl.UTF-8): Wiązania Javy dla silnika On2 Flix
3d68873f
ER
155Group: Libraries
156Requires: %{name}-libs = %{version}-%{release}
d84efd8a 157Requires: jpackage-utils
3d68873f 158
00cd1c2c 159%description -n java-%{name}
3d68873f
ER
160Java bindings for On2 Flix Engine.
161
00cd1c2c 162%description -n java-%{name} -l pl.UTF-8
04a8bc7a 163Wiązania Javy dla silnika On2 Flix.
40472a64 164
00cd1c2c 165%package -n perl-%{name}
3d68873f 166Summary: Perl bindings for On2 Flix Engine
e45506f7 167Summary(pl.UTF-8): Wiązania perla dla silnika On2 Flix
3d68873f
ER
168Group: Libraries
169Requires: %{name}-libs = %{version}-%{release}
170
00cd1c2c 171%description -n perl-%{name}
3d68873f
ER
172Perl bindings for On2 Flix Engine.
173
00cd1c2c 174%description -n perl-%{name} -l pl.UTF-8
04a8bc7a 175Wiązania perla dla silnika On2 Flix.
40472a64 176
00cd1c2c 177%package -n php-%{name}
3d68873f 178Summary: PHP bindings for On2 Flix Engine
e45506f7 179Summary(pl.UTF-8): Wiązania PHP dla silnika On2 Flix
3522469a 180%{?requires_php_extension}
3d68873f
ER
181Group: Libraries
182Requires: %{name}-libs = %{version}-%{release}
9d8f979c 183Requires: php-common >= 4:5.0.4
3d68873f 184
00cd1c2c 185%description -n php-%{name}
3d68873f
ER
186PHP bindings for On2 Flix Engine.
187
00cd1c2c 188%description -n php-%{name} -l pl.UTF-8
04a8bc7a 189Wiązania PHP dla silnika On2 Flix.
40472a64 190
00cd1c2c 191%package -n python-%{name}
3d68873f 192Summary: Python bindings for On2 Flix Engine
e45506f7 193Summary(pl.UTF-8): Wiązania Pythona dla silnika On2 Flix
3d68873f
ER
194Group: Libraries
195Requires: %{name}-libs = %{version}-%{release}
196
00cd1c2c 197%description -n python-%{name}
3d68873f
ER
198Python bindings for On2 Flix Engine.
199
00cd1c2c 200%description -n python-%{name} -l pl.UTF-8
04a8bc7a 201Wiązania Pythona dla silnika On2 Flix.
40472a64 202
593b9d17
ER
203%package apidocs
204Summary: HTML API Documentation for On2 Flix Engine
205Summary(pl.UTF-8): Dokumentacja HTML API dla silnika On2 Flix
fd1d00dc 206Group: Documentation
593b9d17 207Obsoletes: flixengine-docs
fd1d00dc 208
593b9d17
ER
209%description apidocs
210HTML API Documentation for On2 Flix Engine.
348d7388 211
d52ff25a
ER
212Also available online at <http://support.on2.com/flixengine/linux/api/>.
213
593b9d17
ER
214%description apidocs -l pl.UTF-8
215Dokumentacja HTML API dla silnika On2 Flix.
fd1d00dc 216
27c0e367 217%prep
c9b33d7a
ER
218%setup -q -T -b %{?with_demo:0}%{!?with_demo:1} -n flix-engine-installer-linux-%{full_version}
219bin=flix-engine-installer-linux-%{full_version}.bin
220tar=flix-engine-linux-%{full_version}.tar.gz
2cc44e6c
ER
221
222OFFSET=$( awk -F= '/OFFSET=/{print $2; exit}' $bin)
223dd bs=8 if=$bin of=$tar skip=$OFFSET
224%{__tar} zxf $tar
225
a5747b91 226%patch0 -p1
748f3cdf 227%patch1 -p1
a5747b91 228
2cc44e6c
ER
229%{__sed} -ne '/## FUNCTIONS common/,/## END - common function/p' $bin > functions.sh
230cat <<'EOF' > install.sh
231#!/bin/bash
c9b33d7a 232export VERSION=%{full_version}
c67dbec0 233%{?with_demo:export FLIXENGINEDEMO=1}
2cc44e6c 234export nullout=/dev/null
c9b33d7a 235export tempdir=%{_builddir}/flix-engine-installer-linux-%{full_version}
2cc44e6c
ER
236
237. $(dirname "$0")/functions.sh
238cd .flix-engine-installation-files
239
240export -f getinput inset ynanswer
e9f4366e
ER
241instlog=install.log
242./install.sh "$@" | tee -i $instlog
243if [ -f "$instlog" ]; then
244 echo "Local system info:" >>$instlog
245 uname -a 2>/dev/null >>$instlog
246 head /etc/*version* 2>/dev/null >>$instlog
247 head /etc/*release* 2>/dev/null >>$instlog
248 cat /proc/cpuinfo 2>/dev/null >>$instlog
249 /lib/ld-linux.so.2 /lib/libc.so.6 2>/dev/null >>$instlog
250 echo "---" 2>/dev/null >>$instlog
251 /lib/ld-linux.so.2 /lib32/libc.so.6 2>/dev/null >>$instlog
252 echo "---" 2>/dev/null >>$instlog
253 /lib/libc.so.6 2>/dev/null >>$instlog
254 echo "---" 2>/dev/null >>$instlog
255 file /lib/libc.so.6 2>/dev/null >>$instlog
256 echo "---" 2>/dev/null >>$instlog
257 /sbin/ifconfig -a 2>/dev/null >>$instlog
258
259 echo "A log of this installation can be found here:"
260 echo " $instlog"
261 echo
262fi
2cc44e6c
ER
263EOF
264chmod +x install.sh
265
266cd .flix-engine-installation-files
267%{__sed} -i -e '
356dfb23 268# force installing initscript into buildroot without detection
2cc44e6c 269s,^initchk$,inittype=sysv1; INITDIR=$RPM_BUILD_ROOT/etc/rc.d/init.d,
356dfb23
ER
270
271# cls is annoying
2cc44e6c 272s,clear 2>\$nullout,#&,
356dfb23 273
00cd1c2c 274# want to install examples, but not compile them in install
356dfb23
ER
275# and somewhy --no-compile didn not work, had to specify also --no-modules,
276# which made no modules installed either, chicken-egg problem.
277s,COMPILEMODULES=y,COMPILEMODULES=n,
00cd1c2c 278s,^INSTALLEDFLIXLIBRARIES=.*,INSTALLEDFLIXLIBRARIES="y",
653c438e 279%{?with_perl:s,^INSTALLEDPERLFILES=.*,INSTALLEDPERLFILES="y",}
db2a93ff
ER
280%{?with_php:s,^INSTALLEDPHPFILES=.*,INSTALLEDPHPFILES="y",}
281%{?with_python:s,^INSTALLEDPYTHONFILES=.*,INSTALLEDPYTHONFILES="y",}
282%{?with_java:s,^INSTALLEDJAVAFILES=.*,INSTALLEDJAVAFILES="y",}
356dfb23 283
2cc44e6c
ER
284' install.sh
285
9d124465
ER
286# remove backups from patching as we use globs to package files to buildroot
287find flixsamples '(' -name '*~' -o -name '*.orig' ')' | xargs -r rm -v
288
2cc44e6c
ER
289%build
290cd .flix-engine-installation-files
e9b1b01f 291PWD=$(pwd)
27c0e367 292
356dfb23 293ln -snf flixhdrs flixengine2
e9b1b01f 294export C_INCLUDE_PATH=$PWD
356dfb23 295
a5747b91 296%ifarch %{x8664}
e9b1b01f 297export LD_LIBRARY_PATH=$PWD/testing/lib64
a5747b91
ER
298ldconfig -n testing/lib64
299%else
e9b1b01f 300export LD_LIBRARY_PATH=$PWD/flixlibs
a5747b91
ER
301ldconfig -n flixlibs
302%endif
cbdbb5c8 303export LIBRARY_PATH=$LD_LIBRARY_PATH
356dfb23 304
c3871d26 305%if %{with php}
356dfb23
ER
306%{__make} -C flixphp \
307 CC="%{__cc}" \
40472a64 308 -f target.mk
c3871d26 309%endif
356dfb23 310
c3871d26 311%if %{with perl}
356dfb23
ER
312cd flixperl
313%{__perl} Makefile.PL \
314 INSTALLDIRS=vendor
315%{__make} \
316 CC="%{__cc}" \
317 OPTIMIZE="%{rpmcflags}"
318%{?with_tests:%{__make} test}
319cd ..
c3871d26 320%endif
356dfb23 321
a5747b91 322%if %{with python}
356dfb23 323cd flixpython
d01e7dbc 324%py_build
356dfb23 325cd ..
a5747b91 326%endif
356dfb23 327
a5747b91 328%if %{with java}
356dfb23
ER
329%{__make} -C flixjava \
330 CC="%{__cc}" \
331 -f target.mk
a5747b91 332%endif
356dfb23 333
27c0e367
ER
334%install
335rm -rf $RPM_BUILD_ROOT
a8e655c0 336install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig},%{_libdir}}
27c0e367 337
2cc44e6c 338./install.sh \
27c0e367
ER
339 --prefix=$RPM_BUILD_ROOT%{_prefix} \
340 --mandir=$RPM_BUILD_ROOT%{_mandir} \
977f216d 341 --mencoderbin=$RPM_BUILD_ROOT%{_bindir} \
356dfb23 342 --flixsamples=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
825446df 343 --pidfile=$RPM_BUILD_ROOT/var/run/flixd/flixd.pid \
593b9d17 344 --authdir=$RPM_BUILD_ROOT%{_sysconfdir} \
27c0e367
ER
345 --just-install \
346 --offline \
347 --yesireadtheon2license \
2cc44e6c 348 --no-compile \
356dfb23 349 --no-modules \
2cc44e6c 350 --no-init \
356dfb23
ER
351 --noprereqlibs
352
e9f4366e
ER
353rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/flixengine
354install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/flixd
355install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/flixd
3522469a 356
02d12547
ER
357# mencoder-flixengine searches for codecs from /usr/lib/win32 and there's no
358# way to override it by commandline arg or env var.
359ln -s codecs $RPM_BUILD_ROOT%{_prefix}/lib/win32
360
356dfb23 361cd .flix-engine-installation-files
d8688be2 362install lget on2_host_info $RPM_BUILD_ROOT%{_sbindir}
a5747b91 363
db2a93ff
ER
364# symlink outside package, install apidoc to read all docs
365rm -f $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/c/README-cli.html
366rm -f $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/perl/README-{cgi,cli}.html
367rm -f $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/php/README-{cgi,cli}.html
368rm -f $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/python/README-{cgi,cli}.html
369rm -f $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/java/README-cli.html
370rm -f $RPM_BUILD_ROOT%{_docdir}/on2/flixengine/javadoc
8c85be7f 371
a5747b91 372# install bindings
c3871d26 373%if %{with php}
356dfb23
ER
374%{__make} -C flixphp \
375 install \
dfab391b
ER
376 PHPINST=%{php_extensiondir} \
377 DESTDIR=$RPM_BUILD_ROOT \
356dfb23 378 -f target.mk
9d8f979c
ER
379install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
380cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/flixengine.ini
3522469a 381; Enable flixengine extension module
9609f5dc 382;extension=flixengine2.so
3522469a 383EOF
00cd1c2c 384
00cd1c2c
ER
385# per package dirs
386mv $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version}/php,php-%{name}-%{version}}
c3871d26 387%endif
356dfb23 388
c3871d26 389%if %{with perl}
356dfb23
ER
390cd flixperl
391%{__make} pure_install \
392 DESTDIR=$RPM_BUILD_ROOT
3d68873f 393rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/On2/flixengine2/.packlist
356dfb23 394cd ..
00cd1c2c
ER
395# per package dirs
396mv $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version}/perl,perl-%{name}-%{version}}
c3871d26 397%endif
356dfb23 398
a5747b91 399%if %{with python}
356dfb23 400cd flixpython
d01e7dbc 401%py_install
3d68873f 402%py_postclean
356dfb23 403cd ..
00cd1c2c
ER
404# per package dirs
405mv $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version}/python,python-%{name}-%{version}}
a5747b91 406%endif
356dfb23 407
a5747b91 408%if %{with java}
356dfb23 409%{__make} -C flixjava \
00cd1c2c 410 SOINST=$RPM_BUILD_ROOT%{_jvmlibdir} \
356dfb23
ER
411 JARINST=$RPM_BUILD_ROOT%{_javadir} \
412 install \
413 -f target.mk
27c0e367 414
00cd1c2c
ER
415# per package dirs
416mv $RPM_BUILD_ROOT%{_examplesdir}/{%{name}-%{version}/java,java-%{name}-%{version}}
a5747b91
ER
417%endif
418
00cd1c2c
ER
419mv $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}{/c/*,}
420rm -f $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/README-cli.html
421mv $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{build/linux/,}Makefile
422rmdir $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/c
423
c3871d26
ER
424%if %{without apidocs}
425rm -rf $RPM_BUILD_ROOT%{_docdir}/on2
426%endif
427
a5747b91
ER
428%ifarch %{x8664}
429cp -a testing/lib64/libflixengine2.so* $RPM_BUILD_ROOT%{_libdir}
9d124465
ER
430# flixd linked statically and other libs are 64 bit
431rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libflixengine2*.so*
a5747b91 432%endif
2cc44e6c 433
6c2e0931 434# we have already newer soname for libavformat.so in ffmpeg-libs
3f54f297 435# copy from bundled ones to private directory
00cd1c2c
ER
436install -d $RPM_BUILD_ROOT%{_libexecdir}
437install supportlibs/libavformat.so.* $RPM_BUILD_ROOT%{_libexecdir}
438install supportlibs/libavcodec.so.* $RPM_BUILD_ROOT%{_libexecdir}
439install supportlibs/libavutil.so.* $RPM_BUILD_ROOT%{_libexecdir}
440ldconfig -n $RPM_BUILD_ROOT%{_libexecdir}
9d124465 441
c3871d26 442# avoid collision from mencoder package
977f216d
ER
443mv $RPM_BUILD_ROOT%{_bindir}/mencoder{,-flixengine}
444
2cc44e6c 445# do not put hardware fingerprint to rpm package
593b9d17
ER
446> $RPM_BUILD_ROOT%{_sysconfdir}/hostinfo
447touch $RPM_BUILD_ROOT%{_sysconfdir}/flixengine.lic
825446df
ER
448install -d $RPM_BUILD_ROOT/var/run/flixd
449install -d $RPM_BUILD_ROOT/var/log
450touch $RPM_BUILD_ROOT/var/log/flixd.log
27c0e367
ER
451
452# use poldek -e
453rm -f $RPM_BUILD_ROOT%{_sbindir}/flix-engine-uninstall.sh
454
e6f8792c
ER
455# make it somewhat easier to acquire license registration
456install -d $RPM_BUILD_ROOT%{_sysconfdir}
457cat > $RPM_BUILD_ROOT%{_sysconfdir}/flixd-license.conf <<'EOF'
c3871d26 458# vim:encoding=latin1
e6f8792c
ER
459FLIX_USERNAME='<username>'
460FLIX_SERIAL='<serial>'
461EOF
462
463install -d $RPM_BUILD_ROOT%{_sbindir}
464cat > $RPM_BUILD_ROOT%{_sbindir}/flixd-license-get <<'EOF'
465#!/bin/sh
29ef4ca7
ER
466set -e
467
e6f8792c 468. %{_sysconfdir}/flixd-license.conf
29ef4ca7 469if [ -z "$FLIX_USERNAME" -o -z "$FLIX_SERIAL" ]; then
c3871d26 470 echo >&2 "$0: Please fill FLIX_USERNAME and FLIX_SERIAL!"
29ef4ca7
ER
471 exit 1
472fi
e6f8792c 473
c9b33d7a 474%{_sbindir}/lget -u "$FLIX_USERNAME" -s "$FLIX_SERIAL" -i %{_sysconfdir}/hostinfo -o %{_sysconfdir}/flixengine.lic -a 'On2FlixEngine/%{full_version} (%(uname -o))'
3f54f297 475if [ $? = 0 ]; then
3f54f297
ER
476 echo >&2 "Serial registered and saved into %{_sysconfdir}/flixengine.lic"
477 echo >&2 ""
478 echo >&2 "Run \"/sbin/service flixd start\" to start flixd"
7bda642d 479 echo >&2 ""
3f54f297
ER
480else
481 echo >&2 ""
482 echo >&2 "There was error registering your license key."
483 exit 1
484fi
e6f8792c
ER
485EOF
486
27c0e367
ER
487%clean
488rm -rf $RPM_BUILD_ROOT
489
825446df
ER
490%pre
491%groupadd -g 179 flixd
492%useradd -u 179 -g flixd -c "On2 Flixd" flixd
27c0e367 493
2cc44e6c 494%post
4e158386 495/sbin/chkconfig --add flixd
825446df
ER
496if [ ! -f /var/log/flixd.log ]; then
497 touch /var/log/flixd.log
498 chown root:flixd /var/log/flixd.log
499 chmod 660 /var/log/flixd.log
500fi
593b9d17
ER
501if [ ! -s %{_sysconfdir}/hostinfo ]; then
502 %{_sbindir}/on2_host_info > %{_sysconfdir}/hostinfo
d3d7034a 503%banner -e %{name} <<EOF
b88a126a
ER
504Put your username and serial key to %{_sysconfdir}/flixd-license.conf and invoke:
505# %{_sbindir}/flixd-license-get
c91cf73e
ER
506
507You can register evaluation demo at <http://flix.on2.com/demos/>.
d3d7034a 508EOF
2cc44e6c 509fi
4e158386 510%service flixd restart
44a0377b
ER
511
512%preun
513if [ "$1" = "0" ]; then
4e158386
ER
514 %service -q flixd stop
515 /sbin/chkconfig --del flixd
44a0377b 516fi
2cc44e6c 517
825446df
ER
518%postun
519if [ "$1" = "0" ]; then
520 %userremove flixd
521 %groupremove flixd
522fi
523
524%post libs -p /sbin/ldconfig
525%postun libs -p /sbin/ldconfig
526
00cd1c2c 527%post -n perl-%{name}
9d8f979c 528%php_webserver_restart
3522469a 529
00cd1c2c 530%postun -n perl-%{name}
3522469a 531if [ "$1" = 0 ]; then
9d8f979c 532 %php_webserver_restart
3522469a
ER
533fi
534
27c0e367
ER
535%files
536%defattr(644,root,root,755)
a5747b91 537%doc doc/*
593b9d17 538%dir %{_sysconfdir}
e6f8792c 539%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flixd-license.conf
593b9d17
ER
540%attr(640,root,flixd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostinfo
541%attr(640,root,flixd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flixengine.lic
00cd1c2c
ER
542%dir %{_libexecdir}
543%attr(755,root,root) %{_libexecdir}/libavcodec.so.*.*.*
544%attr(755,root,root) %{_libexecdir}/libavcodec.so.51
545%attr(755,root,root) %{_libexecdir}/libavformat.so.*.*.*
546%attr(755,root,root) %{_libexecdir}/libavformat.so.52
547%attr(755,root,root) %{_libexecdir}/libavutil.so.*.*.*
548%attr(755,root,root) %{_libexecdir}/libavutil.so.49
27c0e367 549%attr(755,root,root) %{_sbindir}/flixd
e6f8792c 550%attr(755,root,root) %{_sbindir}/flixd-license-get
27c0e367
ER
551%attr(755,root,root) %{_sbindir}/lget
552%attr(755,root,root) %{_sbindir}/on2_host_info
4e158386 553%attr(754,root,root) /etc/rc.d/init.d/flixd
e9f4366e 554%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/flixd
02d12547 555%{_prefix}/lib/win32
e6f8792c 556
27c0e367 557%{_mandir}/man8/flixd.8*
825446df 558%dir %attr(771,root,flixd) /var/run/flixd
1925016b 559%attr(660,root,flixd) %ghost /var/log/flixd.log
977f216d 560%attr(755,root,root) %{_bindir}/mencoder-flixengine
27c0e367
ER
561
562%files libs
563%defattr(644,root,root,755)
a5747b91 564%ifarch %{x8664}
2cc44e6c 565%attr(755,root,root) %{_libdir}/libflixengine2.so.*.*
983f6841 566%attr(755,root,root) %ghost %{_libdir}/libflixengine2.so.0
9d124465
ER
567%else
568%attr(755,root,root) %{_libdir}/libflixengine2.so.*.*
569%attr(755,root,root) %{_libdir}/libflixengine2_core.so.*.*
bccbb380
ER
570%attr(755,root,root) %ghost %{_libdir}/libflixengine2.so.0
571%attr(755,root,root) %ghost %{_libdir}/libflixengine2_core.so.0
a5747b91 572%endif
27c0e367
ER
573
574%files devel
575%defattr(644,root,root,755)
a5747b91 576%ifarch %{x8664}
356dfb23 577%attr(755,root,root) %{_libdir}/libflixengine2.so
9d124465
ER
578%else
579%attr(755,root,root) %{_libdir}/libflixengine2.so
580%attr(755,root,root) %{_libdir}/libflixengine2_core.so
a5747b91 581%endif
27c0e367 582%{_includedir}/flixengine2
00cd1c2c 583%{_examplesdir}/%{name}-%{version}
3d68873f 584
a5747b91 585%if %{with java}
00cd1c2c 586%files -n java-%{name}
3d68873f 587%defattr(644,root,root,755)
00cd1c2c 588%attr(755,root,root) %{_jvmlibdir}/libflixengine2_jni.so
3d68873f 589%{_javadir}/flixengine2.jar
00cd1c2c 590%{_examplesdir}/java-%{name}-%{version}
a5747b91 591%endif
3d68873f 592
c3871d26 593%if %{with perl}
00cd1c2c 594%files -n perl-%{name}
3d68873f
ER
595%defattr(644,root,root,755)
596%dir %{perl_vendorarch}/On2
597%{perl_vendorarch}/On2/flixengine2.pm
598%dir %{perl_vendorarch}/auto/On2
599%dir %{perl_vendorarch}/auto/On2/flixengine2
600%{perl_vendorarch}/auto/On2/flixengine2/flixengine2.bs
601%attr(755,root,root) %{perl_vendorarch}/auto/On2/flixengine2/flixengine2.so
00cd1c2c 602%{_examplesdir}/perl-%{name}-%{version}
c3871d26 603%endif
3d68873f 604
c3871d26 605%if %{with php}
00cd1c2c 606%files -n php-%{name}
3d68873f 607%defattr(644,root,root,755)
9d8f979c
ER
608%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/flixengine.ini
609%attr(755,root,root) %{php_extensiondir}/flixengine2.so
00cd1c2c
ER
610%{php_data_dir}/flixengine2.php
611%{_examplesdir}/php-%{name}-%{version}
c3871d26 612%endif
3d68873f 613
a5747b91 614%if %{with python}
00cd1c2c 615%files -n python-%{name}
3d68873f 616%defattr(644,root,root,755)
3522469a 617%attr(755,root,root) %{py_sitedir}/_flixengine2.so
00cd1c2c 618%{py_sitedir}/flixengine2.py[co]
a8e655c0
ER
619%if "%{py_ver}" > "2.4"
620%{py_sitedir}/flixengine2-*.egg-info
621%endif
00cd1c2c 622%{_examplesdir}/python-%{name}-%{version}
a5747b91 623%endif
fd1d00dc 624
c3871d26 625%if %{with apidocs}
593b9d17 626%files apidocs
fd1d00dc 627%defattr(644,root,root,755)
593b9d17 628%{_docdir}/on2
c3871d26 629%endif
This page took 0.228486 seconds and 4 git commands to generate.