]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | ||
5 | %define abiver 2.10.0 | |
6 | Summary: GdkPixbuf - an image loading and scaling library | |
7 | Summary(pl.UTF-8): GdkPixbuf - biblioteka ładująca i skalująca obrazki | |
8 | Name: gdk-pixbuf2 | |
9 | Version: 2.42.2 | |
10 | Release: 1 | |
11 | License: LGPL v2+ | |
12 | Group: Libraries | |
13 | Source0: https://download.gnome.org/sources/gdk-pixbuf/2.42/gdk-pixbuf-%{version}.tar.xz | |
14 | # Source0-md5: 7d7617db8dae8ce313160384ab0a71db | |
15 | URL: https://developer.gnome.org/gdk-pixbuf/ | |
16 | BuildRequires: docbook-dtd43-xml | |
17 | BuildRequires: docbook-style-xsl | |
18 | BuildRequires: gettext-tools >= 0.19 | |
19 | BuildRequires: glib2-devel >= 1:2.56.0 | |
20 | BuildRequires: gobject-introspection-devel >= 0.10.0 | |
21 | BuildRequires: gtk-doc >= 1.20 | |
22 | BuildRequires: libjpeg-devel | |
23 | BuildRequires: libpng-devel >= 1.0 | |
24 | BuildRequires: libtiff-devel >= 4 | |
25 | BuildRequires: libxslt-progs | |
26 | BuildRequires: meson >= 0.55.3 | |
27 | BuildRequires: ninja >= 1.5 | |
28 | BuildRequires: perl-devel | |
29 | BuildRequires: pkgconfig | |
30 | BuildRequires: rpmbuild(macros) >= 1.752 | |
31 | BuildRequires: shared-mime-info | |
32 | BuildRequires: tar >= 1:1.22 | |
33 | BuildRequires: xz | |
34 | Requires: glib2 >= 1:2.56.0 | |
35 | Requires: shared-mime-info | |
36 | Suggests: librsvg >= 2.31 | |
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 | |
48 | gdk-pixbuf is an image loading and scaling library that can be | |
49 | extended by loadable modules for new image formats. | |
50 | ||
51 | It is used by toolkits such as GTK+ or Clutter. | |
52 | ||
53 | %description -l pl.UTF-8 | |
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. | |
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 | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
65 | Requires: glib2-devel >= 1:2.56.0 | |
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 | ||
74 | %package static | |
75 | Summary: Static gdk-pixbuf library | |
76 | Summary(pl.UTF-8): Biblioteka statyczna gdk-pixbuf | |
77 | Group: Development/Libraries | |
78 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
79 | ||
80 | %description static | |
81 | Static gdk-pixbuf library. | |
82 | ||
83 | %description static -l pl.UTF-8 | |
84 | Biblioteka statyczna gdk-pixbuf. | |
85 | ||
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 | |
91 | %{?noarchpackage} | |
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} | |
101 | ||
102 | %build | |
103 | %meson build \ | |
104 | %{?with_apidocs:-Dgtk_doc=true} \ | |
105 | -Dinstalled_tests=false | |
106 | ||
107 | %ninja_build -C build | |
108 | ||
109 | %install | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %ninja_install -j1 -C build | |
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) | |
117 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders{,%{pqext}} | |
118 | %endif | |
119 | ||
120 | touch $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders.cache | |
121 | ||
122 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sr@ije,sr@ijekavian} | |
123 | # not supported by glibc | |
124 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/io | |
125 | ||
126 | %find_lang gdk-pixbuf %{name}.lang | |
127 | ||
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %post | |
132 | /sbin/ldconfig | |
133 | umask 022 | |
134 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : | |
135 | ||
136 | %postun | |
137 | /sbin/ldconfig | |
138 | if [ "$1" != "0" ]; then | |
139 | umask 022 | |
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} ] || \ | |
142 | %{_bindir}/gdk-pixbuf-query-loaders%{pqext} --update-cache || : | |
143 | fi | |
144 | ||
145 | %files -f %{name}.lang | |
146 | %defattr(644,root,root,755) | |
147 | %doc NEWS README.md | |
148 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-query-loaders%{pqext} | |
149 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-thumbnailer | |
150 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf-2.0.so.*.*.* | |
151 | %attr(755,root,root) %ghost %{_libdir}/libgdk_pixbuf-2.0.so.0 | |
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 | |
156 | %attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/libpixbufloader-*.so | |
157 | %{_datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer | |
158 | %{_libdir}/girepository-1.0/GdkPixbuf-2.0.typelib | |
159 | %{_libdir}/girepository-1.0/GdkPixdata-2.0.typelib | |
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 | |
165 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-pixdata | |
166 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf-2.0.so | |
167 | %{_datadir}/gir-1.0/GdkPixbuf-2.0.gir | |
168 | %{_datadir}/gir-1.0/GdkPixdata-2.0.gir | |
169 | %{_mandir}/man1/gdk-pixbuf-csource.1* | |
170 | %{_includedir}/gdk-pixbuf-2.0 | |
171 | %{_pkgconfigdir}/gdk-pixbuf-2.0.pc | |
172 | ||
173 | %files static | |
174 | %defattr(644,root,root,755) | |
175 | %{_libdir}/libgdk_pixbuf-2.0.a | |
176 | ||
177 | %if %{with apidocs} | |
178 | %files apidocs | |
179 | %defattr(644,root,root,755) | |
180 | %{_gtkdocdir}/gdk-pixbuf | |
181 | %endif |