summaryrefslogtreecommitdiff
path: root/libyuv.spec
blob: 71607c599773a0ce44a3efcc4d61b57205628bd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Name:		libyuv
Summary:	YUV conversion and scaling functionality library
Version:	20240704
Release:	1
License:	BSD-3-Clause
Url:		https://chromium.googlesource.com/libyuv/libyuv
Source0:	%{name}-%{version}.tar.gz
Patch1:		libyuv-0001-Move-Linux-variables-to-the-top.patch
Patch2:		libyuv-0002-Use-a-proper-so-version.patch
Patch3:		libyuv-0003-Link-against-shared-library.patch
Patch4:		libyuv-0004-Disable-static-library.patch
Patch5:		libyuv-0005-Use-library-suffix-during-installation.patch
Patch6:		libyuv-0006-Link-against-math-library-for-roundf.patch
BuildRequires:	cmake
BuildRequires:	gcc-c++
BuildRequires:	gtest-devel
BuildRequires:	libjpeg-devel

%description
This is an open source project that includes YUV conversion and scaling
functionality. Converts all webcam formats to YUV (I420). Convert YUV to
formats for rendering/effects. Rotate by 90 degrees to adjust for mobile
devices in portrait mode. Scale YUV to prepare content for compression,
with point, bilinear or box filter.

%package devel
Summary: The development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
Additional header files for development with %{name}.

%prep
%autosetup -p1 -c %{name}-%{version}

cat > %{name}.pc << EOF
prefix=%{_prefix}
exec_prefix=${prefix}
libdir=%{_libdir}
includedir=%{_includedir}

Name: %{name}
Description: %{summary}
Version: %{version}
Libs: -lyuv
EOF

%build
%cmake -DUNIT_TEST=TRUE
%cmake_build

%install
%cmake_install

mkdir -p %{buildroot}%{_libdir}/pkgconfig
cp -a %{name}.pc %{buildroot}%{_libdir}/pkgconfig/

rm -f %{buildroot}%{_bindir}/yuvconvert

%check
./libyuv_unittest || true

%files
%license LICENSE
%doc AUTHORS PATENTS README.md
%{_libdir}/%{name}.so.*

%files devel
%{_includedir}/%{name}
%{_includedir}/%{name}.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%changelog
* Wed Nov 27 2024 Yangfan Ruan <yangfan.oerv@isrc.iscas.ac.cn> - 20240704-1
- Init package