]>
Commit | Line | Data |
---|---|---|
c1e066f3 MB |
1 | # |
2 | # Conditional build: | |
405f4916 | 3 | %bcond_without apidocs # API documentation |
2a444766 | 4 | |
c1e066f3 | 5 | %define abiver 2.10.0 |
405f4916 JB |
6 | Summary: GdkPixbuf - an image loading and scaling library |
7 | Summary(pl.UTF-8): GdkPixbuf - biblioteka ładująca i skalująca obrazki | |
c1e066f3 | 8 | Name: gdk-pixbuf2 |
d7435219 | 9 | Version: 2.42.11 |
ab749bf8 | 10 | Release: 1 |
54f6e39e | 11 | License: LGPL v2+ |
405f4916 JB |
12 | Group: Libraries |
13 | Source0: https://download.gnome.org/sources/gdk-pixbuf/2.42/gdk-pixbuf-%{version}.tar.xz | |
d7435219 JB |
14 | # Source0-md5: b2ba2f594122001ac7f89e7d02560497 |
15 | Patch0: gdk-pixbuf-typo.patch | |
c0889a6f | 16 | URL: https://developer.gnome.org/gdk-pixbuf/ |
3aac1f90 | 17 | BuildRequires: docutils |
cdaf86d0 | 18 | BuildRequires: gettext-tools >= 0.19 |
405f4916 | 19 | BuildRequires: glib2-devel >= 1:2.56.0 |
3023a791 | 20 | BuildRequires: gobject-introspection-devel >= 0.10.0 |
37abca63 | 21 | %{?with_apidocs:BuildRequires: gi-docgen >= 2021.1} |
c1e066f3 | 22 | BuildRequires: libjpeg-devel |
788d16ff | 23 | BuildRequires: libpng-devel >= 1.0 |
14d965b8 | 24 | BuildRequires: libtiff-devel >= 4 |
4351d2b1 | 25 | BuildRequires: meson >= 0.55.3 |
405f4916 | 26 | BuildRequires: ninja >= 1.5 |
ebabf38d | 27 | BuildRequires: perl-devel |
c1e066f3 | 28 | BuildRequires: pkgconfig |
221fce9f | 29 | BuildRequires: rpm-build >= 4.6 |
d7fce5c4 | 30 | BuildRequires: rpmbuild(macros) >= 2.029 |
b0829ad7 | 31 | BuildRequires: shared-mime-info |
53b35dfe | 32 | BuildRequires: tar >= 1:1.22 |
53b35dfe | 33 | BuildRequires: xz |
405f4916 | 34 | Requires: glib2 >= 1:2.56.0 |
14d965b8 | 35 | Requires: shared-mime-info |
677d7e9e | 36 | Suggests: librsvg >= 2.31 |
c1e066f3 MB |
37 | Conflicts: gtk+2 < 2:2.21.3-1 |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %if "%{_lib}" != "lib" | |
41 | %define libext %(lib="%{_lib}"; echo ${lib#lib}) | |
42 | %define pqext -%{libext} | |
43 | %else | |
44 | %define pqext %{nil} | |
45 | %endif | |
46 | ||
47 | %description | |
88367156 JB |
48 | gdk-pixbuf is an image loading and scaling library that can be |
49 | extended by loadable modules for new image formats. | |
c1e066f3 MB |
50 | |
51 | It is used by toolkits such as GTK+ or Clutter. | |
52 | ||
53 | %description -l pl.UTF-8 | |
88367156 JB |
54 | gdk-pixbuf to biblioteka ładująca i skalująca obrazki, której |
55 | funkcjonalność może być rozszerzana o obsługę nowych formatów poprzez | |
56 | ładowane moduły. | |
c1e066f3 MB |
57 | |
58 | Używana jest przez biblioteki takie jak GTK+ czy Clutter. | |
59 | ||
60 | %package devel | |
61 | Summary: Header files for gdk-pixbuf library | |
62 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gdk-pixbuf | |
405f4916 | 63 | Group: Development/Libraries |
c1e066f3 | 64 | Requires: %{name} = %{version}-%{release} |
405f4916 | 65 | Requires: glib2-devel >= 1:2.56.0 |
c1e066f3 MB |
66 | Conflicts: gtk+2-devel < 2:2.21.3-1 |
67 | ||
68 | %description devel | |
69 | Header files for gdk-pixbuf library. | |
70 | ||
71 | %description devel -l pl.UTF-8 | |
72 | Pliki nagłówkowe biblioteki gdk-pixbuf. | |
73 | ||
6aab4d95 | 74 | %package static |
405f4916 JB |
75 | Summary: Static gdk-pixbuf library |
76 | Summary(pl.UTF-8): Biblioteka statyczna gdk-pixbuf | |
6aab4d95 JP |
77 | Group: Development/Libraries |
78 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
79 | ||
80 | %description static | |
405f4916 | 81 | Static gdk-pixbuf library. |
6aab4d95 JP |
82 | |
83 | %description static -l pl.UTF-8 | |
405f4916 | 84 | Biblioteka statyczna gdk-pixbuf. |
6aab4d95 | 85 | |
c1e066f3 MB |
86 | %package apidocs |
87 | Summary: gdk-pixbuf API documentation | |
88 | Summary(pl.UTF-8): Dokumentacja API biblioteki gdk-pixbuf | |
89 | Group: Documentation | |
90 | Conflicts: gtk+2-apidocs < 2:2.21.3-1 | |
a6afd4fd | 91 | BuildArch: noarch |
c1e066f3 MB |
92 | |
93 | %description apidocs | |
94 | API documentation for gdk-pixbuf library. | |
95 | ||
96 | %description apidocs -l pl.UTF-8 | |
97 | Dokumentacja API biblioteki gdk-pixbuf. | |
98 | ||
99 | %prep | |
100 | %setup -q -n gdk-pixbuf-%{version} | |
d7435219 | 101 | %patch0 -p1 |
38a172e0 | 102 | |
c1e066f3 | 103 | %build |
6aab4d95 | 104 | %meson build \ |
405f4916 | 105 | %{?with_apidocs:-Dgtk_doc=true} \ |
d7435219 JB |
106 | -Dinstalled_tests=false \ |
107 | -Dothers=enabled | |
0246ce7e | 108 | |
405f4916 | 109 | %ninja_build -C build |
c1e066f3 MB |
110 | |
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
405f4916 | 114 | %ninja_install -j1 -C build |
c1e066f3 MB |
115 | |
116 | %if "%{_lib}" != "lib" | |
117 | # We need to have 32-bit and 64-bit binaries as they have hardcoded LIBDIR. | |
118 | # (needed when multilib is used) | |
14d965b8 | 119 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders{,%{pqext}} |
c1e066f3 MB |
120 | %endif |
121 | ||
37abca63 | 122 | %if %{with apidocs} |
d7fce5c4 JB |
123 | install -d $RPM_BUILD_ROOT%{_gidocdir} |
124 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/gdk-* $RPM_BUILD_ROOT%{_gidocdir} | |
37abca63 JP |
125 | %endif |
126 | ||
c1e066f3 MB |
127 | touch $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders.cache |
128 | ||
f361a645 | 129 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sr@ije,sr@ijekavian} |
ce56c90e | 130 | # not supported by glibc |
f361a645 | 131 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/io |
ce56c90e | 132 | |
6822717d | 133 | %find_lang gdk-pixbuf %{name}.lang |
c1e066f3 MB |
134 | |
135 | %clean | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %post | |
139 | /sbin/ldconfig | |
c1e066f3 | 140 | umask 022 |
36650217 | 141 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : |
c1e066f3 MB |
142 | |
143 | %postun | |
144 | /sbin/ldconfig | |
c1e066f3 | 145 | if [ "$1" != "0" ]; then |
36650217 | 146 | umask 022 |
3854407a ER |
147 | # the $1 check does not match for multilib installs, check also that the binary still exists |
148 | [ ! -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ] || \ | |
36650217 | 149 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : |
c1e066f3 | 150 | fi |
c1e066f3 | 151 | |
36650217 | 152 | %files -f %{name}.lang |
c1e066f3 | 153 | %defattr(644,root,root,755) |
6aab4d95 | 154 | %doc NEWS README.md |
c1e066f3 | 155 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-query-loaders%{pqext} |
13b94238 | 156 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-thumbnailer |
c1e066f3 MB |
157 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf-2.0.so.*.*.* |
158 | %attr(755,root,root) %ghost %{_libdir}/libgdk_pixbuf-2.0.so.0 | |
c1e066f3 MB |
159 | %dir %{_libdir}/gdk-pixbuf-2.0 |
160 | %dir %{_libdir}/gdk-pixbuf-2.0/%{abiver} | |
161 | %ghost %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders.cache | |
162 | %dir %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders | |
36650217 | 163 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/libpixbufloader-*.so |
13b94238 | 164 | %{_datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer |
9d5ca6f5 | 165 | %{_libdir}/girepository-1.0/GdkPixbuf-2.0.typelib |
6aab4d95 | 166 | %{_libdir}/girepository-1.0/GdkPixdata-2.0.typelib |
c1e066f3 MB |
167 | %{_mandir}/man1/gdk-pixbuf-query-loaders.1* |
168 | ||
169 | %files devel | |
170 | %defattr(644,root,root,755) | |
171 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-csource | |
8473b236 | 172 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-pixdata |
c1e066f3 | 173 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf-2.0.so |
9d5ca6f5 | 174 | %{_datadir}/gir-1.0/GdkPixbuf-2.0.gir |
6aab4d95 | 175 | %{_datadir}/gir-1.0/GdkPixdata-2.0.gir |
c1e066f3 MB |
176 | %{_mandir}/man1/gdk-pixbuf-csource.1* |
177 | %{_includedir}/gdk-pixbuf-2.0 | |
178 | %{_pkgconfigdir}/gdk-pixbuf-2.0.pc | |
c1e066f3 | 179 | |
6aab4d95 JP |
180 | %files static |
181 | %defattr(644,root,root,755) | |
182 | %{_libdir}/libgdk_pixbuf-2.0.a | |
6aab4d95 | 183 | |
c1e066f3 MB |
184 | %if %{with apidocs} |
185 | %files apidocs | |
186 | %defattr(644,root,root,755) | |
d7fce5c4 JB |
187 | %{_gidocdir}/gdk-pixbuf |
188 | %{_gidocdir}/gdk-pixdata | |
c1e066f3 | 189 | %endif |