]>
Commit | Line | Data |
---|---|---|
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 |
15 | Summary: Netflix's VMAF library |
16 | Summary(pl.UTF-8): Biblioteka Netflix VMAF | |
17 | Name: vmaf | |
84e16803 | 18 | Version: 1.5.3 |
a4918afe | 19 | Release: 1 |
02b7abd7 | 20 | License: BSD+patent |
7f1d6d41 JB |
21 | Group: Libraries |
22 | #Source0Download: https://github.com/Netflix/vmaf/releases | |
23 | Source0: https://github.com/Netflix/vmaf/archive/v%{version}/%{name}-%{version}.tar.gz | |
84e16803 JB |
24 | # Source0-md5: 73914f1bc2e15a82162549f1eba735fa |
25 | Patch0: %{name}-x86-nosimd.patch | |
7f1d6d41 JB |
26 | URL: https://github.com/Netflix/vmaf |
27 | BuildRequires: libstdc++-devel >= 6:4.8 | |
02b7abd7 JB |
28 | BuildRequires: meson >= 0.47.0 |
29 | BuildRequires: ninja >= 1.5 | |
7f1d6d41 | 30 | BuildRequires: sed >= 4.0 |
a4918afe | 31 | Requires: %{name}-libs = %{version}-%{release} |
7f1d6d41 JB |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
35 | VMAF is a perceptual video quality assessment algorithm developed by | |
36 | Netflix. | |
37 | ||
a4918afe JB |
38 | %description -l pl.UTF-8 |
39 | VMAF to percepcyjny algorytm oceny jakoĊci obrazu tworzony przez | |
40 | Netfliksa. | |
41 | ||
42 | %package libs | |
43 | Summary: Netflix VMAF libary | |
44 | Summary(pl.UTF-8): Biblioteka Netflix VMAF | |
45 | Group: Libraries | |
02b7abd7 JB |
46 | %if %{with sse2} |
47 | Requires: cpuinfo(sse2) | |
48 | %endif | |
a4918afe JB |
49 | |
50 | %description libs | |
51 | Netflix VMAF libary. | |
52 | ||
53 | %description libs -l pl.UTF-8 | |
54 | Biblioteka Netflix VMAF. | |
7f1d6d41 JB |
55 | |
56 | %package devel | |
57 | Summary: Netflix VMAF SDK | |
58 | Summary(pl.UTF-8): Pakiet programistyczny Netflix VMAF | |
59 | Group: Development/Libraries | |
a4918afe | 60 | Requires: %{name}-libs = %{version}-%{release} |
7f1d6d41 JB |
61 | Requires: libstdc++-devel >= 6:4.8 |
62 | ||
63 | %description devel | |
64 | Netflix VMAF SDK. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pakiet programistyczny Netflix VMAF. | |
68 | ||
a4918afe JB |
69 | %package static |
70 | Summary: Static Netflix VMAF library | |
71 | Summary(pl.UTF-8): Statyczna biblioteka Netflix VMAF | |
72 | Group: Development/Libraries | |
73 | Requires: %{name}-devel = %{version}-%{release} | |
74 | ||
75 | %description static | |
76 | Static Netflix VMAF library. | |
77 | ||
78 | %description static -l pl.UTF-8 | |
79 | Statyczna biblioteka Netflix VMAF. | |
80 | ||
7f1d6d41 JB |
81 | %prep |
82 | %setup -q | |
84e16803 | 83 | %patch0 -p1 |
a4918afe JB |
84 | |
85 | %if %{without sse2} | |
02b7abd7 | 86 | %{__sed} -i -e 's,#define ADM_OPT_RECIP_DIVISION,/* & */,' libvmaf/src/feature/adm_options.h |
a4918afe | 87 | %endif |
7f1d6d41 JB |
88 | |
89 | %build | |
02b7abd7 JB |
90 | %if %{with sse2} |
91 | CFLAGS="%{rpmcflags} -msse2" | |
92 | CXXFLAGS="%{rpmcxxflags} -msse2" | |
93 | %endif | |
94 | %meson build-libvmaf libvmaf | |
95 | ||
96 | %ninja_build -C build-libvmaf | |
7f1d6d41 JB |
97 | |
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
02b7abd7 | 101 | %ninja_install -C build-libvmaf |
a4918afe | 102 | |
6d9c8352 | 103 | install build-libvmaf/tools/{vmaf_feature,vmaf_rc} $RPM_BUILD_ROOT%{_bindir} |
7f1d6d41 JB |
104 | |
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
a4918afe JB |
108 | %post libs -p /sbin/ldconfig |
109 | %postun libs -p /sbin/ldconfig | |
110 | ||
6d9c8352 JB |
111 | %triggerpostun libs -- vmaf-libs < 1.5.2 |
112 | # replace library file with soname symlink | |
113 | rm -f %{_libdir}/libvmaf.so.0 | |
114 | /sbin/ldconfig | |
115 | ||
7f1d6d41 JB |
116 | %files |
117 | %defattr(644,root,root,755) | |
02b7abd7 | 118 | %doc CHANGELOG.md FAQ.md LICENSE NOTICE.md README.md VERSION |
6d9c8352 | 119 | %attr(755,root,root) %{_bindir}/vmaf_feature |
02b7abd7 JB |
120 | %attr(755,root,root) %{_bindir}/vmaf_rc |
121 | %attr(755,root,root) %{_bindir}/vmafossexec | |
7f1d6d41 JB |
122 | %{_datadir}/model |
123 | ||
a4918afe JB |
124 | %files libs |
125 | %defattr(644,root,root,755) | |
6d9c8352 JB |
126 | %attr(755,root,root) %{_libdir}/libvmaf.so.0.0.0 |
127 | %attr(755,root,root) %ghost %{_libdir}/libvmaf.so.0 | |
a4918afe | 128 | |
7f1d6d41 JB |
129 | %files devel |
130 | %defattr(644,root,root,755) | |
a4918afe | 131 | %attr(755,root,root) %{_libdir}/libvmaf.so |
02b7abd7 | 132 | %{_includedir}/libvmaf |
7f1d6d41 | 133 | %{_pkgconfigdir}/libvmaf.pc |
a4918afe JB |
134 | |
135 | %files static | |
136 | %defattr(644,root,root,755) | |
137 | %{_libdir}/libvmaf.a |