3 Commits

3 changed files with 57 additions and 12 deletions

View File

@@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Nov 17 23:22:22 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Add xxd.patch and ditch build dependency on vim's xxd
-------------------------------------------------------------------
Tue Aug 5 12:50:35 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Move vmaf utilities to their own subpackage [boo#1247607]
-------------------------------------------------------------------
Thu Feb 27 23:37:08 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Make specfile compliant with POSIX sh
-------------------------------------------------------------------
Thu Feb 15 09:49:43 UTC 2024 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package vmaf
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -30,13 +30,14 @@ Group: Productivity/Multimedia/Video/Editors and Convertors
URL: https://github.com/Netflix/vmaf
Source: https://github.com/Netflix/vmaf/archive/v%version.tar.gz
Source9: baselibs.conf
Patch1: xxd.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: meson >= 0.47
BuildRequires: nasm
BuildRequires: pkg-config
BuildRequires: xxd
Provides: bundled(libsvm) = 3.24
Provides: vmaf-devel:/usr/bin/vmaf
%description
VMAF is a perceptual video quality assessment algorithm.
@@ -59,34 +60,35 @@ Netflix.
This package contains the library API definitions.
%prep
%autosetup
%autosetup -p1
%build
export PATH="$PATH:$PWD/bin"
chmod a+x bin/xxd
rm -rf third_party
pushd libvmaf/
cd libvmaf/
%meson -Dbuilt_in_models=true -Denable_float=true
%meson_build
popd
%install
pushd libvmaf/
cd libvmaf/
%meson_install
popd
rm -f "%buildroot/%_libdir"/*.a
%fdupes %buildroot/%_prefix
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%ldconfig_scriptlets -n %lname
%files
%_bindir/vmaf*
%license LICENSE
%doc README.md
%files -n %lname
%_libdir/libvmaf.so.%{sonum}*
%files devel
%_bindir/vmaf*
%_includedir/libvmaf/
%_libdir/libvmaf.so
%_libdir/pkgconfig/*.pc
%license LICENSE
%doc README.md
%changelog

28
xxd.patch Normal file
View File

@@ -0,0 +1,28 @@
From: Jan Engelhardt <ej@inai.de>
Date: 2025-11-18 00:02:49.785881693 +0100
xxd comes from vim. That's too much of a build dependency.
---
bin/xxd | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Index: vmaf/bin/xxd
===================================================================
--- /dev/null
+++ vmaf/bin/xxd
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+use Getopt::Long;
+use strict;
+use warnings;
+my($nflag, $iflag);
+&Getopt::Long::Configure(qw(bundling));
+&GetOptions("include" => \$iflag, "i" => \$iflag, "n=s" => \$nflag);
+if (!defined($nflag)) { ($nflag = $ARGV[0]) =~ s{[^a-z0-9]}{_}gi; }
+open(STDIN, "<", $ARGV[0]) or die("$ARGV[0]: $!");
+if (scalar(@ARGV) == 2) { open(STDOUT, ">", $ARGV[1]) or die("$ARGV[1]: $!"); }
+my $data = join("", <STDIN>);
+print "unsigned int ${nflag}_len = ", length($data), ";\n";
+print "unsigned char $nflag", "[", length($data), "] = {\n";
+for (my $i = 0; $i < length($data); ++$i) { printf("0x%x,", ord(substr($data, $i, 1))); }
+print "};\n";