%define name php5-ffmpeg %define version 5.0.3 %define rversion 0.4.2 %define modname ffmpeg %define dirname %{modname} %define soname %{modname}.so %define inifile A30_%{modname}.ini Summary: The %{realname} module for PHP Name: %{name} Version: %{version}_%{rversion} Release: %mkrel 5 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 BuildRequires: php5-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 php5ize %configure2_5x \ --enable-%{modname}=shared,%{_prefix} %make mv modules/*.so . chrpath -d %{soname} %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/php5/extensions install -d %{buildroot}%{_sysconfdir}/php5.d install -m755 %{soname} %{buildroot}%{_libdir}/php5/extensions/ %{__cat} > %{buildroot}%{_sysconfdir}/php5.d/%{inifile} << EOF extension = %{soname} EOF %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc CREDITS ChangeLog EXPERIMENTAL INSTALL LICENSE README tests %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/php5.d/%{inifile} %attr(0755,root,root) %{_libdir}/php5/extensions/%{soname} %changelog * Mon Apr 04 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.4.2-5mdk - reworked the lib64 patch (P0) * Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.4.2-4mdk - use the %%mkrel macro * Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.4.2-3mdk - rebuilt against a non hardened-php aware php lib * Sun Jan 30 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.4.2-2mdk - nuke rpath * Sun Jan 30 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.4.2-1mdk - 0.4.2 - fix P0 * Sun Jan 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.4.1.1-2mdk - fix deps * Sun Jan 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.4.1.1-1mdk - 0.4.1.1 - added P1 - lib64 fixes (P0) * Fri Dec 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.3.7-0.alpha.1mdk - rebuilt for php-5.0.3 * Thu Dec 09 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.2_0.3.7-0.alpha.1mdk - initial mandrake package