2 # TODO: doesn't pass all tests
5 %bcond_with tests # build without tests
8 Summary: Extension to manipulate movie in PHP
9 Summary(pl.UTF-8): Rozszerzenie do obróbki filmów w PHP
14 Group: Development/Languages/PHP
15 Source0: http://downloads.sourceforge.net/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
16 # Source0-md5: f779c0dbffda9dac54729d60c0e04c05
18 Patch1: avcodec_find_decoder-warn.patch
19 Patch4: ffmpeg-0.6.patch
20 Patch6: allow_persistent_on_persistentMovie.phpt.patch
21 Patch7: test_fixes.patch
22 Patch8: tests-frame_md5.patch
23 Patch9: tests-metadata-api.patch
24 Patch10: %{name}-ffmpeg08.patch
25 URL: http://ffmpeg-php.sourceforge.net/
27 BuildRequires: /usr/bin/php
28 BuildRequires: php-devel >= 4:5.3.2-5
29 BuildRequires: php-pcre
31 BuildRequires: php-devel >= 3:5.0.0
33 BuildRequires: ffmpeg-devel >= 0.7.1
35 BuildRequires: rpm >= 4.4.9-56
36 BuildRequires: rpmbuild(macros) >= 1.344
37 Requires: php(core) >= 5.0.4
39 %{?requires_php_extension}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 php-ffmpeg is an extension for PHP that adds an easy to use,
44 object-oriented API for accessing and retrieving information from
45 video and audio files. It has methods for returning frames from movie
46 files as images that can be manipulated using PHP's image functions.
47 This works well for automatically creating thumbnail images from
48 movies. ffmpeg-php is also useful for reporting the duration and
49 bitrate of audio files (mp3, wma...). ffmpeg-php can access many of
50 the video formats supported by ffmpeg (mov, avi, mpg, wmv...).
52 %description -l pl.UTF-8
53 php-ffmpeg to rozszerzenie PHP dodające łatwe w użyciu, zorientowane
54 obiektowo API pozwalające na odtwarzanie informacji z plików filmów i
55 dźwiękowych. Zawiera metody zwracające ramki filmów jako obrazy, które
56 można obrabiać funkcjami PHP. Pozwala to automatycznie tworzyć
57 miniaturki obrazów z filmów. ffmpeg-php jest przydatne także do
58 uzyskiwania informacji o czasie trwania i paśmie plików dźwiękowych
59 (mp3, wma...). ffmpeg-php pozwala na dostęp do wielu formatów filmów
60 obsługiwanych przez ffmpeg (mov, avi, mpg, wmv...).
63 %setup -q -n ffmpeg-php-0.6.0
66 %if "%{pld_release}" != "ac"
76 rm tests/getFramesBackwards.phpt
80 CPPFLAGS="%{rpmcppflags}"
85 cat <<'EOF' > run-tests.sh
88 PHP_TEST_SHARED_SYSTEM_EXTENSIONS+="gd" \
89 RUN_TESTS_SETTINGS="-q $*"
92 ./run-tests.sh -w failed.log
93 test -f failed.log -a ! -s failed.log
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
100 INSTALL_ROOT=$RPM_BUILD_ROOT \
101 EXTENSION_DIR=%{php_extensiondir}
103 # install config file
104 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
105 ; Enable %{modname} extension module
106 extension=%{modname}.so
108 ; --- options for %{modname}
109 ;ffmpeg.allow_persistent = 0
110 ;ffmpeg.show_warnings = 0
114 rm -rf $RPM_BUILD_ROOT
117 %php_webserver_restart
120 if [ "$1" = 0 ]; then
121 %php_webserver_restart
125 %defattr(644,root,root,755)
126 %doc ChangeLog CREDITS EXPERIMENTAL LICENSE TODO test_ffmpeg.php
127 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
128 %attr(755,root,root) %{php_extensiondir}/%{modname}.so