]> git.pld-linux.org Git - packages/vmaf.git/blame - vmaf.spec
- updated to 3.0.0
[packages/vmaf.git] / vmaf.spec
CommitLineData
7f1d6d41 1# TODO:
f989c4d9 2# - enable_cuda, enable_nvtx on bcond
7f1d6d41 3# - python package
7f1d6d41 4# - system libs if possible:
02b7abd7 5# third_party/libsvm
a4918afe
JB
6#
7# Conditional build:
8%bcond_with sse2 # use SSE2 instructions
9
10%ifarch pentium4 %{x8664} x32
11%define with_sse2 1
12%endif
7f1d6d41
JB
13Summary: Netflix's VMAF library
14Summary(pl.UTF-8): Biblioteka Netflix VMAF
15Name: vmaf
f989c4d9 16Version: 3.0.0
a4918afe 17Release: 1
02b7abd7 18License: BSD+patent
7f1d6d41
JB
19Group: Libraries
20#Source0Download: https://github.com/Netflix/vmaf/releases
21Source0: https://github.com/Netflix/vmaf/archive/v%{version}/%{name}-%{version}.tar.gz
f989c4d9 22# Source0-md5: dfd67ebfbfcb66ce76abc56fde0df06f
7a146347 23Patch0: %{name}-x32.patch
7f1d6d41 24URL: https://github.com/Netflix/vmaf
2b98918b 25BuildRequires: gcc >= 6:4.8
7f1d6d41 26BuildRequires: libstdc++-devel >= 6:4.8
f989c4d9 27BuildRequires: meson >= 0.56.1
dcd1edda 28%ifarch %{ix86} %{x8664} x32
7a146347 29BuildRequires: nasm >= 2.14
dcd1edda
JB
30%endif
31BuildRequires: ninja >= 1.7.1
32BuildRequires: python3 >= 1:3.6
7f1d6d41 33BuildRequires: sed >= 4.0
a4918afe 34Requires: %{name}-libs = %{version}-%{release}
7f1d6d41
JB
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38VMAF is a perceptual video quality assessment algorithm developed by
39Netflix.
40
a4918afe
JB
41%description -l pl.UTF-8
42VMAF to percepcyjny algorytm oceny jakoĊ›ci obrazu tworzony przez
43Netfliksa.
44
45%package libs
46Summary: Netflix VMAF libary
47Summary(pl.UTF-8): Biblioteka Netflix VMAF
48Group: Libraries
02b7abd7
JB
49%if %{with sse2}
50Requires: cpuinfo(sse2)
51%endif
a4918afe
JB
52
53%description libs
54Netflix VMAF libary.
55
56%description libs -l pl.UTF-8
57Biblioteka Netflix VMAF.
7f1d6d41
JB
58
59%package devel
60Summary: Netflix VMAF SDK
61Summary(pl.UTF-8): Pakiet programistyczny Netflix VMAF
62Group: Development/Libraries
a4918afe 63Requires: %{name}-libs = %{version}-%{release}
7f1d6d41
JB
64Requires: libstdc++-devel >= 6:4.8
65
66%description devel
67Netflix VMAF SDK.
68
69%description devel -l pl.UTF-8
70Pakiet programistyczny Netflix VMAF.
71
a4918afe
JB
72%package static
73Summary: Static Netflix VMAF library
74Summary(pl.UTF-8): Statyczna biblioteka Netflix VMAF
75Group: Development/Libraries
76Requires: %{name}-devel = %{version}-%{release}
77
78%description static
79Static Netflix VMAF library.
80
81%description static -l pl.UTF-8
82Statyczna biblioteka Netflix VMAF.
83
7f1d6d41
JB
84%prep
85%setup -q
7a146347 86%patch0 -p1
dcd1edda
JB
87
88%{__mv} libvmaf/README.md libvmaf/README.libvmaf.md
a4918afe
JB
89
90%if %{without sse2}
02b7abd7 91%{__sed} -i -e 's,#define ADM_OPT_RECIP_DIVISION,/* & */,' libvmaf/src/feature/adm_options.h
a4918afe 92%endif
7f1d6d41
JB
93
94%build
02b7abd7 95%if %{with sse2}
7a146347 96# SSE2 requires global support
02b7abd7
JB
97CFLAGS="%{rpmcflags} -msse2"
98CXXFLAGS="%{rpmcxxflags} -msse2"
99%endif
7a146347
JB
100
101# AVX512 is (properly) runtime detected (but SSE2 is probably prerequisite)
102%meson build-libvmaf libvmaf \
103%if %{with sse2}
104 -Denable_avx512=true
105%endif
02b7abd7
JB
106
107%ninja_build -C build-libvmaf
7f1d6d41
JB
108
109%install
110rm -rf $RPM_BUILD_ROOT
111
02b7abd7 112%ninja_install -C build-libvmaf
a4918afe 113
7f1d6d41
JB
114%clean
115rm -rf $RPM_BUILD_ROOT
116
a4918afe
JB
117%post libs -p /sbin/ldconfig
118%postun libs -p /sbin/ldconfig
119
6d9c8352
JB
120%triggerpostun libs -- vmaf-libs < 1.5.2
121# replace library file with soname symlink
122rm -f %{_libdir}/libvmaf.so.0
123/sbin/ldconfig
124
7f1d6d41
JB
125%files
126%defattr(644,root,root,755)
dcd1edda
JB
127%doc libvmaf/tools/README.md
128%attr(755,root,root) %{_bindir}/vmaf
7f1d6d41 129
a4918afe
JB
130%files libs
131%defattr(644,root,root,755)
2b98918b 132%doc CHANGELOG.md LICENSE README.md libvmaf/README.libvmaf.md
dcd1edda 133%attr(755,root,root) %{_libdir}/libvmaf.so.*.*.*
f989c4d9 134%attr(755,root,root) %ghost %{_libdir}/libvmaf.so.3
a4918afe 135
7f1d6d41
JB
136%files devel
137%defattr(644,root,root,755)
a4918afe 138%attr(755,root,root) %{_libdir}/libvmaf.so
02b7abd7 139%{_includedir}/libvmaf
7f1d6d41 140%{_pkgconfigdir}/libvmaf.pc
a4918afe
JB
141
142%files static
143%defattr(644,root,root,755)
144%{_libdir}/libvmaf.a
This page took 0.077803 seconds and 4 git commands to generate.