summaryrefslogtreecommitdiff
path: root/libyuv.spec
diff options
context:
space:
mode:
Diffstat (limited to 'libyuv.spec')
-rw-r--r--libyuv.spec76
1 files changed, 76 insertions, 0 deletions
diff --git a/libyuv.spec b/libyuv.spec
new file mode 100644
index 0000000..71607c5
--- /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
+
+%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