]> git.pld-linux.org Git - packages/libheif.git/blob - libheif.spec
fix files without static_libs
[packages/libheif.git] / libheif.spec
1 #
2 # Conditional build:
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
10 #
11 %ifnarch %{ix86} %{x8664} aarch64
12 %undefine       with_rav1e
13 %endif
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
16 Name:           libheif
17 Version:        1.16.2
18 Release:        1
19 License:        LGPL v3+ (library), GPL v3+ (tools)
20 Group:          Libraries
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)
42
43 %description
44 libheif is an ISO/IEC 23008-12:2017 HEIF file format decoder and
45 encoder.
46
47 HEIF is a new image file format employing HEVC (h.265) image coding
48 for the best compression ratios currently possible.
49
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
52 provided as plugins.
53
54 %description -l pl.UTF-8
55 libheif to koder i dekoder formatu plików HEIF, zgodnego z ISO/IEC
56 23008-12:2017.
57
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.
61
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.
65
66 %package devel
67 Summary:        Header files for libheif
68 Summary(de.UTF-8):      libheif Headers
69 Summary(pl.UTF-8):      Pliki nagłówkowe libheif
70 License:        LGPL v3+
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
78
79 %description devel
80 The header files are only needed for development of programs using the
81 libheif library.
82
83 %description devel -l pl.UTF-8
84 Pliki nagłówkowe, potrzebne jedynie do rozwijania oprogramowania
85 wykorzystującego bibliotekę libheif.
86
87 %package static
88 Summary:        Static libheif library
89 Summary(pl.UTF-8):      Statyczna biblioteka libheif
90 License:        LGPL v3+
91 Group:          Development/Libraries
92 Requires:       %{name}-devel = %{version}-%{release}
93
94 %description static
95 Static libheif library.
96
97 %description static -l pl.UTF-8
98 Statyczna biblioteka libheif.
99
100 %package progs
101 Summary:        libheif utility programs
102 Summary(pl.UTF-8):      Programy narzędziowe libheif
103 License:        GPL v3+
104 Group:          Applications/Graphics
105 Requires:       %{name} = %{version}-%{release}
106
107 %description progs
108 This package contains utility programs to convert HEIF files.
109
110 %description progs -l pl.UTF-8
111 Ten pakiet zawiera programy narzędziowe do konwersji plików HEIF.
112
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
116 Group:          Libraries
117 Requires:       %{name} = %{version}-%{release}
118
119 %description -n gdk-pixbuf2-loader-heif
120 gdk-pixbuf plugin to handle HEIF files.
121
122 %description -n gdk-pixbuf2-loader-heif -l pl.UTF-8
123 Wtyczka gdk-pixbuf do obsługi plików HEIF.
124
125 %prep
126 %setup -q
127
128 %build
129 %if %{with static_libs}
130 install -d build-static
131 cd build-static
132 %cmake .. \
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}
140
141 %{__make}
142 cd ..
143 %endif
144
145 install -d build
146 cd build
147 %cmake .. \
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}
155
156 %{__make}
157
158 %{?with_tests:%{__make} check}
159
160 %install
161 rm -rf $RPM_BUILD_ROOT
162
163 %if %{with static_libs}
164 %{__make} -C build-static install \
165         DESTDIR=$RPM_BUILD_ROOT
166 %endif
167
168 %{__make} -C build install \
169         DESTDIR=$RPM_BUILD_ROOT
170
171 %clean
172 rm -rf $RPM_BUILD_ROOT
173
174 %post   -p /sbin/ldconfig
175 %postun -p /sbin/ldconfig
176
177 %files
178 %defattr(644,root,root,755)
179 %doc README.md
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?
184 %if %{with dav1d}
185 %attr(755,root,root) %{_libdir}/libheif/libheif-dav1d.so
186 %endif
187 %if %{with rav1e}
188 %attr(755,root,root) %{_libdir}/libheif/libheif-rav1e.so
189 %endif
190 %if %{with svtav1}
191 %attr(755,root,root) %{_libdir}/libheif/libheif-svtenc.so
192 %endif
193
194 %files devel
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
200
201 %if %{with static_libs}
202 %files static
203 %defattr(644,root,root,755)
204 %{_libdir}/libheif.a
205 %endif
206
207 %files progs
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*
218
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
This page took 0.232333 seconds and 3 git commands to generate.