Репозитории ALT
Последнее обновление в Сб, 06 июня 2020, 00:50:49 +0000 | Пакетов: 12913
en ru
Исходные пакеты в ветвях
свернуть окно
  • 2:3.3.4-alt0.M80P.3
  • 1:0.6-alt5.M60T.1
  • 1:0.6-alt0.svn24911.M50P.1
  • 1:0.6-alt4.M50P.1
Группа :: Видео
Исходный пакет: ffmpeg
Необработанный spec-файл

# vim: set ft=spec fdm=marker :

# {{{ Macros

%define set_disable() %{expand:%%force_disable %{1}} %{expand:%%undefine _enable_%{1}}
%define set_enable() %{expand:%%force_enable %{1}} %{expand:%%undefine _disable_%{1}}
%define subst_enable_with() %{expand:%%{?_enable_%{1}:--enable-%{2}} } %{expand:%%{?_disable_%{1}:--disable-%{2}} }
# }}}


# {{{ Enable/Disable stuff

%def_enable gpl
%def_enable version3
%def_enable libxvid
%def_enable libx264
%def_enable postproc
%def_enable libmp3lame
%def_enable libvorbis
%def_disable libfaac
%def_disable nonfree
%def_enable libgsm
%def_enable libdc1394
%def_enable shared
%def_enable static
%def_enable pthreads
%def_enable zlib
%def_disable mpegaudio_hp
%def_enable mmx
%def_disable iwmmxt
%def_disable memalign_hack
%def_enable ffserver
%def_enable ffplay
%def_disable libdirac
%def_enable libschroedinger
%def_disable avisynth
%def_disable libnut
%def_enable libtheora
%def_enable debug
%def_enable bzlib
%def_enable vdpau
%def_enable libopencore_amrwb
%def_enable libopencore_amrnb
%def_enable libvpx
%def_enable libv4l2
%def_enable librtmp

%if_disabled gpl
%set_disable libxvid
%set_disable libx264
%set_disable postproc
%endif

%if_disabled version3
%set_disable libopencore_amrwb
%set_disable libopencore_amrnb
%endif

%if_disabled nonfree
%set_disable libfaac
%endif

%if_enabled mmx
%set_verify_elf_method textrel=relaxed
%endif
# }}}


# {{{ General

Name: ffmpeg
Version: 0.6
Release: alt5.M60T.1
Epoch: 1

%define svnrev 25846

Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder (compat package)
License: %{!?_enable_gpl:L}GPL%{?_enable_version3:3}
Group: Video
Url: http://ffmpeg.mplayerhq.hu

Source0: %name-%version-%release.tar

# }}}


# {{{ BuildRequires

BuildRequires: libfreetype-devel texi2html
BuildRequires: libX11-devel libXext-devel libXvMC-devel libXfixes-devel
BuildRequires: yasm
BuildRequires: libalsa-devel
BuildRequires: libva-devel
BuildRequires: perl-podlators

%{?_enable_ffplay:BuildRequires: libSDL-devel}
%{?_enable_libmp3lame:BuildRequires: liblame-devel}
%{?_enable_libvorbis:BuildRequires: libvorbis-devel}
%{?_enable_libfaac:BuildRequires: libfaac-devel}
%{?_enable_libgsm:BuildRequires: libgsm-devel}
%{?_enable_libxvid:BuildRequires: libxvid-devel}
%{?_enable_libx264:BuildRequires: libx264-devel >= 0.0-alt54}
%{?_enable_libdc1394:BuildRequires: libdc1394-devel libraw1394-devel}
%{?_enable_libdirac:BuildRequires: libdirac-devel >= 0.9.1-alt1 libstdc++-devel gcc4.1-c++}
%{?_enable_libschroedinger:BuildRequires: libschroedinger-devel}
%{?_enable_libnut:BuildRequires: libnut-devel}
%{?_enable_libtheora:BuildRequires: libtheora-devel}
%{?_enable_bzlib:BuildRequires: bzlib-devel}
%{?_enable_vdpau:BuildRequires: libvdpau-devel}
%{?_enable_libopencore_amrwb:BuildRequires: libopencore-amrwb-devel}
%{?_enable_libopencore_amrnb:BuildRequires: libopencore-amrnb-devel}
%{?_enable_libvpx:BuildRequires: libvpx-devel}
%{?_enable_libv4l2:BuildRequires: libv4l-devel}
%{?_enable_librtmp:BuildRequires: librtmp-devel}
# }}}


# {{{ Description

%description
%name is a hyper fast realtime audio/video encoder, a streaming
server and a generic audio and video file converter.

It can grab from a standard Video4Linux video source and convert it
into several file formats based on DCT/motion compensation encoding.
Sound is compressed in MPEG audio layer 2 or using an AC3 compatible
stream.

# }}}


