%define version 4.3.10 %define rversion 0.4.2 %define realname FFMPEG %define modname ffmpeg %define dirname %{modname} %define soname %{modname}.so %define inifile A29_%{modname}.ini Summary: The %{realname} module for PHP Name: php-%{modname} Version: %{version}_%{rversion} Release: %mkrel 4 Group: System/Servers License: GPL URL: http://sourceforge.net/projects/ffmpeg-php/ Source0: %{modname}-php-%{rversion}.tar.bz2 Patch0: ffmpeg-php-0.4.2-lib64.diff.bz2 Patch1: ffmpeg-php-0.4.1-system_gd_header.diff.bz2 Requires: php432 BuildRequires: php432-devel BuildRequires: ffmpeg-devel >= 0.4.9-0.pre1.4mdk BuildRequires: gd-devel BuildRoot: %{_tmppath}/%{name}-root %description ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented API for accessing and retrieving information from movies and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP's image functions. This works well for automatically creating thumbnail images from movie files, and it's fast enough to extract thumbnails on the fly so that thumbnail images don't need to be stored. ffmpeg-php is also useful for reporting the duration and bitrate of audio files (mp3, wma...). ffmpeg-php can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...) %prep %setup -q -n %{modname}-php-%{rversion} %patch0 -p0 %patch1 -p0 %build phpize %configure2_5x \ --enable-%{modname}=shared,%{_prefix} %make mv modules/*.so . chrpath -d %{soname} %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_sysconfdir}/php.d install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/ %{__cat} > README.%{modname} <<EOF The %{rname} package contains a dynamic shared object (DSO) for PHP. To activate it, make sure a file /etc/php.d/%{inifile} is present and contains the line 'extension = %{soname}'. EOF %{__cat} > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} EOF %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc CREDITS ChangeLog EXPERIMENTAL INSTALL LICENSE README* tests %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Mon Mar 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.4.2-4mdk - use the %%mkrel macro * Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.4.2-3mdk - rebuilt against a non hardened-php aware php lib * Sun Jan 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.4.2-2mdk - nuke rpath * Sun Jan 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.4.2-1mdk - 0.4.2 - fix P0 * Sun Jan 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.4.1.1-2mdk - fix deps * Sun Jan 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.4.1.1-1mdk - 0.4.1.1 * Sat Jan 15 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.4.1-2mdk - rebuild due to hardened-php-0.2.6 - cleanups * Sat Jan 08 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.4.1-1mdk - 0.4.1 - added P1 * Tue Jan 04 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.3.7-0.alpha.2mdk - lib64 fixes (P0) * Thu Dec 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.3.7-0.alpha.1mdk - rebuild for php 4.3.10 * Thu Dec 09 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.9_0.3.7-0.alpha.1mdk - 0.3.7_alpha - better description * Sun Dec 05 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.9_0.3.6a-1mdk - initial mandrake package