3 # - system libs if possible:
7 %bcond_with sse2 # use SSE2 instructions
9 %ifarch pentium4 %{x8664} x32
12 Summary: Netflix's VMAF library
13 Summary(pl.UTF-8): Biblioteka Netflix VMAF
19 #Source0Download: https://github.com/Netflix/vmaf/releases
20 Source0: https://github.com/Netflix/vmaf/archive/v%{version}/%{name}-%{version}.tar.gz
21 # Source0-md5: be40a256a3b739ffc2119b45f919d6bf
22 Patch0: %{name}-x32.patch
23 URL: https://github.com/Netflix/vmaf
24 BuildRequires: gcc >= 6:4.8
25 BuildRequires: libstdc++-devel >= 6:4.8
26 BuildRequires: meson >= 0.47.0
27 %ifarch %{ix86} %{x8664} x32
28 BuildRequires: nasm >= 2.14
30 BuildRequires: ninja >= 1.7.1
31 BuildRequires: python3 >= 1:3.6
32 BuildRequires: sed >= 4.0
33 Requires: %{name}-libs = %{version}-%{release}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 VMAF is a perceptual video quality assessment algorithm developed by
40 %description -l pl.UTF-8
41 VMAF to percepcyjny algorytm oceny jakoĊci obrazu tworzony przez
45 Summary: Netflix VMAF libary
46 Summary(pl.UTF-8): Biblioteka Netflix VMAF
49 Requires: cpuinfo(sse2)
55 %description libs -l pl.UTF-8
56 Biblioteka Netflix VMAF.
59 Summary: Netflix VMAF SDK
60 Summary(pl.UTF-8): Pakiet programistyczny Netflix VMAF
61 Group: Development/Libraries
62 Requires: %{name}-libs = %{version}-%{release}
63 Requires: libstdc++-devel >= 6:4.8
68 %description devel -l pl.UTF-8
69 Pakiet programistyczny Netflix VMAF.
72 Summary: Static Netflix VMAF library
73 Summary(pl.UTF-8): Statyczna biblioteka Netflix VMAF
74 Group: Development/Libraries
75 Requires: %{name}-devel = %{version}-%{release}
78 Static Netflix VMAF library.
80 %description static -l pl.UTF-8
81 Statyczna biblioteka Netflix VMAF.
87 %{__mv} libvmaf/README.md libvmaf/README.libvmaf.md
90 %{__sed} -i -e 's,#define ADM_OPT_RECIP_DIVISION,/* & */,' libvmaf/src/feature/adm_options.h
95 # SSE2 requires global support
96 CFLAGS="%{rpmcflags} -msse2"
97 CXXFLAGS="%{rpmcxxflags} -msse2"
100 # AVX512 is (properly) runtime detected (but SSE2 is probably prerequisite)
101 %meson build-libvmaf libvmaf \
106 %ninja_build -C build-libvmaf
109 rm -rf $RPM_BUILD_ROOT
111 %ninja_install -C build-libvmaf
113 install build-libvmaf/tools/vmafossexec $RPM_BUILD_ROOT%{_bindir}
116 rm -rf $RPM_BUILD_ROOT
118 %post libs -p /sbin/ldconfig
119 %postun libs -p /sbin/ldconfig
121 %triggerpostun libs -- vmaf-libs < 1.5.2
122 # replace library file with soname symlink
123 rm -f %{_libdir}/libvmaf.so.0
127 %defattr(644,root,root,755)
128 %doc libvmaf/tools/README.md
129 %attr(755,root,root) %{_bindir}/vmaf
130 %attr(755,root,root) %{_bindir}/vmafossexec
133 %defattr(644,root,root,755)
134 %doc CHANGELOG.md LICENSE README.md libvmaf/README.libvmaf.md
135 %attr(755,root,root) %{_libdir}/libvmaf.so.*.*.*
136 %attr(755,root,root) %ghost %{_libdir}/libvmaf.so.1
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/libvmaf.so
141 %{_includedir}/libvmaf
142 %{_pkgconfigdir}/libvmaf.pc
145 %defattr(644,root,root,755)