]> git.pld-linux.org Git - packages/vmaf.git/blob - vmaf.spec
- updated to 1.5.1
[packages/vmaf.git] / vmaf.spec
1 # TODO:
2 # - python package
3 # - system libs if possible:
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
8 #
9 # Conditional build:
10 %bcond_with     sse2    # use SSE2 instructions
11
12 %ifarch pentium4 %{x8664} x32
13 %define with_sse2       1
14 %endif
15 Summary:        Netflix's VMAF library
16 Summary(pl.UTF-8):      Biblioteka Netflix VMAF
17 Name:           vmaf
18 Version:        1.5.1
19 Release:        1
20 License:        BSD+patent
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
24 # Source0-md5:  f5fdf4e7b06b0e692cafb0527f9ca5c9
25 Patch0:         %{name}-shared.patch
26 URL:            https://github.com/Netflix/vmaf
27 BuildRequires:  libstdc++-devel >= 6:4.8
28 BuildRequires:  meson >= 0.47.0
29 BuildRequires:  ninja >= 1.5
30 BuildRequires:  sed >= 4.0
31 Requires:       %{name}-libs = %{version}-%{release}
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
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
46 %if %{with sse2}
47 Requires:       cpuinfo(sse2)
48 %endif
49
50 %description libs
51 Netflix VMAF libary.
52
53 %description libs -l pl.UTF-8
54 Biblioteka Netflix VMAF.
55
56 %package devel
57 Summary:        Netflix VMAF SDK
58 Summary(pl.UTF-8):      Pakiet programistyczny Netflix VMAF
59 Group:          Development/Libraries
60 Requires:       %{name}-libs = %{version}-%{release}
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
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
81 %prep
82 %setup -q
83 %patch0 -p1
84
85 %if %{without sse2}
86 %{__sed} -i -e 's,#define ADM_OPT_RECIP_DIVISION,/* & */,' libvmaf/src/feature/adm_options.h
87 %endif
88
89 %build
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
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %ninja_install -C build-libvmaf
102
103 install build-libvmaf/tools/{psnr,vmaf,vmaf_rc} $RPM_BUILD_ROOT%{_bindir}
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %post   libs -p /sbin/ldconfig
109 %postun libs -p /sbin/ldconfig
110
111 %files
112 %defattr(644,root,root,755)
113 %doc CHANGELOG.md FAQ.md LICENSE NOTICE.md README.md VERSION
114 %attr(755,root,root) %{_bindir}/psnr
115 %attr(755,root,root) %{_bindir}/vmaf
116 %attr(755,root,root) %{_bindir}/vmaf_rc
117 %attr(755,root,root) %{_bindir}/vmafossexec
118 %{_datadir}/model
119
120 %files libs
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libvmaf.so.0
123
124 %files devel
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{_libdir}/libvmaf.so
127 %{_includedir}/libvmaf
128 %{_pkgconfigdir}/libvmaf.pc
129
130 %files static
131 %defattr(644,root,root,755)
132 %{_libdir}/libvmaf.a
This page took 0.081062 seconds and 3 git commands to generate.