%package -n libffmpeg-compat
Summary: Shared libraries to run ffmpeg (compat package)
Group: System/Libraries
Provides: libavcodec52 = %epoch:%version-%release
Provides: libavformat52 = %epoch:%version-%release
Provides: libavutil50 = %epoch:%version-%release
Provides: libavdevice = %epoch:%version-%release
Provides: libavfilter = %epoch:%version-%release
Provides: libavcore = %epoch:%version-%release
Provides: libpostproc = %epoch:%version-%release
Provides: libswscale = %epoch:%version-%release
Obsoletes: libavcodec52 < %epoch:%version-%release
Obsoletes: libavformat52 < %epoch:%version-%release
Obsoletes: libavutil50 < %epoch:%version-%release
Obsoletes: libavdevice < %epoch:%version-%release
Obsoletes: libavfilter < %epoch:%version-%release
Obsoletes: libavcore < %epoch:%version-%release
Obsoletes: libpostproc < %epoch:%version-%release
Obsoletes: libswscale < %epoch:%version-%release


%description -n libffmpeg-compat
This package contains ffmpeg shared libraries (compat package).

# {{{ Prep

%prep
%setup
sed -i 's/UNKNOWN/%version/' version.sh
# }}}


# {{{ Build

%build
# we have -O3 by default with --enable-opts

%add_optflags -frename-registers
%ifarch x86_64
%add_optflags %optflags_shared
%else
%ifarch %ix86
%add_optflags %{?_enable_mmx:-DRUNTIME_CPUDETECT}
%endif
%endif
./configure \
--prefix=%_prefix \
--libdir=%_libdir \
--shlibdir=%_libdir \
--mandir=%_mandir \
%{subst_enable gpl} \
%{subst_enable postproc} \
%{subst_enable pthreads} \
%{subst_enable shared} \
%{subst_enable static} \
%{subst_enable libvorbis} \
%{subst_enable libfaac} \
%{subst_enable libxvid} \
%{subst_enable libx264} \
%{subst_enable libmp3lame} \
%{subst_enable libgsm} \
%{subst_enable libdc1394} \
%{subst_enable zlib} \
%{subst_enable_with mpegaudio_hp mpegaudio-hp} \
%{subst_enable mmx} \
%{subst_enable iwmmxt} \
%{subst_enable_with memalign_hack memalign-hack} \
%{subst_enable ffserver} \
%{subst_enable ffplay} \
%{subst_enable libdirac} \
%{subst_enable libschroedinger} \
--enable-avfilter \
%{subst_enable avisynth} \
%{subst_enable libnut} \
%{subst_enable libtheora} \
%{subst_enable version3} \
%{subst_enable_with libopencore_amrwb libopencore-amrwb} \
%{subst_enable_with libopencore_amrnb libopencore-amrnb} \
--enable-hardcoded-tables \
--enable-runtime-cpudetect \
--enable-x11grab \
--enable-bzlib \
--disable-ffprobe \
%{subst_enable libvpx} \
%{subst_enable libv4l2} \
%{subst_enable nonfree} \
%{subst_enable librtmp} \
%if_enabled debug
--enable-debug \
--disable-stripping \
%else
--disable-debug \
%endif
--extra-cflags="%optflags" \
--extra-version='%release\ \(r%svnrev\)'

%make

# }}}


# {{{ Install

%install
%make_install \
INCDIR="%buildroot%_includedir" \
DESTDIR="%buildroot" \
MANDIR="%buildroot%_mandir" install

%{?_enable_ffserver:install -pD -m640 doc/ffserver.conf %buildroot%_sysconfdir/ffserver.conf}

# compatibility for older clients..

install -d -m 0755 %buildroot%_includedir/%name
for l in codec format util; do
for f in %buildroot%_includedir/libav$l/*; do
ln -sf ../libav$l/$(basename "$f") %buildroot%_includedir/%name/
done
done

for f in %buildroot%_includedir/libswscale/*; do
ln -sf ../libswscale/$(basename "$f") %buildroot%_includedir/%name/
done

%if_enabled postproc
install -d -m 0755 %buildroot%_includedir/postproc
for f in %buildroot%_includedir/libpostproc/*; do
ln -sf ../libpostproc/$(basename "$f") %buildroot%_includedir/postproc/
ln -sf ../libpostproc/$(basename "$f") %buildroot%_includedir/%name/
done
%endif

bzip2 --best --force --keep -- Changelog

# }}}


# {{{ Files

%files

%files -n libffmpeg-compat
%_libdir/libavcodec.so.*
%_libdir/libavformat.so.*
%_libdir/libavutil.so.*
%_libdir/libavdevice.so.*
%_libdir/libavfilter.so.*
%_libdir/libavcore.so.*
%_libdir/libpostproc.so.*
%_libdir/libswscale.so.*
# }}}


# {{{ Changelog

%changelog
* Wed Dec 26 2012 Igor Vlasenko <viy at altlinux.ru> 1:0.6-alt5.M60T.1
- rebuild with libvpx

* Wed May 02 2012 Andrey Cherepanov <cas at altlinux.org> 1:0.6-alt5.M60P.2
- Add provides/obsoletes

* Mon Apr 30 2012 Andrey Cherepanov <cas at altlinux.org> 1:0.6-alt5.M60P.1
- Build compat packages for old version of ffmpeg

 
Проект Geyser основан на коде из проекта Prometheus 2.0, который был доступен по лицензии MIT