2 # - enable_cuda, enable_nvtx on bcond
4 # - system libs if possible:
8 %bcond_with sse2 # use SSE2 instructions
10 %ifarch pentium4 %{x8664} x32
13 Summary: Netflix's VMAF library
14 Summary(pl.UTF-8): Biblioteka Netflix VMAF
20 #Source0Download: https://github.com/Netflix/vmaf/releases
21 Source0: https://github.com/Netflix/vmaf/archive/v%{version}/%{name}-%{version}.tar.gz
22 # Source0-md5: dfd67ebfbfcb66ce76abc56fde0df06f
23 Patch0: %{name}-x32.patch
24 URL: https://github.com/Netflix/vmaf
25 BuildRequires: gcc >= 6:4.8
26 BuildRequires: libstdc++-devel >= 6:4.8
27 BuildRequires: meson >= 0.56.1
28 %ifarch %{ix86} %{x8664} x32
29 BuildRequires: nasm >= 2.14
31 BuildRequires: ninja >= 1.7.1
32 BuildRequires: python3 >= 1:3.6
33 BuildRequires: sed >= 4.0
34 Requires: %{name}-libs = %{version}-%{release}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 VMAF is a perceptual video quality assessment algorithm developed by
41 %description -l pl.UTF-8
42 VMAF to percepcyjny algorytm oceny jakoĊci obrazu tworzony przez
46 Summary: Netflix VMAF libary
47 Summary(pl.UTF-8): Biblioteka Netflix VMAF
50 Requires: cpuinfo(sse2)
56 %description libs -l pl.UTF-8
57 Biblioteka Netflix VMAF.
60 Summary: Netflix VMAF SDK
61 Summary(pl.UTF-8): Pakiet programistyczny Netflix VMAF
62 Group: Development/Libraries
63 Requires: %{name}-libs = %{version}-%{release}
64 Requires: libstdc++-devel >= 6:4.8
69 %description devel -l pl.UTF-8
70 Pakiet programistyczny Netflix VMAF.
73 Summary: Static Netflix VMAF library
74 Summary(pl.UTF-8): Statyczna biblioteka Netflix VMAF
75 Group: Development/Libraries
76 Requires: %{name}-devel = %{version}-%{release}
79 Static Netflix VMAF library.
81 %description static -l pl.UTF-8
82 Statyczna biblioteka Netflix VMAF.
88 %{__mv} libvmaf/README.md libvmaf/README.libvmaf.md
91 %{__sed} -i -e 's,#define ADM_OPT_RECIP_DIVISION,/* & */,' libvmaf/src/feature/adm_options.h
96 # SSE2 requires global support
97 CFLAGS="%{rpmcflags} -msse2"
98 CXXFLAGS="%{rpmcxxflags} -msse2"
101 # AVX512 is (properly) runtime detected (but SSE2 is probably prerequisite)
102 %meson build-libvmaf libvmaf \
107 %ninja_build -C build-libvmaf
110 rm -rf $RPM_BUILD_ROOT
112 %ninja_install -C build-libvmaf
115 rm -rf $RPM_BUILD_ROOT
117 %post libs -p /sbin/ldconfig
118 %postun libs -p /sbin/ldconfig
120 %triggerpostun libs -- vmaf-libs < 1.5.2
121 # replace library file with soname symlink
122 rm -f %{_libdir}/libvmaf.so.0
126 %defattr(644,root,root,755)
127 %doc libvmaf/tools/README.md
128 %attr(755,root,root) %{_bindir}/vmaf
131 %defattr(644,root,root,755)
132 %doc CHANGELOG.md LICENSE README.md libvmaf/README.libvmaf.md
133 %attr(755,root,root) %{_libdir}/libvmaf.so.*.*.*
134 %attr(755,root,root) %ghost %{_libdir}/libvmaf.so.3
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_libdir}/libvmaf.so
139 %{_includedir}/libvmaf
140 %{_pkgconfigdir}/libvmaf.pc
143 %defattr(644,root,root,755)