x264/x264.spec

changeset 0
4f133201e207
child 1
4667f24fe848
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/x264/x264.spec	Fri Mar 11 21:30:26 2011 +0100
     1.3 @@ -0,0 +1,143 @@
     1.4 +%global snapshot 20100706
     1.5 +%global git d058f37
     1.6 +
     1.7 +Summary: H264/AVC video streams encoder
     1.8 +Name: x264
     1.9 +Version: 0.0.0
    1.10 +Release: 0.28.%{snapshot}git%{git}%{?dist}
    1.11 +License: GPLv2+
    1.12 +Group: System Environment/Libraries
    1.13 +URL: http://developers.videolan.org/x264.html
    1.14 +Source0: %{name}-%{snapshot}.tar.bz2
    1.15 +Source1: x264-snapshot.sh
    1.16 +# don't remove config.h and don't re-run version.sh
    1.17 +Patch0: x264-nover.patch
    1.18 +# link with shared libx264
    1.19 +Patch1: x264-shared.patch
    1.20 +# don't strip if configured with --enable-debug
    1.21 +Patch2: x264-nostrip.patch
    1.22 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
    1.23 +%{!?_without_gpac:BuildRequires: gpac-devel-static}
    1.24 +%{?_with_visualize:BuildRequires: libX11-devel}
    1.25 +%ifarch x86_64 i686
    1.26 +BuildRequires: yasm
    1.27 +%endif
    1.28 +Requires: %{name}-libs = %{version}-%{release}
    1.29 +
    1.30 +%description
    1.31 +x264 is a free library for encoding H264/AVC video streams, written from
    1.32 +scratch.
    1.33 +
    1.34 +This package contains the frontend.
    1.35 +
    1.36 +%package libs
    1.37 +Summary: Library for encoding H264/AVC video streams
    1.38 +Group: Development/Libraries
    1.39 +
    1.40 +%description libs
    1.41 +x264 is a free library for encoding H264/AVC video streams, written from
    1.42 +scratch.
    1.43 +
    1.44 +%package devel
    1.45 +Summary: Development files for the x264 library
    1.46 +Group: Development/Libraries
    1.47 +Requires: %{name}-libs = %{version}-%{release}
    1.48 +Requires: pkgconfig
    1.49 +
    1.50 +%description devel
    1.51 +x264 is a free library for encoding H264/AVC video streams, written from
    1.52 +scratch.
    1.53 +
    1.54 +This package contains the development files.
    1.55 +
    1.56 +%define x_configure \
    1.57 +./configure \\\
    1.58 +	--prefix=%{_prefix} \\\
    1.59 +	--exec-prefix=%{_exec_prefix} \\\
    1.60 +	--bindir=%{_bindir} \\\
    1.61 +	--includedir=%{_includedir} \\\
    1.62 +	--extra-cflags="$RPM_OPT_FLAGS" \\\
    1.63 +	%{!?_without_gpac:--enable-mp4-output} \\\
    1.64 +	%{?_with_visualize:--enable-visualize} \\\
    1.65 +	--enable-pthread \\\
    1.66 +	--enable-debug \\\
    1.67 +	--enable-shared \\\
    1.68 +	--enable-pic
    1.69 +
    1.70 +
    1.71 +%prep
    1.72 +%setup -q -n %{name}-%{snapshot}
    1.73 +%patch0 -p1 -b .nover
    1.74 +%patch1 -p1 -b .shared
    1.75 +%patch2 -p1 -b .nostrip
    1.76 +# AUTHORS file is in iso-8859-1
    1.77 +iconv -f iso-8859-1 -t utf-8 -o AUTHORS.utf8 AUTHORS
    1.78 +mv -f AUTHORS.utf8 AUTHORS
    1.79 +%ifarch i686
    1.80 +mkdir simd
    1.81 +cp -a `ls -1|grep -v simd` simd/
    1.82 +%endif
    1.83 +
    1.84 +%build
    1.85 +%{x_configure}\
    1.86 +	--host=%{_target_platform} \
    1.87 +	--libdir=%{_libdir} \
    1.88 +%ifarch i686
    1.89 +	--disable-asm \
    1.90 +%endif
    1.91 +
    1.92 +%{__make} %{?_smp_mflags}
    1.93 +%ifarch i686
    1.94 +pushd simd
    1.95 +%{x_configure}\
    1.96 +	--host=%{_target_platform} \
    1.97 +	--libdir=%{_libdir}/sse2 \
    1.98 +
    1.99 +%{__make} %{?_smp_mflags}
   1.100 +popd
   1.101 +%endif
   1.102 +
   1.103 +%install
   1.104 +%{__rm} -rf %{buildroot}
   1.105 +%{__make} DESTDIR=%{buildroot} install
   1.106 +%ifarch i686
   1.107 +pushd simd
   1.108 +%{__make} DESTDIR=%{buildroot} install
   1.109 +rm %{buildroot}%{_libdir}/*/pkgconfig/x264.pc
   1.110 +popd
   1.111 +%endif
   1.112 +
   1.113 +%clean
   1.114 +%{__rm} -rf %{buildroot}
   1.115 +
   1.116 +%post libs -p /sbin/ldconfig
   1.117 +
   1.118 +%postun libs -p /sbin/ldconfig
   1.119 +
   1.120 +%files
   1.121 +%defattr(644, root, root, 0755)
   1.122 +%doc AUTHORS COPYING
   1.123 +%attr(755,root,root) %{_bindir}/x264
   1.124 +
   1.125 +%files libs
   1.126 +%defattr(644, root, root, 0755)
   1.127 +%{_libdir}/libx264.so.*
   1.128 +%ifarch i686
   1.129 +%{_libdir}/sse2/libx264.so.*
   1.130 +%exclude %{_libdir}/sse2/libx264.a
   1.131 +%endif
   1.132 +%exclude %{_libdir}/libx264.a
   1.133 +
   1.134 +%files devel
   1.135 +%defattr(644, root, root, 0755)
   1.136 +%doc doc/*
   1.137 +%{_includedir}/x264.h
   1.138 +%{_libdir}/libx264.so
   1.139 +%{_libdir}/pkgconfig/%{name}.pc
   1.140 +%ifarch i686
   1.141 +%{_libdir}/sse2/libx264.so
   1.142 +%endif
   1.143 +
   1.144 +%changelog
   1.145 +* Mon Nov 1 2010 Kozinov Ivan <kozinov@gmail.com> 0.0.0-0.28.20100706gitd058f37
   1.146 +- Build for MeeGo

mercurial