309d41c
# Build with aom
Leigh Scott 269edbe
%bcond_without aom
309d41c
# Build SVT-AV1
d19e550
%ifarch x86_64
d19e550
%bcond_without svt
d19e550
%endif
d48641b
%if 0%{?rhel} && 0%{?rhel} < 9
520db7a
%bcond_with rav1e
7a07a01
%else
7a07a01
%bcond_without rav1e
520db7a
%endif
Andreas Schneider 4296ae8
Andreas Schneider 97cd059
Name:           libavif
67bf892
Version:        0.11.1
b85251c
Release:        %autorelease
Andreas Schneider 97cd059
Summary:        Library for encoding and decoding .avif files
05f1fe9
Andreas Schneider 97cd059
License:        BSD
Andreas Schneider 97cd059
URL:            https://github.com/AOMediaCodec/libavif
Andreas Schneider 97cd059
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
BuildRequires:  cmake
Andreas Schneider 4296ae8
BuildRequires:  gcc-c++
Andreas Schneider 4296ae8
BuildRequires:  nasm
Andreas Schneider 4296ae8
%if %{with aom}
Andreas Schneider 4296ae8
BuildRequires:  pkgconfig(aom)
Andreas Schneider 4296ae8
%endif
05f1fe9
BuildRequires:  pkgconfig(dav1d)
Andreas Schneider d58482f
BuildRequires:  pkgconfig(libjpeg)
Andreas Schneider 0289a29
BuildRequires:  pkgconfig(libpng)
520db7a
%{?with_rav1e:BuildRequires:  pkgconfig(rav1e)}
3e1858b
%{?with_svt:BuildRequires:  pkgconfig(SvtAv1Enc)}
Andreas Schneider 0289a29
BuildRequires:  pkgconfig(zlib)
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%description
Andreas Schneider 4296ae8
This library aims to be a friendly, portable C implementation of the AV1 Image
Andreas Schneider 4296ae8
File Format, as described here:
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
https://aomediacodec.github.io/av1-avif/
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%package devel
7280ba1
Summary:        Development files for libavif
05f1fe9
Requires:       %{name}%{?_isa} = %{version}-%{release}
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%description devel
Andreas Schneider 4296ae8
This package holds the development files for libavif.
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%package tools
05f1fe9
Summary:        Tools to encode and decode AVIF files
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%description tools
Andreas Schneider 4296ae8
This library aims to be a friendly, portable C implementation of the AV1 Image
Andreas Schneider 4296ae8
File Format, as described here:
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
https://aomediacodec.github.io/av1-avif/
Andreas Schneider 4296ae8
05f1fe9
This package holds the commandline tools to encode and decode AVIF files.
05f1fe9
05f1fe9
%package     -n avif-pixbuf-loader
05f1fe9
Summary:        AVIF image loader for GTK+ applications
05f1fe9
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
05f1fe9
Requires:       gdk-pixbuf2
05f1fe9
05f1fe9
%description -n avif-pixbuf-loader
05f1fe9
Avif-pixbuf-loader contains a plugin to load AVIF images in GTK+ applications.
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%prep
Andreas Schneider 4296ae8
%autosetup -p1
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%build
Andreas Schneider c0f09f6
%cmake \
Andreas Schneider c0f09f6
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
Andreas Schneider c0f09f6
    %{?with_aom:-DAVIF_CODEC_AOM=1} \
Andreas Schneider c0f09f6
    -DAVIF_CODEC_DAV1D=1 \
520db7a
    %{?with_rav1e:-DAVIF_CODEC_RAV1E=1} \
Andreas Schneider c0f09f6
    %{?with_svt:-DAVIF_CODEC_SVT=1} \
Andreas Schneider c0f09f6
    -DAVIF_BUILD_APPS=1 \
Andreas Schneider c0f09f6
    -DAVIF_BUILD_GDK_PIXBUF=1
05f1fe9
%cmake_build
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%install
05f1fe9
%cmake_install
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%files
Andreas Schneider 4296ae8
%license LICENSE
309d41c
# Do not glob the soname
67bf892
%{_libdir}/libavif.so.15*
67bf892
%{_datadir}/thumbnailers/avif.thumbnailer
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%files devel
Andreas Schneider 4296ae8
%{_libdir}/libavif.so
Andreas Schneider 4296ae8
%{_includedir}/avif/
Andreas Schneider 4296ae8
%{_libdir}/cmake/libavif/
Andreas Schneider 4296ae8
%{_libdir}/pkgconfig/libavif.pc
Andreas Schneider 4296ae8
Andreas Schneider 4296ae8
%files tools
Andreas Schneider 4296ae8
%doc CHANGELOG.md README.md
Andreas Schneider 4296ae8
%{_bindir}/avifdec
Andreas Schneider 4296ae8
%{_bindir}/avifenc
Andreas Schneider 4296ae8
05f1fe9
%files -n avif-pixbuf-loader
05f1fe9
%{_libdir}/gdk-pixbuf-2.0/*/loaders/libpixbufloader-avif.so
05f1fe9
Andreas Schneider 4296ae8
%changelog
b85251c
%autochangelog