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