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