4 %bcond_without asm # x86 assembler
5 %bcond_with vmaf # VMAF support [not ready for vmaf-1.3.x as of x265 3.2]
7 %ifnarch %{ix86} %{x8664} x32
11 Summary: H.265/HEVC video encoder
12 Summary(pl.UTF-8): Koder obrazu H.265/HEVC
18 # some versions also at
19 #Source0: https://download.videolan.org/videolan/x265/%{name}_%{version}.tar.gz
20 #Source0Download: https://bitbucket.org/multicoreware/x265_git/downloads/
21 Source0: https://bitbucket.org/multicoreware/x265_git/downloads/%{name}_%{version}.tar.gz
22 # Source0-md5: deb5df5cb2ec17bdbae6ac6bbc3b1eef
23 Patch0: %{name}-opt.patch
24 Patch1: %{name}-x32.patch
25 URL: https://www.x265.org/
26 BuildRequires: cmake >= 2.8.11
27 BuildRequires: libstdc++-devel >= 6:4.8
28 BuildRequires: numactl-devel >= 2
29 BuildRequires: rpmbuild(macros) >= 1.605
30 %{?with_asm:BuildRequires: nasm >= 2.13.0}
31 %{?with_vmaf:BuildRequires: vmaf-devel}
32 Requires: libx265 = %{version}-%{release}
33 # see CMakeLists.txt, more is probably possible
34 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} ppc64 ppc64le aarch64
35 # needs 64-bit atomic compare and swap
36 ExcludeArch: i386 i486
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 H.265/HEVC video encoder.
42 %description -l pl.UTF-8
43 Koder obrazu H.265/HEVC.
46 Summary: H.265/HEVC video encoder library
47 Summary(pl.UTF-8): Biblioteka kodowania obrazu H.265/HEVC
50 %description -n libx265
51 H.265/HEVC video encoder library.
53 %description -n libx265 -l pl.UTF-8
54 Biblioteka kodowania obrazu H.265/HEVC.
56 %package -n libx265-devel
57 Summary: Header files for x265 library
58 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x265
59 Group: Development/Libraries
60 Requires: libstdc++-devel >= 6:4.8
61 Requires: libx265 = %{version}-%{release}
62 Requires: numactl-devel >= 2
64 %description -n libx265-devel
65 Header files for x265 library.
67 %description -n libx265-devel -l pl.UTF-8
68 Pliki nagłówkowe biblioteki x265.
70 %package -n libx265-static
71 Summary: Static x265 library
72 Summary(pl.UTF-8): Statyczna biblioteka x265
73 Group: Development/Libraries
74 Requires: libx265-devel = %{version}-%{release}
76 %description -n libx265-static
79 %description -n libx265-static -l pl.UTF-8
80 Statyczna biblioteka x265.
83 %setup -q -n %{name}_%{version}
88 install -d source/build
91 -DENABLE_ASSEMBLY=%{!?with_asm:OFF}%{?with_asm:ON} \
92 -DENABLE_HDR10_PLUS=ON \
93 %{?with_vmaf:-DENABLE_LIBVMAF=ON} \
95 -DLIB_INSTALL_DIR=%{_lib}
100 rm -rf $RPM_BUILD_ROOT
102 %{__make} -C source/build install \
103 DESTDIR=$RPM_BUILD_ROOT
106 rm -rf $RPM_BUILD_ROOT
108 %post -n libx265 -p /sbin/ldconfig
109 %postun -n libx265 -p /sbin/ldconfig
112 %defattr(644,root,root,755)
113 %doc doc/reST/cli.rst
114 %attr(755,root,root) %{_bindir}/x265
117 %defattr(644,root,root,755)
118 %doc doc/reST/introduction.rst
119 %attr(755,root,root) %{_libdir}/libx265.so.199
120 %attr(755,root,root) %{_libdir}/libhdr10plus.so
122 %files -n libx265-devel
123 %defattr(644,root,root,755)
124 %attr(755,root,root) %{_libdir}/libx265.so
125 %{_includedir}/hdr10plus.h
126 %{_includedir}/x265.h
127 %{_includedir}/x265_config.h
128 %{_pkgconfigdir}/x265.pc
130 %files -n libx265-static
131 %defattr(644,root,root,755)
132 %{_libdir}/libhdr10plus.a