michael@0: %global snapshot 20100706 michael@0: %global git d058f37 michael@0: michael@0: Summary: H264/AVC video streams encoder michael@0: Name: x264 michael@0: Version: 0.0.0 michael@0: Release: 0.28.%{snapshot}git%{git}%{?dist} michael@0: License: GPLv2+ michael@0: Group: System Environment/Libraries michael@0: URL: http://developers.videolan.org/x264.html michael@0: Source0: %{name}-%{snapshot}.tar.bz2 michael@0: Source1: x264-snapshot.sh michael@0: # don't remove config.h and don't re-run version.sh michael@0: Patch0: x264-nover.patch michael@0: # link with shared libx264 michael@0: Patch1: x264-shared.patch michael@0: # don't strip if configured with --enable-debug michael@0: Patch2: x264-nostrip.patch michael@0: BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) michael@0: %{!?_without_gpac:BuildRequires: gpac-devel-static} michael@0: %{?_with_visualize:BuildRequires: libX11-devel} michael@0: %ifarch x86_64 i686 michael@0: BuildRequires: yasm michael@0: %endif michael@0: Requires: %{name}-libs = %{version}-%{release} michael@0: michael@0: %description michael@0: x264 is a free library for encoding H264/AVC video streams, written from michael@0: scratch. michael@0: michael@0: This package contains the frontend. michael@0: michael@0: %package libs michael@0: Summary: Library for encoding H264/AVC video streams michael@0: Group: Development/Libraries michael@0: michael@0: %description libs michael@0: x264 is a free library for encoding H264/AVC video streams, written from michael@0: scratch. michael@0: michael@0: %package devel michael@0: Summary: Development files for the x264 library michael@0: Group: Development/Libraries michael@0: Requires: %{name}-libs = %{version}-%{release} michael@0: Requires: pkgconfig michael@0: michael@0: %description devel michael@0: x264 is a free library for encoding H264/AVC video streams, written from michael@0: scratch. michael@0: michael@0: This package contains the development files. michael@0: michael@0: %define x_configure \ michael@0: ./configure \\\ michael@0: --prefix=%{_prefix} \\\ michael@0: --exec-prefix=%{_exec_prefix} \\\ michael@0: --bindir=%{_bindir} \\\ michael@0: --includedir=%{_includedir} \\\ michael@0: --extra-cflags="$RPM_OPT_FLAGS" \\\ michael@0: %{!?_without_gpac:--enable-mp4-output} \\\ michael@0: %{?_with_visualize:--enable-visualize} \\\ michael@0: --enable-pthread \\\ michael@0: --enable-debug \\\ michael@0: --enable-shared \\\ michael@0: --enable-pic michael@0: michael@0: michael@0: %prep michael@0: %setup -q -n %{name}-%{snapshot} michael@0: %patch0 -p1 -b .nover michael@0: %patch1 -p1 -b .shared michael@0: %patch2 -p1 -b .nostrip michael@0: # AUTHORS file is in iso-8859-1 michael@0: iconv -f iso-8859-1 -t utf-8 -o AUTHORS.utf8 AUTHORS michael@0: mv -f AUTHORS.utf8 AUTHORS michael@0: %ifarch i686 michael@0: mkdir simd michael@0: cp -a `ls -1|grep -v simd` simd/ michael@0: %endif michael@0: michael@0: %build michael@0: %{x_configure}\ michael@0: --host=%{_target_platform} \ michael@0: --libdir=%{_libdir} \ michael@0: %ifarch i686 michael@0: --disable-asm \ michael@0: %endif michael@0: michael@0: %{__make} %{?_smp_mflags} michael@0: %ifarch i686 michael@0: pushd simd michael@0: %{x_configure}\ michael@0: --host=%{_target_platform} \ michael@0: --libdir=%{_libdir}/sse2 \ michael@0: michael@0: %{__make} %{?_smp_mflags} michael@0: popd michael@0: %endif michael@0: michael@0: %install michael@0: %{__rm} -rf %{buildroot} michael@0: %{__make} DESTDIR=%{buildroot} install michael@0: %ifarch i686 michael@0: pushd simd michael@0: %{__make} DESTDIR=%{buildroot} install michael@0: rm %{buildroot}%{_libdir}/*/pkgconfig/x264.pc michael@0: popd michael@0: %endif michael@0: michael@0: %clean michael@0: %{__rm} -rf %{buildroot} michael@0: michael@0: %post libs -p /sbin/ldconfig michael@0: michael@0: %postun libs -p /sbin/ldconfig michael@0: michael@0: %files michael@0: %defattr(644, root, root, 0755) michael@0: %doc AUTHORS COPYING michael@0: %attr(755,root,root) %{_bindir}/x264 michael@0: michael@0: %files libs michael@0: %defattr(644, root, root, 0755) michael@0: %{_libdir}/libx264.so.* michael@0: %ifarch i686 michael@0: %{_libdir}/sse2/libx264.so.* michael@0: %exclude %{_libdir}/sse2/libx264.a michael@0: %endif michael@0: %exclude %{_libdir}/libx264.a michael@0: michael@0: %files devel michael@0: %defattr(644, root, root, 0755) michael@0: %doc doc/* michael@0: %{_includedir}/x264.h michael@0: %{_libdir}/libx264.so michael@0: %{_libdir}/pkgconfig/%{name}.pc michael@0: %ifarch i686 michael@0: %{_libdir}/sse2/libx264.so michael@0: %endif michael@0: michael@0: %changelog michael@0: * Mon Nov 1 2010 Kozinov Ivan 0.0.0-0.28.20100706gitd058f37 michael@0: - Build for MeeGo