3 %bcond_with bootstrap # no ffmpeg/gpac support in x264 utility
4 %bcond_without asm # disable asm
5 %bcond_without lsmash # lsmash for MP4 (preferred over gpac)
7 %ifnarch %{ix86} %{x8664} aarch64
14 Summary: H264 encoder library
15 Summary(pl.UTF-8): Biblioteka kodująca H264
18 Release: 1.%{snap}_%{snaph}.%{rel}
21 # still no releases, use snapshots
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
25 Patch0: %{name}-alpha.patch
26 Patch1: altivec-no-vand.patch
27 Patch2: %{name}-gpac.patch
29 URL: http://www.videolan.org/developers/x264.html
30 %ifarch %{ix86} %{x8664}
31 %{?with_asm:BuildRequires: nasm >= 2.13}
33 BuildRequires: pkgconfig
34 %if %{without bootstrap}
35 # which version exactly???
36 # for full x264 CLI utility functionality it wants:
37 # libswscale >= 0.9.0 (in pkgconfig file)
38 # libav{format,codec,util} from ffmpeg >= r21854
39 BuildRequires: ffmpeg-devel >= 0.7.1
40 BuildRequires: ffms2-devel >= 2.21
42 %{!?with_lsmash:BuildRequires: gpac-devel >= 0.5.0-3}
43 %{?with_lsmash:BuildRequires: l-smash-devel >= 1.5}
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 # encoder/macroblock.c breaks strict-aliasing rules
48 %define specflags -fno-strict-aliasing
51 libx264 library for encoding H264 video format.
53 %description -l pl.UTF-8
54 Biblioteka libx264 do kodowania w formacie obrazu H264.
57 Summary: Header files for x264 library
58 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x264
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
63 Header files for x264 library.
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe biblioteki x264.
69 Summary: Static x264 library
70 Summary(pl.UTF-8): Statyczna biblioteka x264
71 Group: Development/Libraries
72 Requires: %{name}-devel = %{version}-%{release}
77 %description static -l pl.UTF-8
78 Statyczna biblioteka x264.
81 Summary: x264 CLI decoder
82 Summary(pl.UTF-8): Dekoder x264 działający z linii poleceń
83 Group: Applications/Multimedia
84 Requires: %{name} = %{version}-%{release}
85 %if %{without bootstrap}
86 Requires: ffms2 >= 2.21
88 Requires: l-smash >= 1.5
90 Requires: gpac >= 0.5.0-3
97 %description -n x264 -l pl.UTF-8
98 Dekoder x264 działający z linii poleceń.
101 %setup -q -n x264-snapshot-%{snap}-%{snaph}
103 %if "%{pld_release}" == "ac"
112 --host=%{_target_platform} \
113 --prefix=%{_prefix} \
114 --exec-prefix=%{_prefix} \
115 --bindir=%{_bindir} \
116 --includedir=%{_includedir} \
117 --libdir=%{_libdir} \
118 --extra-cflags="%{rpmcflags}" \
119 %{!?with_asm:--disable-asm} \
127 rm -rf $RPM_BUILD_ROOT
130 DESTDIR=$RPM_BUILD_ROOT
133 rm -rf $RPM_BUILD_ROOT
135 %post -p /sbin/ldconfig
136 %postun -p /sbin/ldconfig
139 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_libdir}/libx264.so.157
144 %defattr(644,root,root,755)
145 %attr(755,root,root) %{_libdir}/libx264.so
146 %{_includedir}/x264.h
147 %{_includedir}/x264_config.h
148 %{_pkgconfigdir}/x264.pc
151 %defattr(644,root,root,755)
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_bindir}/x264