x264/x264.spec

Fri, 11 Mar 2011 21:30:26 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 11 Mar 2011 21:30:26 +0100
changeset 0
4f133201e207
child 1
4667f24fe848
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

michael@0 1 %global snapshot 20100706
michael@0 2 %global git d058f37
michael@0 3
michael@0 4 Summary: H264/AVC video streams encoder
michael@0 5 Name: x264
michael@0 6 Version: 0.0.0
michael@0 7 Release: 0.28.%{snapshot}git%{git}%{?dist}
michael@0 8 License: GPLv2+
michael@0 9 Group: System Environment/Libraries
michael@0 10 URL: http://developers.videolan.org/x264.html
michael@0 11 Source0: %{name}-%{snapshot}.tar.bz2
michael@0 12 Source1: x264-snapshot.sh
michael@0 13 # don't remove config.h and don't re-run version.sh
michael@0 14 Patch0: x264-nover.patch
michael@0 15 # link with shared libx264
michael@0 16 Patch1: x264-shared.patch
michael@0 17 # don't strip if configured with --enable-debug
michael@0 18 Patch2: x264-nostrip.patch
michael@0 19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
michael@0 20 %{!?_without_gpac:BuildRequires: gpac-devel-static}
michael@0 21 %{?_with_visualize:BuildRequires: libX11-devel}
michael@0 22 %ifarch x86_64 i686
michael@0 23 BuildRequires: yasm
michael@0 24 %endif
michael@0 25 Requires: %{name}-libs = %{version}-%{release}
michael@0 26
michael@0 27 %description
michael@0 28 x264 is a free library for encoding H264/AVC video streams, written from
michael@0 29 scratch.
michael@0 30
michael@0 31 This package contains the frontend.
michael@0 32
michael@0 33 %package libs
michael@0 34 Summary: Library for encoding H264/AVC video streams
michael@0 35 Group: Development/Libraries
michael@0 36
michael@0 37 %description libs
michael@0 38 x264 is a free library for encoding H264/AVC video streams, written from
michael@0 39 scratch.
michael@0 40
michael@0 41 %package devel
michael@0 42 Summary: Development files for the x264 library
michael@0 43 Group: Development/Libraries
michael@0 44 Requires: %{name}-libs = %{version}-%{release}
michael@0 45 Requires: pkgconfig
michael@0 46
michael@0 47 %description devel
michael@0 48 x264 is a free library for encoding H264/AVC video streams, written from
michael@0 49 scratch.
michael@0 50
michael@0 51 This package contains the development files.
michael@0 52
michael@0 53 %define x_configure \
michael@0 54 ./configure \\\
michael@0 55 --prefix=%{_prefix} \\\
michael@0 56 --exec-prefix=%{_exec_prefix} \\\
michael@0 57 --bindir=%{_bindir} \\\
michael@0 58 --includedir=%{_includedir} \\\
michael@0 59 --extra-cflags="$RPM_OPT_FLAGS" \\\
michael@0 60 %{!?_without_gpac:--enable-mp4-output} \\\
michael@0 61 %{?_with_visualize:--enable-visualize} \\\
michael@0 62 --enable-pthread \\\
michael@0 63 --enable-debug \\\
michael@0 64 --enable-shared \\\
michael@0 65 --enable-pic
michael@0 66
michael@0 67
michael@0 68 %prep
michael@0 69 %setup -q -n %{name}-%{snapshot}
michael@0 70 %patch0 -p1 -b .nover
michael@0 71 %patch1 -p1 -b .shared
michael@0 72 %patch2 -p1 -b .nostrip
michael@0 73 # AUTHORS file is in iso-8859-1
michael@0 74 iconv -f iso-8859-1 -t utf-8 -o AUTHORS.utf8 AUTHORS
michael@0 75 mv -f AUTHORS.utf8 AUTHORS
michael@0 76 %ifarch i686
michael@0 77 mkdir simd
michael@0 78 cp -a `ls -1|grep -v simd` simd/
michael@0 79 %endif
michael@0 80
michael@0 81 %build
michael@0 82 %{x_configure}\
michael@0 83 --host=%{_target_platform} \
michael@0 84 --libdir=%{_libdir} \
michael@0 85 %ifarch i686
michael@0 86 --disable-asm \
michael@0 87 %endif
michael@0 88
michael@0 89 %{__make} %{?_smp_mflags}
michael@0 90 %ifarch i686
michael@0 91 pushd simd
michael@0 92 %{x_configure}\
michael@0 93 --host=%{_target_platform} \
michael@0 94 --libdir=%{_libdir}/sse2 \
michael@0 95
michael@0 96 %{__make} %{?_smp_mflags}
michael@0 97 popd
michael@0 98 %endif
michael@0 99
michael@0 100 %install
michael@0 101 %{__rm} -rf %{buildroot}
michael@0 102 %{__make} DESTDIR=%{buildroot} install
michael@0 103 %ifarch i686
michael@0 104 pushd simd
michael@0 105 %{__make} DESTDIR=%{buildroot} install
michael@0 106 rm %{buildroot}%{_libdir}/*/pkgconfig/x264.pc
michael@0 107 popd
michael@0 108 %endif
michael@0 109
michael@0 110 %clean
michael@0 111 %{__rm} -rf %{buildroot}
michael@0 112
michael@0 113 %post libs -p /sbin/ldconfig
michael@0 114
michael@0 115 %postun libs -p /sbin/ldconfig
michael@0 116
michael@0 117 %files
michael@0 118 %defattr(644, root, root, 0755)
michael@0 119 %doc AUTHORS COPYING
michael@0 120 %attr(755,root,root) %{_bindir}/x264
michael@0 121
michael@0 122 %files libs
michael@0 123 %defattr(644, root, root, 0755)
michael@0 124 %{_libdir}/libx264.so.*
michael@0 125 %ifarch i686
michael@0 126 %{_libdir}/sse2/libx264.so.*
michael@0 127 %exclude %{_libdir}/sse2/libx264.a
michael@0 128 %endif
michael@0 129 %exclude %{_libdir}/libx264.a
michael@0 130
michael@0 131 %files devel
michael@0 132 %defattr(644, root, root, 0755)
michael@0 133 %doc doc/*
michael@0 134 %{_includedir}/x264.h
michael@0 135 %{_libdir}/libx264.so
michael@0 136 %{_libdir}/pkgconfig/%{name}.pc
michael@0 137 %ifarch i686
michael@0 138 %{_libdir}/sse2/libx264.so
michael@0 139 %endif
michael@0 140
michael@0 141 %changelog
michael@0 142 * Mon Nov 1 2010 Kozinov Ivan <kozinov@gmail.com> 0.0.0-0.28.20100706gitd058f37
michael@0 143 - Build for MeeGo

mercurial