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