ALT Linux repos
5.0: | 5.2.7.20080920-alt1 |
4.1: | 5.2.5-alt1.M41.1 |
4.0: | 5.2.2-alt1.M40.2 |
+backports: | 5.2.2-alt1.M40.1 |
Group :: System/Servers
RPM: php5-ffmpeg
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%define php5_extension ffmpeg
%define real_name ffmpeg-php
%define real_version 0.5.3.1
Name: php5-%php5_extension
Version: %php5_version
Release: %php5_release.M40.2
Summary: PHP5 ffmpeg-php extension
License: %gpl2plus
Group: System/Servers
URL: http://ffmpeg-php.sourceforge.net/
Packager: Nikolay A. Fetisov <naf at altlinux.ru>
Source0: %real_name-%real_version.tar.bz2
Source1: php-%php5_extension.ini
Source2: php-%php5_extension-params.sh
BuildRequires(pre): rpm-build-php5 rpm-build-licenses
BuildRequires: php5-devel = %php5_version-%php5_release
BuildRequires: gcc-c++ ffmpeg-devel
Requires: php5-gd2
%description
ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented
API for accessing and retrieving information from video 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 movies.
ffmpeg-php is also useful for reporting the duration and bitrate of audio
files (mp3, wma...). It can access many of the video formats supported by
ffmpeg (mov, avi, mpg, wmv...)
%prep
%setup -T -c
tar xvfj %SOURCE0
# ./ffmpeg-php-X.X.X -> ./
mv -- %real_name-%real_version/* .
rm -fr -- %real_name-%{real_version}*
mv -f -- LICENSE LICENSE.orig
ln -s -- $(relative %_licensedir/GPL-2 %_docdir/%name/LICENSE) LICENSE
# Fix pathes for build on x86_64
%__subst 's at /lib/libavcodec.so at /%_lib/libavcodec.so at ' config.m4
%__subst 's at =$i/lib at =$i/%_lib at ' config.m4
%build
phpize
BUILD_HAVE=`echo %php5_extension | tr '[:lower:]-' '[:upper:]_'`
%add_optflags -fPIC -L%_libdir
export LDFLAGS=-lphp-%_php5_version
%configure \
--with-%php5_extension \
--with-libdir=%_lib \
--enable-skip-gd-check \
#
%php5_make
%install
%php5_make_install
install -D -m 644 -- %SOURCE1 %buildroot/%php5_extconf/%php5_extension/config
install -D -m 644 -- %SOURCE2 %buildroot/%php5_extconf/%php5_extension/params
%files
%doc CREDITS ChangeLog EXPERIMENTAL TODO INSTALL
%doc --no-dereference LICENSE
%php5_extconf/%php5_extension
%php5_extdir/*
%post
%php5_extension_postin
%preun
%php5_extension_preun
%changelog
…
Full changelog you can see here
%define real_name ffmpeg-php
%define real_version 0.5.3.1
Name: php5-%php5_extension
Version: %php5_version
Release: %php5_release.M40.2
Summary: PHP5 ffmpeg-php extension
License: %gpl2plus
Group: System/Servers
URL: http://ffmpeg-php.sourceforge.net/
Packager: Nikolay A. Fetisov <naf at altlinux.ru>
Source0: %real_name-%real_version.tar.bz2
Source1: php-%php5_extension.ini
Source2: php-%php5_extension-params.sh
BuildRequires(pre): rpm-build-php5 rpm-build-licenses
BuildRequires: php5-devel = %php5_version-%php5_release
BuildRequires: gcc-c++ ffmpeg-devel
Requires: php5-gd2
%description
ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented
API for accessing and retrieving information from video 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 movies.
ffmpeg-php is also useful for reporting the duration and bitrate of audio
files (mp3, wma...). It can access many of the video formats supported by
ffmpeg (mov, avi, mpg, wmv...)
%prep
%setup -T -c
tar xvfj %SOURCE0
# ./ffmpeg-php-X.X.X -> ./
mv -- %real_name-%real_version/* .
rm -fr -- %real_name-%{real_version}*
mv -f -- LICENSE LICENSE.orig
ln -s -- $(relative %_licensedir/GPL-2 %_docdir/%name/LICENSE) LICENSE
# Fix pathes for build on x86_64
%__subst 's at /lib/libavcodec.so at /%_lib/libavcodec.so at ' config.m4
%__subst 's at =$i/lib at =$i/%_lib at ' config.m4
%build
phpize
BUILD_HAVE=`echo %php5_extension | tr '[:lower:]-' '[:upper:]_'`
%add_optflags -fPIC -L%_libdir
export LDFLAGS=-lphp-%_php5_version
%configure \
--with-%php5_extension \
--with-libdir=%_lib \
--enable-skip-gd-check \
#
%php5_make
%install
%php5_make_install
install -D -m 644 -- %SOURCE1 %buildroot/%php5_extconf/%php5_extension/config
install -D -m 644 -- %SOURCE2 %buildroot/%php5_extconf/%php5_extension/params
%files
%doc CREDITS ChangeLog EXPERIMENTAL TODO INSTALL
%doc --no-dereference LICENSE
%php5_extconf/%php5_extension
%php5_extdir/*
%post
%php5_extension_postin
%preun
%php5_extension_preun
%changelog
…
Full changelog you can see here