]> git.pld-linux.org Git - packages/vmaf.git/blob - vmaf.spec
b98146d302272c3202bc4ca94e5d843930055a82
[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:        2.1.0
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:  a65e105a67008796d566e9cc38e8e0fe
25 URL:            https://github.com/Netflix/vmaf
26 BuildRequires:  libstdc++-devel >= 6:4.8
27 BuildRequires:  meson >= 0.47.0
28 %ifarch %{ix86} %{x8664} x32
29 BuildRequires:  nasm
30 %endif
31 BuildRequires:  ninja >= 1.7.1
32 BuildRequires:  python3 >= 1:3.6
33 BuildRequires:  sed >= 4.0
34 Requires:       %{name}-libs = %{version}-%{release}
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 VMAF is a perceptual video quality assessment algorithm developed by
39 Netflix.
40
41 %description -l pl.UTF-8
42 VMAF to percepcyjny algorytm oceny jakoĊ›ci obrazu tworzony przez
43 Netfliksa.
44
45 %package libs
46 Summary:        Netflix VMAF libary
47 Summary(pl.UTF-8):      Biblioteka Netflix VMAF
48 Group:          Libraries
49 %if %{with sse2}
50 Requires:       cpuinfo(sse2)
51 %endif
52
53 %description libs
54 Netflix VMAF libary.
55
56 %description libs -l pl.UTF-8
57 Biblioteka Netflix VMAF.
58
59 %package devel
60 Summary:        Netflix VMAF SDK
61 Summary(pl.UTF-8):      Pakiet programistyczny Netflix VMAF
62 Group:          Development/Libraries
63 Requires:       %{name}-libs = %{version}-%{release}
64 Requires:       libstdc++-devel >= 6:4.8
65
66 %description devel
67 Netflix VMAF SDK.
68
69 %description devel -l pl.UTF-8
70 Pakiet programistyczny Netflix VMAF.
71
72 %package static
73 Summary:        Static Netflix VMAF library
74 Summary(pl.UTF-8):      Statyczna biblioteka Netflix VMAF
75 Group:          Development/Libraries
76 Requires:       %{name}-devel = %{version}-%{release}
77
78 %description static
79 Static Netflix VMAF library.
80
81 %description static -l pl.UTF-8
82 Statyczna biblioteka Netflix VMAF.
83
84 %prep
85 %setup -q
86
87 %{__mv} libvmaf/README.md libvmaf/README.libvmaf.md
88
89 %if %{without sse2}
90 %{__sed} -i -e 's,#define ADM_OPT_RECIP_DIVISION,/* & */,' libvmaf/src/feature/adm_options.h
91 %endif
92
93 %build
94 %if %{with sse2}
95 CFLAGS="%{rpmcflags} -msse2"
96 CXXFLAGS="%{rpmcxxflags} -msse2"
97 %endif
98 %meson build-libvmaf libvmaf
99
100 %ninja_build -C build-libvmaf
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %ninja_install -C build-libvmaf
106
107 install build-libvmaf/tools/vmafossexec $RPM_BUILD_ROOT%{_bindir}
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post   libs -p /sbin/ldconfig
113 %postun libs -p /sbin/ldconfig
114
115 %triggerpostun libs -- vmaf-libs < 1.5.2
116 # replace library file with soname symlink
117 rm -f %{_libdir}/libvmaf.so.0
118 /sbin/ldconfig
119
120 %files
121 %defattr(644,root,root,755)
122 %doc libvmaf/tools/README.md
123 %attr(755,root,root) %{_bindir}/vmaf
124 %attr(755,root,root) %{_bindir}/vmafossexec
125
126 %files libs
127 %defattr(644,root,root,755)
128 %doc CHANGELOG.md FAQ.md LICENSE README.md libvmaf/README.libvmaf.md
129 %attr(755,root,root) %{_libdir}/libvmaf.so.*.*.*
130 %attr(755,root,root) %ghost %{_libdir}/libvmaf.so.1
131
132 %files devel
133 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_libdir}/libvmaf.so
135 %{_includedir}/libvmaf
136 %{_pkgconfigdir}/libvmaf.pc
137
138 %files static
139 %defattr(644,root,root,755)
140 %{_libdir}/libvmaf.a
This page took 0.051457 seconds and 2 git commands to generate.