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