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
11 %define gitref 12426f5f4906e34d483a07da0debb6d56c6f8434
15 Summary: H264 encoder library
16 Summary(pl.UTF-8): Biblioteka kodująca H264
19 Release: 0.%{snap}.%{rel}
22 # still no releases, use snapshots
23 # previously available at https://download.videolan.org/videolan/x264/snapshots/
24 # for further changes see: https://code.videolan.org/videolan/x264/
25 Source0: https://code.videolan.org/videolan/x264/-/archive/%{gitref}/x264-%{gitref}.tar.bz2
26 # Source0-md5: b46bb3b0521e2d5fdefeed345bd42f94
27 Patch0: %{name}-alpha.patch
28 Patch1: %{name}-gpac.patch
30 URL: http://www.videolan.org/developers/x264.html
31 %ifarch %{ix86} %{x8664}
32 %{?with_asm:BuildRequires: nasm >= 2.13}
34 BuildRequires: pkgconfig
35 BuildRequires: rpmbuild(macros) >= 1.673
36 %if %{without bootstrap}
37 # which version exactly???
38 # for full x264 CLI utility functionality it wants:
39 # libswscale >= 0.9.0 (in pkgconfig file)
40 # libav{format,codec,util} from ffmpeg >= r21854
41 BuildRequires: ffmpeg-devel >= 0.7.1
42 BuildRequires: ffms2-devel >= 2.21
44 %{!?with_lsmash:BuildRequires: gpac-devel >= 0.8.0}
45 %{?with_lsmash:BuildRequires: l-smash-devel >= 1.5}
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 # encoder/macroblock.c breaks strict-aliasing rules
50 %define specflags -fno-strict-aliasing
53 libx264 library for encoding H264 video format.
55 %description -l pl.UTF-8
56 Biblioteka libx264 do kodowania w formacie obrazu H264.
59 Summary: Header files for x264 library
60 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x264
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
65 Header files for x264 library.
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe biblioteki x264.
71 Summary: Static x264 library
72 Summary(pl.UTF-8): Statyczna biblioteka x264
73 Group: Development/Libraries
74 Requires: %{name}-devel = %{version}-%{release}
79 %description static -l pl.UTF-8
80 Statyczna biblioteka x264.
83 Summary: x264 CLI decoder
84 Summary(pl.UTF-8): Dekoder x264 działający z linii poleceń
85 Group: Applications/Multimedia
86 Requires: %{name} = %{version}-%{release}
87 %if %{without bootstrap}
88 Requires: ffms2 >= 2.21
90 Requires: l-smash >= 1.5
92 Requires: gpac >= 0.8.0
99 %description -n x264 -l pl.UTF-8
100 Dekoder x264 działający z linii poleceń.
103 %setup -q -n x264-%{gitref}
111 --host=%{_target_platform} \
112 --prefix=%{_prefix} \
113 --exec-prefix=%{_prefix} \
114 --bindir=%{_bindir} \
115 --includedir=%{_includedir} \
116 --libdir=%{_libdir} \
117 --extra-cflags="%{rpmcflags}" \
118 %{!?with_asm:--disable-asm} \
126 rm -rf $RPM_BUILD_ROOT
129 DESTDIR=$RPM_BUILD_ROOT
132 rm -rf $RPM_BUILD_ROOT
134 %post -p /sbin/ldconfig
135 %postun -p /sbin/ldconfig
138 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/libx264.so.%{api_ver}
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_libdir}/libx264.so
145 %{_includedir}/x264.h
146 %{_includedir}/x264_config.h
147 %{_pkgconfigdir}/x264.pc
150 %defattr(644,root,root,755)
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_bindir}/x264