]>
Commit | Line | Data |
---|---|---|
deef52dc JB |
1 | # |
2 | # Conditional build: | |
be9a44e2 | 3 | %bcond_with bootstrap # no ffmpeg/gpac support in x264 utility |
c010e225 ER |
4 | %bcond_without asm # disable asm |
5 | ||
b841a03e | 6 | %ifnarch %{ix86} %{x8664} |
c010e225 ER |
7 | %undefine with_asm |
8 | %endif | |
460a5dbe | 9 | |
341b5ae1 | 10 | %define rel 8 |
46529d02 | 11 | %define snap 20140824 |
1eadea1c | 12 | %define snaph 2245 |
65b73f48 | 13 | Summary: H264 encoder library |
23647862 | 14 | Summary(pl.UTF-8): Biblioteka kodująca H264 |
65b73f48 | 15 | Name: libx264 |
bb560be3 | 16 | Version: 0.1.3 |
4663db6e | 17 | Release: 1.%{snap}_%{snaph}.%{rel} |
76f3f357 | 18 | License: GPL v2+ |
65b73f48 | 19 | Group: Libraries |
deef52dc | 20 | # still no releases, use snapshots |
aedfa898 | 21 | Source0: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-%{snap}-%{snaph}.tar.bz2 |
46529d02 | 22 | # Source0-md5: d2a779a864254ca426dfb1f3115987a0 |
2741dce2 | 23 | Patch0: %{name}-alpha.patch |
deef52dc | 24 | Patch1: altivec-no-vand.patch |
d6b08ec3 | 25 | Patch2: %{name}-gpac.patch |
cb936077 | 26 | Patch3: x32.patch |
a63308fe | 27 | Patch4: ffmpeg3.patch |
f33b600a | 28 | URL: http://www.videolan.org/developers/x264.html |
bad36153 | 29 | BuildRequires: pkgconfig |
c010e225 | 30 | %{?with_asm:BuildRequires: yasm >= 1.2.0} |
deef52dc JB |
31 | %if %{without bootstrap} |
32 | # which version exactly??? | |
33 | # for full x264 CLI utility functionality it wants: | |
34 | # libswscale >= 0.9.0 (in pkgconfig file) | |
35 | # libav{format,codec,util} from ffmpeg >= r21854 | |
8723c613 | 36 | BuildRequires: ffmpeg-devel >= 0.7.1 |
848da209 | 37 | BuildRequires: ffmpegsource-devel >= 2.16 |
deef52dc | 38 | # gpac >= 2007-06-21 |
199c0c26 | 39 | BuildRequires: gpac-devel >= 0.5.0-3 |
deef52dc | 40 | %endif |
65b73f48 JB |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
42 | ||
7cf55bee PS |
43 | # encoder/macroblock.c breaks strict-aliasing rules |
44 | %define specflags -fno-strict-aliasing | |
45 | ||
65b73f48 JB |
46 | %description |
47 | libx264 library for encoding H264 video format. | |
48 | ||
3d6bd83a | 49 | %description -l pl.UTF-8 |
65b73f48 JB |
50 | Biblioteka libx264 do kodowania w formacie obrazu H264. |
51 | ||
52 | %package devel | |
53 | Summary: Header files for x264 library | |
23647862 | 54 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x264 |
65b73f48 JB |
55 | Group: Development/Libraries |
56 | Requires: %{name} = %{version}-%{release} | |
57 | ||
58 | %description devel | |
59 | Header files for x264 library. | |
60 | ||
3d6bd83a JR |
61 | %description devel -l pl.UTF-8 |
62 | Pliki nagłówkowe biblioteki x264. | |
65b73f48 JB |
63 | |
64 | %package static | |
65 | Summary: Static x264 library | |
23647862 | 66 | Summary(pl.UTF-8): Statyczna biblioteka x264 |
65b73f48 JB |
67 | Group: Development/Libraries |
68 | Requires: %{name}-devel = %{version}-%{release} | |
69 | ||
70 | %description static | |
71 | Static x264 library. | |
72 | ||
3d6bd83a | 73 | %description static -l pl.UTF-8 |
65b73f48 JB |
74 | Statyczna biblioteka x264. |
75 | ||
deef52dc JB |
76 | %package -n x264 |
77 | Summary: x264 CLI decoder | |
78 | Summary(pl.UTF-8): Dekoder x264 działający z linii poleceń | |
79 | Group: Applications/Multimedia | |
80 | Requires: %{name} = %{version}-%{release} | |
c6f8df1a JB |
81 | %if %{without bootstrap} |
82 | Requires: gpac >= 0.5.0-3 | |
83 | %endif | |
deef52dc JB |
84 | |
85 | %description -n x264 | |
86 | x264 CLI decoder. | |
87 | ||
88 | %description -n x264 -l pl.UTF-8 | |
89 | Dekoder x264 działający z linii poleceń. | |
90 | ||
65b73f48 | 91 | %prep |
aedfa898 | 92 | %setup -q -n x264-snapshot-%{snap}-%{snaph} |
2741dce2 | 93 | %patch0 -p1 |
deef52dc | 94 | %if "%{pld_release}" == "ac" |
3b7e662c | 95 | %patch1 -p1 |
deef52dc | 96 | %endif |
d6b08ec3 | 97 | %patch2 -p1 |
cb936077 | 98 | %patch3 -p1 |
a63308fe | 99 | %patch4 -p1 |
65b73f48 JB |
100 | |
101 | %build | |
704304fd | 102 | CC="%{__cc}" \ |
7cf55bee | 103 | ./configure \ |
b841a03e | 104 | --host=%{_target_platform} \ |
219e4f34 PS |
105 | --prefix=%{_prefix} \ |
106 | --exec-prefix=%{_prefix} \ | |
107 | --bindir=%{_bindir} \ | |
108 | --includedir=%{_includedir} \ | |
109 | --libdir=%{_libdir} \ | |
7cf55bee | 110 | --extra-cflags="%{rpmcflags}" \ |
c010e225 | 111 | %{!?with_asm:--disable-asm} \ |
bad36153 | 112 | --enable-pic \ |
c8829b2a JB |
113 | --enable-shared \ |
114 | --enable-static | |
7cf55bee | 115 | |
65b73f48 JB |
116 | %{__make} |
117 | ||
118 | %install | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %{__make} install \ | |
122 | DESTDIR=$RPM_BUILD_ROOT | |
123 | ||
124 | %clean | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %post -p /sbin/ldconfig | |
128 | %postun -p /sbin/ldconfig | |
129 | ||
130 | %files | |
131 | %defattr(644,root,root,755) | |
247a0e4f | 132 | %doc AUTHORS |
748e5138 | 133 | %attr(755,root,root) %{_libdir}/libx264.so.142 |
65b73f48 JB |
134 | |
135 | %files devel | |
136 | %defattr(644,root,root,755) | |
137 | %attr(755,root,root) %{_libdir}/libx264.so | |
65b73f48 | 138 | %{_includedir}/x264.h |
ac54585f | 139 | %{_includedir}/x264_config.h |
247a0e4f | 140 | %{_pkgconfigdir}/x264.pc |
65b73f48 JB |
141 | |
142 | %files static | |
143 | %defattr(644,root,root,755) | |
144 | %{_libdir}/libx264.a | |
deef52dc JB |
145 | |
146 | %files -n x264 | |
147 | %defattr(644,root,root,755) | |
148 | %attr(755,root,root) %{_bindir}/x264 |