]> git.pld-linux.org Git - packages/libavif.git/blob - libavif.spec
add man bcond
[packages/libavif.git] / libavif.spec
1 #
2 # Conditional build:
3 %bcond_without  aom             # AOM for encoding/decoding
4 %bcond_without  man             # don't build man pages
5 %bcond_with     dav1d           # dav1d for decoding
6 %bcond_with     libgav1         # libgav1 for decoding
7 %bcond_with     rav1e           # rav1e for encoding
8 %bcond_with     svtav1          # SVT-AV1 for encoding
9 #
10 Summary:        Library for encoding and decoding .avif files
11 Summary(pl.UTF-8):      Biblioteka do kodowania i dekodowania plików .avif
12 Name:           libavif
13 Version:        0.11.1
14 Release:        1
15 License:        BSD
16 Group:          Libraries
17 #Source0Download: https://github.com/AOMediaCodec/libavif/releases
18 Source0:        https://github.com/AOMediaCodec/libavif/archive/v%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5:  dde524dfc0e0e37a468277b128662990
20 URL:            https://github.com/AOMediaCodec/libavif
21 %{?with_aom:BuildRequires:      aom-devel}
22 BuildRequires:  cmake >= 3.13
23 %{?with_dav1d:BuildRequires:    dav1d-devel}
24 BuildRequires:  gcc >= 5:3.2
25 %{?with_libgav1:BuildRequires:  libgav1-devel}
26 BuildRequires:  libjpeg-devel
27 BuildRequires:  libpng-devel
28 BuildRequires:  libsharpyuv-devel
29 # 1813+ preferred
30 BuildRequires:  libyuv-devel >= 0.1755
31 %{?with_man:BuildRequires:      pandoc}
32 %{?with_rav1e:BuildRequires:    rav1e-devel}
33 BuildRequires:  rpmbuild(macros) >= 1.745
34 %{?with_svtav1:BuildRequires:   svt-av1-devel}
35 BuildRequires:  zlib-devel
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 This library aims to be a friendly, portable C implementation of the
40 AV1 Image File Format, as described here:
41 <https://aomediacodec.github.io/av1-avif/>.
42
43 %description -l pl.UTF-8
44 Ta biblioteka powstała jako przyjazna, przenośna implementacja w C
45 obsługa formatu obrazów AV1, opisanego w dokumencie
46 <https://aomediacodec.github.io/av1-avif/>.
47
48 %package devel
49 Summary:        Header files for libavif library
50 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libavif
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53
54 %description devel
55 Header files for libavif library.
56
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe biblioteki libavif.
59
60 %package tools
61 Summary:        Tools to encode and decode AVIF files
62 Summary(pl.UTF-8):      Narzędzia do kodowania i dekodowania plików AVIF
63 Group:          Applications/Multimedia
64 Requires:       %{name} = %{version}-%{release}
65
66 %description tools
67 Tools to encode and decode AVIF files.
68
69 %description tools -l pl.UTF-8
70 Narzędzia do kodowania i dekodowania plików AVIF.
71
72 %prep
73 %setup -q
74
75 %build
76 %cmake -B build \
77         -DCMAKE_INSTALL_LIBDIR=%{_lib} \
78         -DAVIF_BUILD_APPS=ON \
79         %{cmake_on_off man AVIF_BUILD_MAN_PAGES} \
80         %{?with_aom:-DAVIF_CODEC_AOM=ON} \
81         %{?with_dav1d:-DAVIF_CODEC_DAV1D=ON} \
82         %{?with_libgav1:-DAVIF_CODEC_LIBGAV1=ON} \
83         %{?with_rav1e:-DAVIF_CODEC_RAV1E=ON} \
84         %{?with_svtav1:-DAVIF_CODEC_SVT=ON}
85
86 %{__make} -C build
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %{__make} -C build install \
92         DESTDIR=$RPM_BUILD_ROOT
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %post   -p /sbin/ldconfig
98 %postun -p /sbin/ldconfig
99
100 %files
101 %defattr(644,root,root,755)
102 %doc CHANGELOG.md LICENSE README.md
103 %attr(755,root,root) %{_libdir}/libavif.so.*.*.*
104 %attr(755,root,root) %ghost %{_libdir}/libavif.so.15
105
106 %files devel
107 %defattr(644,root,root,755)
108 %attr(755,root,root) %{_libdir}/libavif.so
109 %{_includedir}/avif
110 %{_pkgconfigdir}/libavif.pc
111 %{_libdir}/cmake/libavif
112
113 %files tools
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_bindir}/avifdec
116 %attr(755,root,root) %{_bindir}/avifenc
117 %if %{with man}
118 %{_mandir}/man1/avifdec.1*
119 %{_mandir}/man1/avifenc.1*
120 %endif
This page took 0.243918 seconds and 3 git commands to generate.