]>
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 |
4351d2b1 | 9 | Version: 2.42.2 |
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 | |
4351d2b1 | 14 | # Source0-md5: 7d7617db8dae8ce313160384ab0a71db |
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 |
2c2cbfcf | 21 | BuildRequires: gtk-doc >= 1.20 |
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 |
405f4916 | 30 | BuildRequires: rpmbuild(macros) >= 1.752 |
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 | |
405f4916 | 91 | %{?noarchpackage} |
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} | |
38a172e0 | 101 | |
c1e066f3 | 102 | %build |
6aab4d95 | 103 | %meson build \ |
405f4916 JB |
104 | %{?with_apidocs:-Dgtk_doc=true} \ |
105 | -Dinstalled_tests=false | |
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 | ||
120 | touch $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders.cache | |
121 | ||
f361a645 | 122 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sr@ije,sr@ijekavian} |
ce56c90e | 123 | # not supported by glibc |
f361a645 | 124 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/io |
ce56c90e | 125 | |
6822717d | 126 | %find_lang gdk-pixbuf %{name}.lang |
c1e066f3 MB |
127 | |
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %post | |
132 | /sbin/ldconfig | |
c1e066f3 | 133 | umask 022 |
36650217 | 134 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : |
c1e066f3 MB |
135 | |
136 | %postun | |
137 | /sbin/ldconfig | |
c1e066f3 | 138 | if [ "$1" != "0" ]; then |
36650217 | 139 | umask 022 |
3854407a ER |
140 | # the $1 check does not match for multilib installs, check also that the binary still exists |
141 | [ ! -x %{_bindir}/gdk-pixbuf-query-loaders%{pqext} ] || \ | |
36650217 | 142 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : |
c1e066f3 | 143 | fi |
c1e066f3 | 144 | |
36650217 | 145 | %files -f %{name}.lang |
c1e066f3 | 146 | %defattr(644,root,root,755) |
6aab4d95 | 147 | %doc NEWS README.md |
c1e066f3 | 148 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-query-loaders%{pqext} |
13b94238 | 149 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-thumbnailer |
c1e066f3 MB |
150 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf-2.0.so.*.*.* |
151 | %attr(755,root,root) %ghost %{_libdir}/libgdk_pixbuf-2.0.so.0 | |
c1e066f3 MB |
152 | %dir %{_libdir}/gdk-pixbuf-2.0 |
153 | %dir %{_libdir}/gdk-pixbuf-2.0/%{abiver} | |
154 | %ghost %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders.cache | |
155 | %dir %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders | |
36650217 | 156 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/libpixbufloader-*.so |
13b94238 | 157 | %{_datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer |
9d5ca6f5 | 158 | %{_libdir}/girepository-1.0/GdkPixbuf-2.0.typelib |
6aab4d95 | 159 | %{_libdir}/girepository-1.0/GdkPixdata-2.0.typelib |
c1e066f3 MB |
160 | %{_mandir}/man1/gdk-pixbuf-query-loaders.1* |
161 | ||
162 | %files devel | |
163 | %defattr(644,root,root,755) | |
164 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-csource | |
8473b236 | 165 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-pixdata |
c1e066f3 | 166 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf-2.0.so |
9d5ca6f5 | 167 | %{_datadir}/gir-1.0/GdkPixbuf-2.0.gir |
6aab4d95 | 168 | %{_datadir}/gir-1.0/GdkPixdata-2.0.gir |
c1e066f3 MB |
169 | %{_mandir}/man1/gdk-pixbuf-csource.1* |
170 | %{_includedir}/gdk-pixbuf-2.0 | |
171 | %{_pkgconfigdir}/gdk-pixbuf-2.0.pc | |
c1e066f3 | 172 | |
6aab4d95 JP |
173 | %files static |
174 | %defattr(644,root,root,755) | |
175 | %{_libdir}/libgdk_pixbuf-2.0.a | |
6aab4d95 | 176 | |
c1e066f3 MB |
177 | %if %{with apidocs} |
178 | %files apidocs | |
179 | %defattr(644,root,root,755) | |
180 | %{_gtkdocdir}/gdk-pixbuf | |
181 | %endif |