4 %bcond_without asm # assembler
5 %bcond_with vmaf # VMAF support [not ready for vmaf-1.3.x as of x265 3.2]
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 Patch2: %{name}-arm_flags.patch
26 URL: https://www.x265.org/
27 BuildRequires: cmake >= 2.8.11
28 BuildRequires: libstdc++-devel >= 6:4.8
29 BuildRequires: numactl-devel >= 2
30 BuildRequires: rpmbuild(macros) >= 2.007
32 %ifarch %{ix86} %{x8664} x32
33 BuildRequires: nasm >= 2.13.0
36 %{?with_vmaf:BuildRequires: vmaf-devel}
37 Requires: libx265 = %{version}-%{release}
38 # see CMakeLists.txt, more is probably possible
39 ExclusiveArch: %{ix86} %{x8664} x32 %{arm} ppc64 ppc64le aarch64
40 # needs 64-bit atomic compare and swap
41 ExcludeArch: i386 i486
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 H.265/HEVC video encoder.
47 %description -l pl.UTF-8
48 Koder obrazu H.265/HEVC.
51 Summary: H.265/HEVC video encoder library
52 Summary(pl.UTF-8): Biblioteka kodowania obrazu H.265/HEVC
55 %description -n libx265
56 H.265/HEVC video encoder library.
58 %description -n libx265 -l pl.UTF-8
59 Biblioteka kodowania obrazu H.265/HEVC.
61 %package -n libx265-devel
62 Summary: Header files for x265 library
63 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki x265
64 Group: Development/Libraries
65 Requires: libstdc++-devel >= 6:4.8
66 Requires: libx265 = %{version}-%{release}
67 Requires: numactl-devel >= 2
69 %description -n libx265-devel
70 Header files for x265 library.
72 %description -n libx265-devel -l pl.UTF-8
73 Pliki nagłówkowe biblioteki x265.
75 %package -n libx265-static
76 Summary: Static x265 library
77 Summary(pl.UTF-8): Statyczna biblioteka x265
78 Group: Development/Libraries
79 Requires: libx265-devel = %{version}-%{release}
81 %description -n libx265-static
84 %description -n libx265-static -l pl.UTF-8
85 Statyczna biblioteka x265.
88 %setup -q -n %{name}_%{version}
91 %ifarch %{arm} aarch64
96 install -d source/build
98 %ifarch %{arm} aarch64
99 export CFLAGS="%{rpmcflags} -fPIC"
100 export CXXFLAGS="%{rpmcxxflags} -fPIC"
101 %ifarch %{arm_with_neon}
102 export CFLAGS="$CFLAGS -DHAVE_NEON"
103 export CXXFLAGS="$CXXFLAGS -DHAVE_NEON"
107 -DENABLE_ASSEMBLY=%{!?with_asm:OFF}%{?with_asm:ON} \
108 -DENABLE_HDR10_PLUS=ON \
109 %{?with_vmaf:-DENABLE_LIBVMAF=ON} \
111 -DLIB_INSTALL_DIR=%{_lib}
116 rm -rf $RPM_BUILD_ROOT
118 %{__make} -C source/build install \
119 DESTDIR=$RPM_BUILD_ROOT
122 rm -rf $RPM_BUILD_ROOT
124 %post -n libx265 -p /sbin/ldconfig
125 %postun -n libx265 -p /sbin/ldconfig
128 %defattr(644,root,root,755)
129 %doc doc/reST/cli.rst
130 %attr(755,root,root) %{_bindir}/x265
133 %defattr(644,root,root,755)
134 %doc doc/reST/introduction.rst
135 %attr(755,root,root) %{_libdir}/libx265.so.199
136 %attr(755,root,root) %{_libdir}/libhdr10plus.so
138 %files -n libx265-devel
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/libx265.so
141 %{_includedir}/hdr10plus.h
142 %{_includedir}/x265.h
143 %{_includedir}/x265_config.h
144 %{_pkgconfigdir}/x265.pc
146 %files -n libx265-static
147 %defattr(644,root,root,755)
148 %{_libdir}/libhdr10plus.a