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: 99997ecc8ee4d3575ba7715c759ad3bb
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"
106 export CFLAGS="$CFLAGS -flax-vector-conversions"
107 export CXXFLAGS="$CXXFLAGS -flax-vector-conversions"
111 -DENABLE_ASSEMBLY=%{!?with_asm:OFF}%{?with_asm:ON} \
112 -DENABLE_HDR10_PLUS=ON \
113 %{?with_vmaf:-DENABLE_LIBVMAF=ON} \
115 -DLIB_INSTALL_DIR=%{_lib}
120 rm -rf $RPM_BUILD_ROOT
122 %{__make} -C source/build install \
123 DESTDIR=$RPM_BUILD_ROOT
126 rm -rf $RPM_BUILD_ROOT
128 %post -n libx265 -p /sbin/ldconfig
129 %postun -n libx265 -p /sbin/ldconfig
132 %defattr(644,root,root,755)
133 %doc doc/reST/cli.rst
134 %attr(755,root,root) %{_bindir}/x265
137 %defattr(644,root,root,755)
138 %doc doc/reST/introduction.rst
139 %attr(755,root,root) %{_libdir}/libx265.so.209
140 %attr(755,root,root) %{_libdir}/libhdr10plus.so
142 %files -n libx265-devel
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_libdir}/libx265.so
145 %{_includedir}/hdr10plus.h
146 %{_includedir}/x265.h
147 %{_includedir}/x265_config.h
148 %{_pkgconfigdir}/x265.pc
150 %files -n libx265-static
151 %defattr(644,root,root,755)
152 %{_libdir}/libhdr10plus.a