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