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