]>
Commit | Line | Data |
---|---|---|
dd8fb7b3 | 1 | # TODO: consider -x11 subpackages |
c1e066f3 MB |
2 | # |
3 | # Conditional build: | |
4 | %bcond_without apidocs # do not build and package API docs | |
2a444766 | 5 | |
c1e066f3 | 6 | %define abiver 2.10.0 |
88367156 JB |
7 | Summary: An image loading and scaling library |
8 | Summary(pl.UTF-8): Biblioteka ładująca i skalująca obrazki | |
c1e066f3 | 9 | Name: gdk-pixbuf2 |
8c3d320e | 10 | Version: 2.34.0 |
2a444766 | 11 | Release: 2 |
54f6e39e | 12 | License: LGPL v2+ |
c1e066f3 | 13 | Group: X11/Libraries |
8c3d320e MB |
14 | Source0: http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.34/gdk-pixbuf-%{version}.tar.xz |
15 | # Source0-md5: 63cb19f92cf7709ccf44bbb6fe1ff70c | |
38a172e0 | 16 | Patch0: %{name}-png-nodep.patch |
6ddf3e6f | 17 | URL: http://developer.gnome.org/gdk-pixbuf/ |
c1e066f3 | 18 | BuildRequires: autoconf >= 2.63 |
011aa2c5 | 19 | BuildRequires: automake >= 1:1.11 |
cdaf86d0 | 20 | BuildRequires: gettext-tools >= 0.19 |
f361a645 | 21 | BuildRequires: glib2-devel >= 1:2.37.6 |
3023a791 | 22 | BuildRequires: gobject-introspection-devel >= 0.10.0 |
2c2cbfcf | 23 | BuildRequires: gtk-doc >= 1.20 |
c1e066f3 MB |
24 | BuildRequires: jasper-devel |
25 | BuildRequires: libjpeg-devel | |
26 | BuildRequires: libpng-devel | |
27 | BuildRequires: libtiff-devel | |
28 | BuildRequires: libtool >= 2:2.2.6 | |
29 | BuildRequires: libxslt-progs | |
ebabf38d | 30 | BuildRequires: perl-devel |
c1e066f3 | 31 | BuildRequires: pkgconfig |
58fa43f3 | 32 | BuildRequires: rpmbuild(macros) >= 1.527 |
53b35dfe | 33 | BuildRequires: tar >= 1:1.22 |
c1e066f3 | 34 | BuildRequires: xorg-lib-libX11-devel |
53b35dfe | 35 | BuildRequires: xz |
f361a645 | 36 | Requires: glib2 >= 1:2.37.6 |
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 | |
64 | Group: X11/Development/Libraries | |
65 | Requires: %{name} = %{version}-%{release} | |
f361a645 | 66 | Requires: glib2-devel >= 1:2.37.6 |
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 | ||
75 | %package apidocs | |
76 | Summary: gdk-pixbuf API documentation | |
77 | Summary(pl.UTF-8): Dokumentacja API biblioteki gdk-pixbuf | |
78 | Group: Documentation | |
79 | Conflicts: gtk+2-apidocs < 2:2.21.3-1 | |
2a444766 ER |
80 | %if "%{_rpmversion}" >= "5" |
81 | BuildArch: noarch | |
82 | %endif | |
c1e066f3 MB |
83 | |
84 | %description apidocs | |
85 | API documentation for gdk-pixbuf library. | |
86 | ||
87 | %description apidocs -l pl.UTF-8 | |
88 | Dokumentacja API biblioteki gdk-pixbuf. | |
89 | ||
90 | %prep | |
91 | %setup -q -n gdk-pixbuf-%{version} | |
38a172e0 JB |
92 | %patch0 -p1 |
93 | ||
c1e066f3 | 94 | %build |
88367156 | 95 | %{__gettextize} |
c1e066f3 MB |
96 | %{__libtoolize} |
97 | %{__aclocal} | |
98 | %{__autoconf} | |
99 | %{__autoheader} | |
100 | %{__automake} | |
101 | %configure \ | |
8473b236 | 102 | --disable-silent-rules \ |
c1e066f3 MB |
103 | --enable-man \ |
104 | %{__enable_disable apidocs gtk-doc} \ | |
105 | --with-html-dir=%{_gtkdocdir} \ | |
d5771b42 ŁK |
106 | --with-libjasper \ |
107 | --with-x11 | |
c1e066f3 MB |
108 | %{__make} |
109 | ||
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %{__make} install \ | |
114 | DESTDIR=$RPM_BUILD_ROOT | |
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) | |
36650217 | 119 | mv -f $RPM_BUILD_ROOT%{_bindir}/gdk-pixbuf-query-loaders{,%{pqext}} |
c1e066f3 MB |
120 | %endif |
121 | ||
122 | touch $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders.cache | |
123 | ||
73cec6ae TP |
124 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/*.la \ |
125 | $RPM_BUILD_ROOT%{_libdir}/libgdk_pixbuf{,_xlib}-2.0.la | |
c1e066f3 | 126 | |
73cec6ae | 127 | %{!?with_apidocs:%{__rm} -r $RPM_BUILD_ROOT%{_gtkdocdir}} |
c1e066f3 | 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) |
e0ed300b | 154 | %doc AUTHORS NEWS |
c1e066f3 MB |
155 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-query-loaders%{pqext} |
156 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf-2.0.so.*.*.* | |
157 | %attr(755,root,root) %ghost %{_libdir}/libgdk_pixbuf-2.0.so.0 | |
158 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf_xlib-2.0.so.*.*.* | |
159 | %attr(755,root,root) %ghost %{_libdir}/libgdk_pixbuf_xlib-2.0.so.0 | |
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 |
9d5ca6f5 | 165 | %{_libdir}/girepository-1.0/GdkPixbuf-2.0.typelib |
c1e066f3 MB |
166 | %{_mandir}/man1/gdk-pixbuf-query-loaders.1* |
167 | ||
168 | %files devel | |
169 | %defattr(644,root,root,755) | |
170 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-csource | |
8473b236 | 171 | %attr(755,root,root) %{_bindir}/gdk-pixbuf-pixdata |
c1e066f3 MB |
172 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf-2.0.so |
173 | %attr(755,root,root) %{_libdir}/libgdk_pixbuf_xlib-2.0.so | |
9d5ca6f5 | 174 | %{_datadir}/gir-1.0/GdkPixbuf-2.0.gir |
c1e066f3 MB |
175 | %{_mandir}/man1/gdk-pixbuf-csource.1* |
176 | %{_includedir}/gdk-pixbuf-2.0 | |
177 | %{_pkgconfigdir}/gdk-pixbuf-2.0.pc | |
178 | %{_pkgconfigdir}/gdk-pixbuf-xlib-2.0.pc | |
179 | ||
180 | %if %{with apidocs} | |
181 | %files apidocs | |
182 | %defattr(644,root,root,755) | |
183 | %{_gtkdocdir}/gdk-pixbuf | |
184 | %endif |