1 %global snapshot 20100706 |
1 Name: x264 |
2 %global git d058f37 |
2 Summary: H264/AVC video streams encoder |
3 |
3 Vendor: Europalab Software |
4 Summary: H264/AVC video streams encoder |
4 Packager: Michael Schloh von Bennewitz |
5 Name: x264 |
5 Distribution: MeeGo Thirdparty |
6 Version: 0.0.0 |
6 Version: 20101210 |
7 Release: 0.28.%{snapshot}git%{git}%{?dist} |
7 Release: 20101210 |
8 License: GPLv2+ |
8 License: GPLv2+ |
9 Group: System Environment/Libraries |
9 Group: System Environment/Libraries |
10 URL: http://developers.videolan.org/x264.html |
10 URL: http://developers.videolan.org/x264.html |
11 Source0: %{name}-%{snapshot}.tar.bz2 |
11 Source0: %{name}-%{version}.tar.bz2 |
12 Source1: x264-snapshot.sh |
12 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
13 # don't remove config.h and don't re-run version.sh |
13 Requires: %{name}-libs = %{version}-%{release} |
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 |
14 BuildRequires: yasm |
24 %endif |
|
25 Requires: %{name}-libs = %{version}-%{release} |
|
26 |
15 |
27 %description |
16 %description |
28 x264 is a free library for encoding H264/AVC video streams, written from |
17 x264 is a free library for encoding H264/AVC video streams. |
29 scratch. |
18 This package contains the frontend application. |
30 |
|
31 This package contains the frontend. |
|
32 |
19 |
33 %package libs |
20 %package libs |
34 Summary: Library for encoding H264/AVC video streams |
21 Summary: Library for encoding H264/AVC video streams |
35 Group: Development/Libraries |
22 Group: Development/Libraries |
36 |
23 |
37 %description libs |
24 %description libs |
38 x264 is a free library for encoding H264/AVC video streams, written from |
25 x264 is a free library for encoding H264/AVC video streams. |
39 scratch. |
26 This package contains runtime libraries. |
40 |
27 |
41 %package devel |
28 %package devel |
42 Summary: Development files for the x264 library |
29 Summary: Development files for the x264 library |
43 Group: Development/Libraries |
30 Group: Development/Libraries |
44 Requires: %{name}-libs = %{version}-%{release} |
31 Requires: %{name}-libs = %{version}-%{release} |
45 Requires: pkgconfig |
32 Requires: pkgconfig |
46 |
33 |
47 %description devel |
34 %description devel |
48 x264 is a free library for encoding H264/AVC video streams, written from |
35 x264 is a free library for encoding H264/AVC video streams. |
49 scratch. |
|
50 |
|
51 This package contains the development files. |
36 This package contains the development files. |
52 |
37 |
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 |
38 %prep |
69 %setup -q -n %{name}-%{snapshot} |
39 %setup -q -n %{name}-%{version} |
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 |
40 %ifarch i686 |
77 mkdir simd |
41 mkdir simd |
78 cp -a `ls -1|grep -v simd` simd/ |
42 cp -a `ls -1|grep -v simd` simd/ |
79 %endif |
43 %endif |
|
44 %{__sed} -i \ |
|
45 -e 's;\(\./version.sh\);# Dont run this: \1;g' \ |
|
46 configure |
80 |
47 |
81 %build |
48 %build |
82 %{x_configure}\ |
49 %configure \ |
83 --host=%{_target_platform} \ |
50 --enable-shared \ |
84 --libdir=%{_libdir} \ |
51 --host=%{_target_platform} \ |
85 %ifarch i686 |
52 %ifarch i686 |
86 --disable-asm \ |
53 --disable-asm \ |
87 %endif |
54 %endif |
88 |
55 --enable-visualize |
|
56 echo '#define X264_VERSION "r1820 fdcf2ae"' >>config.h |
|
57 echo '#define X264_POINTVER "0.110.1820 fdcf2ae"' >>config.h |
89 %{__make} %{?_smp_mflags} |
58 %{__make} %{?_smp_mflags} |
90 %ifarch i686 |
59 %ifarch i686 |
91 pushd simd |
60 pushd simd |
92 %{x_configure}\ |
61 %configure \ |
93 --host=%{_target_platform} \ |
62 --host=%{_target_platform} |
94 --libdir=%{_libdir}/sse2 \ |
|
95 |
|
96 %{__make} %{?_smp_mflags} |
63 %{__make} %{?_smp_mflags} |
97 popd |
64 popd |
98 %endif |
65 %endif |
99 |
66 |
100 %install |
67 %install |
101 %{__rm} -rf %{buildroot} |
68 %{__rm} -rf %{buildroot} |
102 %{__make} DESTDIR=%{buildroot} install |
69 %{__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 |
70 |
110 %clean |
71 %clean |
111 %{__rm} -rf %{buildroot} |
72 %{__rm} -rf %{buildroot} |
112 |
73 |
113 %post libs -p /sbin/ldconfig |
74 %post libs -p /sbin/ldconfig |