309d41c
# Build with aom
Leigh Scott 269edbe
%bcond_without aom
309d41c
# Build SVT-AV1
d19e550
%ifarch x86_64
d19e550
%bcond_without svt
d19e550
%endif
Andreas Schneider 4296ae8
Andreas Schneider 97cd059
Name:           libavif
b53103d
Version:        0.9.3
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)
05f1fe9
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
Andreas Schneider 4296ae8
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 \
Andreas Schneider c0f09f6
    -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
b53103d
%{_libdir}/libavif.so.13*
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