x264/x264.spec

changeset 1
4667f24fe848
parent 0
4f133201e207
equal deleted inserted replaced
0:958c213348ec 1:a6830d37eb62
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
130 91
131 %files devel 92 %files devel
132 %defattr(644, root, root, 0755) 93 %defattr(644, root, root, 0755)
133 %doc doc/* 94 %doc doc/*
134 %{_includedir}/x264.h 95 %{_includedir}/x264.h
96 %{_includedir}/x264_config.h
97 %{_libdir}/libx264.a
135 %{_libdir}/libx264.so 98 %{_libdir}/libx264.so
136 %{_libdir}/pkgconfig/%{name}.pc 99 %{_libdir}/pkgconfig/%{name}.pc
137 %ifarch i686 100 %ifarch i686
138 %{_libdir}/sse2/libx264.so 101 %{_libdir}/sse2/libx264.so
139 %endif 102 %endif
140 103
141 %changelog 104 %changelog
105 * Wed Dec 1 2010 Michael Schloh von Bennewitz <michael@schloh.com> - 4.1.3-20101201
106 - Adjust packaging and patch logic
107
142 * Mon Nov 1 2010 Kozinov Ivan <kozinov@gmail.com> 0.0.0-0.28.20100706gitd058f37 108 * Mon Nov 1 2010 Kozinov Ivan <kozinov@gmail.com> 0.0.0-0.28.20100706gitd058f37
143 - Build for MeeGo 109 - Build for MeeGo 1.1

mercurial