]> git.pld-linux.org Git - packages/x265.git/blob - x265.spec
update arm flags handling
[packages/x265.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.6
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:  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
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 %ifarch aarch64
106 export CFLAGS="$CFLAGS -flax-vector-conversions"
107 export CXXFLAGS="$CXXFLAGS -flax-vector-conversions"
108 %endif
109 %endif
110 %cmake .. \
111         -DENABLE_ASSEMBLY=%{!?with_asm:OFF}%{?with_asm:ON} \
112         -DENABLE_HDR10_PLUS=ON \
113         %{?with_vmaf:-DENABLE_LIBVMAF=ON} \
114         -DENABLE_SHARED=ON \
115         -DLIB_INSTALL_DIR=%{_lib}
116
117 %{__make}
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121
122 %{__make} -C source/build install \
123         DESTDIR=$RPM_BUILD_ROOT
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post   -n libx265 -p /sbin/ldconfig
129 %postun -n libx265 -p /sbin/ldconfig
130
131 %files
132 %defattr(644,root,root,755)
133 %doc doc/reST/cli.rst
134 %attr(755,root,root) %{_bindir}/x265
135
136 %files -n libx265
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
141
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
149
150 %files -n libx265-static
151 %defattr(644,root,root,755)
152 %{_libdir}/libhdr10plus.a
153 %{_libdir}/libx265.a
This page took 0.087915 seconds and 4 git commands to generate.