3 %bcond_with golang # Go examples
4 %bcond_without static_libs # static library
5 %bcond_with tests # testing
6 %bcond_without aom # aom AVIF decoder/encoder
7 %bcond_without dav1d # dav1d AVIF decoder
8 %bcond_without svtav1 # SVT-AV1 AVIF encoder
9 %bcond_without rav1e # rav1e AVIF encoder
11 %ifnarch %{ix86} %{x8664} aarch64
14 Summary: ISO/IEC 23008-12:2017 HEIF file format decoder and encoder
15 Summary(pl.UTF-8): Koder i dekoder formatu plików HEIF zgodnego z ISO/IEC 23008-12:2017
19 License: LGPL v3+ (library), GPL v3+ (tools)
21 #Source0Download: https://github.com/strukturag/libheif/releases/
22 Source0: https://github.com/strukturag/libheif/releases/download/v%{version}/%{name}-%{version}.tar.gz
23 # Source0-md5: e6bec8efc317b56d85884197ad874f0a
24 URL: https://github.com/strukturag/libheif
25 %{?with_aom:BuildRequires: aom-devel}
26 BuildRequires: cmake >= 3.0
27 %{?with_dav1d:BuildRequires: dav1d-devel}
28 BuildRequires: gdk-pixbuf2-devel >= 2.0
29 %{?with_golang:BuildRequires: golang >= 1.6}
30 BuildRequires: libde265-devel >= 1.0.7
31 BuildRequires: libjpeg-devel
32 BuildRequires: libpng-devel
33 BuildRequires: libsharpyuv-devel
34 BuildRequires: libstdc++-devel >= 6:4.7
35 BuildRequires: libx265-devel
36 BuildRequires: pkgconfig
37 %{?with_rav1e:BuildRequires: rav1e-devel}
38 %{?with_svtav1:BuildRequires: svt-av1-devel}
39 BuildRequires: rpmbuild(macros) >= 1.734
40 Requires: libde265 >= 1.0.7
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 libheif is an ISO/IEC 23008-12:2017 HEIF file format decoder and
47 HEIF is a new image file format employing HEVC (h.265) image coding
48 for the best compression ratios currently possible.
50 libheif makes use of libde265 for the actual image decoding and x265
51 for encoding. Alternative codecs for, e.g., AVC and JPEG can be
54 %description -l pl.UTF-8
55 libheif to koder i dekoder formatu plików HEIF, zgodnego z ISO/IEC
58 HEIF to nowy format plików obrazów wykorzystujący kodowanie obrazu
59 HEVC (h.265) w celu osiągnięcia najwyższych dostepnych obecnie
60 współczynników kompresji.
62 libheif wykorzystuje libde265 do właściwego procesu dekodowania obrazu
63 oraz x265 do kodowania. Alternatywne kodeki do np. AVC czy JPEG mogą
64 być dostarczone jako wtyczki.
67 Summary: Header files for libheif
68 Summary(de.UTF-8): libheif Headers
69 Summary(pl.UTF-8): Pliki nagłówkowe libheif
71 Group: Development/Libraries
72 Requires: %{name} = %{version}-%{release}
73 %{?with_aom:Requires: aom-devel}
74 Requires: libde265-devel >= 1.0.7
75 Requires: libsharpyuv-devel
76 Requires: libstdc++-devel >= 6:4.7
77 Requires: libx265-devel
80 The header files are only needed for development of programs using the
83 %description devel -l pl.UTF-8
84 Pliki nagłówkowe, potrzebne jedynie do rozwijania oprogramowania
85 wykorzystującego bibliotekę libheif.
88 Summary: Static libheif library
89 Summary(pl.UTF-8): Statyczna biblioteka libheif
91 Group: Development/Libraries
92 Requires: %{name}-devel = %{version}-%{release}
95 Static libheif library.
97 %description static -l pl.UTF-8
98 Statyczna biblioteka libheif.
101 Summary: libheif utility programs
102 Summary(pl.UTF-8): Programy narzędziowe libheif
104 Group: Applications/Graphics
105 Requires: %{name} = %{version}-%{release}
108 This package contains utility programs to convert HEIF files.
110 %description progs -l pl.UTF-8
111 Ten pakiet zawiera programy narzędziowe do konwersji plików HEIF.
113 %package -n gdk-pixbuf2-loader-heif
114 Summary: gdk-pixbuf plugin to handle HEIF files
115 Summary(pl.UTF-8): Wtyczka gdk-pixbuf do obsługi plików HEIF
117 Requires: %{name} = %{version}-%{release}
119 %description -n gdk-pixbuf2-loader-heif
120 gdk-pixbuf plugin to handle HEIF files.
122 %description -n gdk-pixbuf2-loader-heif -l pl.UTF-8
123 Wtyczka gdk-pixbuf do obsługi plików HEIF.
129 %if %{with static_libs}
130 install -d build-static
133 -DBUILD_SHARED_LIBS=OFF \
134 -DENABLE_PLUGIN_LOADING=OFF \
135 %{!?with_aom:-DWITH_AOM_DECODER=OFF} \
136 %{!?with_aom:-DWITH_AOM_ENCODER=OFF} \
137 %{!?with_dav1d:-DWITH_DAV1D=OFF} \
138 %{!?with_rav1e:-DWITH_RAV1E=OFF} \
139 %{!?with_svtav1:-DWITH_SvtEnc=OFF}
148 %{?with_tests:-DBUILD_TESTING=ON} \
149 %{!?with_aom:-DWITH_AOM_DECODER=OFF} \
150 %{!?with_aom:-DWITH_AOM_ENCODER=OFF} \
151 %{!?with_dav1d:-DWITH_DAV1D=OFF} \
152 -DWITH_DAV1D_PLUGIN=ON \
153 %{!?with_rav1e:-DWITH_RAV1E=OFF} \
154 %{!?with_svtav1:-DWITH_SvtEnc=OFF}
158 %{?with_tests:%{__make} check}
161 rm -rf $RPM_BUILD_ROOT
163 %if %{with static_libs}
164 %{__make} -C build-static install \
165 DESTDIR=$RPM_BUILD_ROOT
168 %{__make} -C build install \
169 DESTDIR=$RPM_BUILD_ROOT
172 rm -rf $RPM_BUILD_ROOT
174 %post -p /sbin/ldconfig
175 %postun -p /sbin/ldconfig
178 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_libdir}/libheif.so.*.*.*
181 %attr(755,root,root) %ghost %{_libdir}/libheif.so.1
182 %dir %{_libdir}/libheif
183 # TODO: subpackages with plugins?
185 %attr(755,root,root) %{_libdir}/libheif/libheif-dav1d.so
188 %attr(755,root,root) %{_libdir}/libheif/libheif-rav1e.so
191 %attr(755,root,root) %{_libdir}/libheif/libheif-svtenc.so
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/libheif.so
197 %{_includedir}/libheif
198 %{_pkgconfigdir}/libheif.pc
199 %{_libdir}/cmake/libheif
201 %if %{with static_libs}
203 %defattr(644,root,root,755)
208 %defattr(644,root,root,755)
209 %attr(755,root,root) %{_bindir}/heif-convert
210 %attr(755,root,root) %{_bindir}/heif-enc
211 %attr(755,root,root) %{_bindir}/heif-info
212 %attr(755,root,root) %{_bindir}/heif-thumbnailer
213 %{_datadir}/thumbnailers/heif.thumbnailer
214 %{_mandir}/man1/heif-convert.1*
215 %{_mandir}/man1/heif-enc.1*
216 %{_mandir}/man1/heif-info.1*
217 %{_mandir}/man1/heif-thumbnailer.1*
219 %files -n gdk-pixbuf2-loader-heif
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*/loaders/libpixbufloader-heif.so