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