]>
Commit | Line | Data |
---|---|---|
fe1629df JB |
1 | Summary: JPEG XL reference implementation |
2 | Summary(pl.UTF-8): Referencyjna implementacja JPEG XL | |
3 | Name: libjxl | |
4 | Version: 0.5 | |
6d9a9da7 | 5 | Release: 5 |
fe1629df JB |
6 | License: BSD |
7 | Group: Libraries | |
8 | #Source0Download: https://github.com/libjxl/libjxl/releases | |
9 | Source0: https://github.com/libjxl/libjxl/archive/v%{version}/%{name}-%{version}.tar.gz | |
10 | # Source0-md5: 692b38d4af06f0590304e9626b5fb881 | |
11 | Patch0: %{name}-system-libs.patch | |
12 | URL: https://github.com/libjxl/libjxl | |
13 | BuildRequires: OpenEXR-devel | |
14 | BuildRequires: asciidoc | |
15 | BuildRequires: cmake >= 3.10 | |
16 | BuildRequires: doxygen | |
17 | BuildRequires: gdk-pixbuf2-devel >= 2.38 | |
18 | BuildRequires: giflib-devel >= 5 | |
19 | BuildRequires: gimp-devel >= 1:2.10 | |
20 | BuildRequires: gmock-devel | |
21 | BuildRequires: gtest-devel | |
22 | BuildRequires: highway-devel | |
23 | BuildRequires: lcms2-devel >= 2 | |
24 | BuildRequires: libavif-devel | |
25 | BuildRequires: libbrotli-devel | |
26 | BuildRequires: libjpeg-devel | |
27 | BuildRequires: libpng-devel | |
28 | BuildRequires: libwebp-devel | |
29 | BuildRequires: libstdc++-devel >= 6:7 | |
53ed2867 | 30 | BuildRequires: lodepng-devel |
fe1629df JB |
31 | BuildRequires: pkgconfig |
32 | BuildRequires: python3-devel >= 1:3 | |
33 | BuildRequires: rpmbuild(macros) >= 1.605 | |
34 | BuildRequires: zlib-devel | |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %if "%{_lib}" != "lib" | |
38 | %define libext %(lib="%{_lib}"; echo ${lib#lib}) | |
39 | %define pqext -%{libext} | |
40 | %else | |
41 | %define pqext %{nil} | |
42 | %endif | |
43 | ||
44 | %description | |
45 | JPEG XL reference implementation. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Referencyjna implementacja JPEG XL. | |
49 | ||
50 | %package tools | |
51 | Summary: Tools to encode and decode JPEG XL files | |
52 | Summary(pl.UTF-8): Narzędzia do kodowania i dekodowania plików JPEG XL | |
53 | Group: Applications/Graphics | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description tools | |
57 | Tools to encode and decode JPEG XL files. | |
58 | ||
59 | %description tools -l pl.UTF-8 | |
60 | Narzędzia do kodowania i dekodowania plików JPEG XL. | |
61 | ||
62 | %package devel | |
63 | Summary: Header files for JXL libraries | |
64 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek JXL | |
65 | Group: Development/Libraries | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | Requires: highway-devel | |
68 | Requires: lcms2-devel >= 2 | |
69 | Requires: libbrotli-devel | |
70 | Requires: libstdc++-devel >= 6:7 | |
71 | ||
72 | %description devel | |
73 | Header files for JXL libraries. | |
74 | ||
75 | %description devel -l pl.UTF-8 | |
76 | Pliki nagłówkowe bibliotek JXL. | |
77 | ||
78 | %package static | |
79 | Summary: Static JXL libraries | |
80 | Summary(pl.UTF-8): Statyczne biblioteki JXL | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | ||
84 | %description static | |
85 | Static JXL libraries. | |
86 | ||
87 | %description static -l pl.UTF-8 | |
88 | Statyczne biblioteki JXL. | |
89 | ||
90 | %package -n gdk-pixbuf2-loader-jxl | |
91 | Summary: JPEG XL loader module for gdk-pixbuf2 library | |
92 | Summary(pl.UTF-8): Moduł biblioteki gdk-pixbuf2 wczytujący pliki JPEG XL | |
93 | Group: Libraries | |
94 | Requires: %{name} = %{version}-%{release} | |
95 | Requires: gdk-pixbuf2 >= 2.38 | |
96 | Requires: shared-mime-info | |
97 | ||
98 | %description -n gdk-pixbuf2-loader-jxl | |
99 | JPEG XL loader module for gdk-pixbuf2 library. | |
100 | ||
101 | %description -n gdk-pixbuf2-loader-jxl -l pl.UTF-8 | |
102 | Moduł biblioteki gdk-pixbuf2 wczytujący pliki JPEG XL. | |
103 | ||
104 | %package -n gimp-plugin-jxl | |
105 | Summary: JPEG XL load/save plugin for GIMP | |
106 | Summary(pl.UTF-8): Wtyczka wczytująca/zapisująca pliki JPEG XL dla GIMP-a | |
107 | Group: Applications/Graphics | |
108 | Requires: %{name} = %{version}-%{release} | |
109 | Requires: gimp >= 1:2.10 | |
110 | ||
111 | %description -n gimp-plugin-jxl | |
112 | JPEG XL load/save plugin for GIMP. | |
113 | ||
114 | %description -n gimp-plugin-jxl -l pl.UTF-8 | |
115 | Wtyczka wczytująca/zapisująca pliki JPEG XL dla GIMP-a. | |
116 | ||
117 | %prep | |
118 | %setup -q | |
119 | %patch0 -p1 | |
120 | ||
121 | %build | |
122 | install -d build | |
123 | cd build | |
124 | %cmake .. \ | |
125 | -DJPEGXL_ENABLE_PLUGINS=ON \ | |
126 | -DJPEGXL_ENABLE_SJPEG=OFF \ | |
127 | -DJPEGXL_ENABLE_SKCMS=OFF \ | |
128 | -DJPEGXL_ENABLE_TCMALLOC=OFF \ | |
129 | -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \ | |
130 | -DJPEGXL_FORCE_SYSTEM_GTEST=ON \ | |
131 | -DJPEGXL_FORCE_SYSTEM_HWY=ON | |
132 | ||
133 | %{__make} | |
134 | ||
135 | %install | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %{__make} -C build install \ | |
139 | DESTDIR=$RPM_BUILD_ROOT | |
140 | ||
141 | %clean | |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
144 | %post -p /sbin/ldconfig | |
145 | %postun -p /sbin/ldconfig | |
146 | ||
147 | %post -n gdk-pixbuf2-loader-jxl | |
148 | umask 022 | |
149 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : | |
150 | %update_mime_database | |
151 | ||
152 | %postun -n gdk-pixbuf2-loader-jxl | |
153 | %update_mime_database | |
154 | if [ "$1" != "0" ]; then | |
155 | umask 022 | |
156 | [ ! -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ] || \ | |
157 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : | |
158 | fi | |
159 | ||
160 | %files | |
161 | %defattr(644,root,root,755) | |
162 | %doc AUTHORS CHANGELOG.md CONTRIBUTORS LICENSE PATENTS README.md SECURITY.md doc/xl_overview.md | |
163 | %attr(755,root,root) %{_libdir}/libjxl.so.*.*.* | |
164 | %attr(755,root,root) %ghost %{_libdir}/libjxl.so.0 | |
165 | %attr(755,root,root) %{_libdir}/libjxl_threads.so.*.*.* | |
166 | %attr(755,root,root) %ghost %{_libdir}/libjxl_threads.so.0 | |
167 | ||
168 | %files tools | |
169 | %defattr(644,root,root,755) | |
170 | %attr(755,root,root) %{_bindir}/benchmark_xl | |
171 | %attr(755,root,root) %{_bindir}/cjxl | |
172 | %attr(755,root,root) %{_bindir}/djxl | |
173 | %{_mandir}/man1/cjxl.1* | |
174 | %{_mandir}/man1/djxl.1* | |
175 | ||
176 | %files devel | |
177 | %defattr(644,root,root,755) | |
178 | %attr(755,root,root) %{_libdir}/libjxl.so | |
179 | %attr(755,root,root) %{_libdir}/libjxl_threads.so | |
180 | %{_libdir}/libjxl_dec.a | |
181 | %{_includedir}/jxl | |
182 | %{_pkgconfigdir}/libjxl.pc | |
183 | %{_pkgconfigdir}/libjxl_threads.pc | |
184 | ||
185 | %files static | |
186 | %defattr(644,root,root,755) | |
187 | %{_libdir}/libjxl.a | |
188 | %{_libdir}/libjxl_threads.a | |
189 | ||
190 | %files -n gdk-pixbuf2-loader-jxl | |
191 | %defattr(644,root,root,755) | |
192 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jxl.so | |
193 | %{_datadir}/mime/packages/image-jxl.xml | |
194 | %{_datadir}/thumbnailers/jxl.thumbnailer | |
195 | ||
196 | %files -n gimp-plugin-jxl | |
197 | %defattr(644,root,root,755) | |
91d63043 | 198 | %dir %{_libdir}/gimp/2.0/plug-ins/file-jxl |
fe1629df | 199 | %attr(755,root,root) %{_libdir}/gimp/2.0/plug-ins/file-jxl/file-jxl |