From b9714199c43c2f1d9b09778ef9d1a193da302a13 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 6 Mar 2025 08:20:14 +0000 Subject: automatic import of libyuv --- libyuv.spec | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 libyuv.spec (limited to 'libyuv.spec') diff --git a/libyuv.spec b/libyuv.spec new file mode 100644 index 0000000..8f3b427 --- /dev/null +++ b/libyuv.spec @@ -0,0 +1,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 . --target all -- -j$(nproc) + +%install +make install/fast DESTDIR=%{buildroot} + +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 - 20240704-1 +- Init package -- cgit v1.2.3