diff --git a/libavif-0.11.1.tar.gz b/libavif-0.11.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8b27ab87c372f438cc5819055fec39d3acfcacdb Binary files /dev/null and b/libavif-0.11.1.tar.gz differ diff --git a/libavif.spec b/libavif.spec new file mode 100644 index 0000000000000000000000000000000000000000..b048d34fa3c72462f6d6d8091f2c240a9e2894f0 --- /dev/null +++ b/libavif.spec @@ -0,0 +1,124 @@ +%define anolis_release 1 +# Build without aom +%bcond_with aom +# Build without SVT-AV1 +%bcond_with svt +%bcond_with rav1e +%bcond_with check + +Name: libavif +Version: 0.11.1 +Release: %{anolis_release}%{?dist} +Summary: Library for encoding and decoding .avif files +License: BSD-2-Clause +URL: https://github.com/AOMediaCodec/libavif +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: gcc-c++ +%{?with_check:BuildRequires: gtest-devel} +BuildRequires: nasm +%if %{with aom} +BuildRequires: pkgconfig(aom) +%endif +BuildRequires: pkgconfig(dav1d) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libpng) +%{?with_rav1e:BuildRequires: pkgconfig(rav1e)} +%{?with_svt:BuildRequires: pkgconfig(SvtAv1Enc)} +BuildRequires: pkgconfig(zlib) + +%description +This library aims to be a friendly, portable C implementation of the AV1 Image +File Format, as described here: + +https://aomediacodec.github.io/av1-avif/ + +%package devel +Summary: Development files for libavif +Requires: %{name} = %{version}-%{release} + +%description devel +This package holds the development files for libavif. + +%package tools +Summary: Tools to encode and decode AVIF files + +%description tools +This library aims to be a friendly, portable C implementation of the AV1 Image +File Format, as described here: + +https://aomediacodec.github.io/av1-avif/ + +This package holds the commandline tools to encode and decode AVIF files. + +%package -n avif-pixbuf-loader +Summary: AVIF image loader for GTK+ applications +BuildRequires: pkgconfig(gdk-pixbuf-2.0) +Requires: gdk-pixbuf2 + +%description -n avif-pixbuf-loader +Avif-pixbuf-loader contains a plugin to load AVIF images in GTK+ applications. + +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + +%prep +%autosetup -p1 + +%build +%cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + %{?with_aom:-DAVIF_CODEC_AOM=1} \ + -DAVIF_CODEC_DAV1D=1 \ + %{?with_rav1e:-DAVIF_CODEC_RAV1E=1} \ + %{?with_svt:-DAVIF_CODEC_SVT=1} \ + -DAVIF_BUILD_APPS=1 \ + -DAVIF_BUILD_GDK_PIXBUF=1 \ + %{?with_check:-DAVIF_BUILD_TESTS=1 -DAVIF_ENABLE_GTEST=1} +%cmake_build + +%install +%cmake_install + +%if %{with check} +%check +%ctest +%endif + +%generate_compatibility_deps + +%files +%license LICENSE +%{_libdir}/libavif.so.15* +%{_datadir}/thumbnailers/avif.thumbnailer +%dir %{abidir} +%{abidir}/libavif.dump + +%files devel +%{_libdir}/libavif.so +%{_includedir}/avif/ +%{_libdir}/cmake/libavif/ +%{_libdir}/pkgconfig/libavif.pc + +%files tools +%{_bindir}/avifdec +%{_bindir}/avifenc +%{abidir}/avifdec-option.list +%{abidir}/avifenc-option.list + +%files -n avif-pixbuf-loader +%{_libdir}/gdk-pixbuf-2.0/*/loaders/libpixbufloader-avif.so +%{abidir}/libpixbufloader-avif.dump + +%files doc +%doc CHANGELOG.md README.md + +%changelog +* Tue Mar 21 2023 Yuanhong Peng - 0.11.1-1 +- Init from upstream