]> git.pld-linux.org Git - SPECS.git/blob - x265.spec
SPECS updated Sun 1 Aug 15:50:02 CEST 2021
[SPECS.git] / x265.spec
1 # TODO: vmaf
2 #
3 # Conditional build:
4 %bcond_without  asm     # assembler
5 %bcond_with     vmaf    # VMAF support [not ready for vmaf-1.3.x as of x265 3.2]
6
7 %ifarch %{arm}
8 %define         with_asm        1
9 %endif
10
11 Summary:        H.265/HEVC video encoder
12 Summary(pl.UTF-8):      Koder obrazu H.265/HEVC
13 Name:           x265
14 Version:        3.5
15 Release:        1
16 License:        GPL v2+
17 Group:          Libraries
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
31 %if %{with asm}
32 %ifarch %{ix86} %{x8664} x32
33 BuildRequires:  nasm >= 2.13.0
34 %endif
35 %endif
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)
43
44 %description
45 H.265/HEVC video encoder.
46
47 %description -l pl.UTF-8
48 Koder obrazu H.265/HEVC.
49
50 %package -n libx265
51 Summary:        H.265/HEVC video encoder library
52 Summary(pl.UTF-8):      Biblioteka kodowania obrazu H.265/HEVC
53 Group:          Libraries
54
55 %description -n libx265
56 H.265/HEVC video encoder library.
57
58 %description -n libx265 -l pl.UTF-8
59 Biblioteka kodowania obrazu H.265/HEVC.
60
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
68
69 %description -n libx265-devel
70 Header files for x265 library.
71
72 %description -n libx265-devel -l pl.UTF-8
73 Pliki nagłówkowe biblioteki x265.
74
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}
80
81 %description -n libx265-static
82 Static x265 library.
83
84 %description -n libx265-static -l pl.UTF-8
85 Statyczna biblioteka x265.
86
87 %prep
88 %setup -q -n %{name}_%{version}
89 %patch0 -p1
90 %patch1 -p1
91 %ifarch %{arm} aarch64
92 %patch2 -p1
93 %endif
94
95 %build
96 install -d source/build
97 cd 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"
104 %endif
105 %endif
106 %cmake .. \
107         -DENABLE_ASSEMBLY=%{!?with_asm:OFF}%{?with_asm:ON} \
108         -DENABLE_HDR10_PLUS=ON \
109         %{?with_vmaf:-DENABLE_LIBVMAF=ON} \
110         -DENABLE_SHARED=ON \
111         -DLIB_INSTALL_DIR=%{_lib}
112
113 %{__make}
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117
118 %{__make} -C source/build install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %post   -n libx265 -p /sbin/ldconfig
125 %postun -n libx265 -p /sbin/ldconfig
126
127 %files
128 %defattr(644,root,root,755)
129 %doc doc/reST/cli.rst
130 %attr(755,root,root) %{_bindir}/x265
131
132 %files -n libx265
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
137
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
145
146 %files -n libx265-static
147 %defattr(644,root,root,755)
148 %{_libdir}/libhdr10plus.a
149 %{_libdir}/libx265.a
This page took 0.975758 seconds and 3 git commands to generate.