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