Accepting request 50673 from GNOME:Factory

Copy from GNOME:Factory/gdk-pixbuf based on submit request 50673 from user vuntz

OBS-URL: https://build.opensuse.org/request/show/50673
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdk-pixbuf?expand=0&rev=3
This commit is contained in:
OBS User autobuild 2010-10-15 10:44:53 +00:00 committed by Git OBS Bridge
commit acab5cde75
3 changed files with 65 additions and 26 deletions

View File

@ -1,6 +1,15 @@
gdk-pixbuf-query-loaders
+/usr/bin/gdk-pixbuf-query-loaders(-64)?
post "if [ $1 == 1 ]; then test -d %{_libdir}/gdk-pixbuf-2.0/2.10.0; if test $? -eq 0; then %{_bindir}/gdk-pixbuf-query-loaders --update-cache; fi; fi"
post "%if "%_lib" == "lib64""
post "if [ $1 == 1 ]; then test -d <prefix>%{_libdir}/gdk-pixbuf-2.0/2.10.0; if test $? -eq 0; then <prefix>%{_bindir}/gdk-pixbuf-query-loaders-64 --update-cache; fi; fi"
post "%else"
post "if [ $1 == 1 ]; then test -d <prefix>%{_libdir}/gdk-pixbuf-2.0/2.10.0; if test $? -eq 0; then <prefix>%{_bindir}/gdk-pixbuf-query-loaders --update-cache; fi; fi"
post "%endif"
libgdk_pixbuf-2_0-0
requires "gdk-pixbuf-query-loaders-<targettype>"
provides "gdk-pixbuf-<targettype> = <version>"
post "if test -f %{_bindir}/gdk-pixbuf-query-loaders; then %{_bindir}/gdk-pixbuf-query-loaders --update-cache; fi"
post "%if "%_lib" == "lib64""
post "if test -f <prefix>%{_bindir}/gdk-pixbuf-query-loaders-64; then <prefix>%{_bindir}/gdk-pixbuf-query-loaders-64 --update-cache; fi"
post "%else"
post "if test -f <prefix>%{_bindir}/gdk-pixbuf-query-loaders; then <prefix>%{_bindir}/gdk-pixbuf-query-loaders --update-cache; fi"
post "%endif"

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Wed Oct 13 20:21:06 CEST 2010 - vuntz@opensuse.org
- Put comments that are in the scriptlets area of the spec file in
"%if 0" statement: if we don't do that, they actually end up in
the scriplets and can even make them fail if the scriptlets were
just "-p /sbin/ldconfig".
-------------------------------------------------------------------
Tue Oct 12 00:13:44 CEST 2010 - vuntz@opensuse.org
- Remove gdk-pixbuf-query-loaders Requires(postun) in
libgdk_pixbuf-2_0-0: it's not needed.
- Add missing Requires for gdk-pixbuf-query-loaders to
libgdk_pixbuf-2_0-0 in baselibs.conf.
- Update baselibs.conf to remove assumption in the scriptlets of
the generated packages that they are 32bit packages.
- Use <prefix> in baselibs.conf since we use full paths there, and
this is needed for x86 packages that put files in
/emul/ia32-linux.
-------------------------------------------------------------------
Tue Sep 21 23:24:22 CEST 2010 - vuntz@opensuse.org

View File

@ -16,10 +16,12 @@
#
# When updating the binary version, do not forget to also update baselibs.conf
%define gdk_pixbuf_binary_version 2.10.0
Name: gdk-pixbuf
Version: 2.22.0
Release: 1
Release: 2
License: LGPLv2+
Summary: An image loading library
Group: System/Libraries
@ -47,7 +49,6 @@ Group: System/Libraries
# Provide %{name} to make the lang package installable
Provides: %{name} = %{version}
Requires(post): gdk-pixbuf-query-loaders
Requires(postun): gdk-pixbuf-query-loaders
Recommends: %{name}-lang = %{version}
Conflicts: gtk2 < 2.21.3
@ -100,7 +101,7 @@ cp -a %{S:2} .
%makeinstall
find %{buildroot}%{_libdir} -name '*.la' -delete -print
%find_lang %{name}
touch %{buildroot}%{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
touch %{buildroot}%{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders.cache
%if "%_lib" == "lib64"
mv %{buildroot}%{_bindir}/gdk-pixbuf-query-loaders %{buildroot}%{_bindir}/gdk-pixbuf-query-loaders-64
mv %{buildroot}%{_mandir}/man1/gdk-pixbuf-query-loaders.1 %{buildroot}%{_mandir}/man1/gdk-pixbuf-query-loaders-64.1
@ -109,41 +110,49 @@ touch %{buildroot}%{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
mkdir -p %{buildroot}%{_sysconfdir}/rpm
cp %{S:1} %{buildroot}%{_sysconfdir}/rpm
###########################################################################
# Note: when updating scriptlets, don't forget to also update baselibs.conf
###########################################################################
# Convenient %define for the scriplets
%if "%_lib" == "lib64"
%define GDK_PIXBUF_QUERY_LOADERS %{_bindir}/gdk-pixbuf-query-loaders-64
%define _gdk_pixbuf_query_loaders %{_bindir}/gdk-pixbuf-query-loaders-64
%else
%define GDK_PIXBUF_QUERY_LOADERS %{_bindir}/gdk-pixbuf-query-loaders
%define _gdk_pixbuf_query_loaders %{_bindir}/gdk-pixbuf-query-loaders
%endif
# In case libgdk_pixbuf-2_0-0 gets installed before
# gdk-pixbuf-query-loaders, we don't want to fail. So we make the
# call to gdk-pixbuf-query-loaders dependent on the existence of
# the binary. This is why we also have a %post for
# gdk-pixbuf-query-loaders.
%define _gdk_pixbuf_query_loaders_update_cache %{_gdk_pixbuf_query_loaders} --update-cache
%post -n libgdk_pixbuf-2_0-0
/sbin/ldconfig
if test -f %{GDK_PIXBUF_QUERY_LOADERS}; then
%{GDK_PIXBUF_QUERY_LOADERS} --update-cache
%if 0
# In case libgdk_pixbuf-2_0-0 gets installed before gdk-pixbuf-query-loaders,
# we don't want to fail. So we make the call to gdk-pixbuf-query-loaders
# dependent on the existence of the binary. This is why we also have a %post
# for gdk-pixbuf-query-loaders.
%endif
if test -f %{_gdk_pixbuf_query_loaders}; then
%{_gdk_pixbuf_query_loaders_update_cache}
fi
# If we install gdk-pixbuf-query-loaders for the first time,
# then we should run it in case libgdk_pixbuf-2_0-0 was installed
# first (ie, if %{_libdir}/gdk-pixbuf-2.0/2.10.0 already exists) which means
# gdk-pixbuf-query-loaders couldn't run there.
%post query-loaders
%if 0
# If we install gdk-pixbuf-query-loaders for the first time, then we should run
# it in case libgdk_pixbuf-2_0-0 was installed first (ie, if
# %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version} already exists) which
# means gdk-pixbuf-query-loaders couldn't run there.
%endif
if [ $1 == 1 ]; then
test -d %{_libdir}/gdk-pixbuf-2.0/2.10.0
test -d %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}
if test $? -eq 0; then
%{GDK_PIXBUF_QUERY_LOADERS} --update-cache
%{_gdk_pixbuf_query_loaders_update_cache}
fi
fi
%if 0
# No need to call gdk-pixbuf-query-loaders in postun:
# - if it's an upgrade, it will have been called in post
# - if it's an uninstall, we don't care about this anymore
%endif
%postun -n libgdk_pixbuf-2_0-0 -p /sbin/ldconfig
@ -156,10 +165,10 @@ fi
%{_libdir}/libgdk_pixbuf-2.0.so.0*
%{_libdir}/libgdk_pixbuf_xlib-2.0.so.0*
%dir %{_libdir}/gdk-pixbuf-2.0
%dir %{_libdir}/gdk-pixbuf-2.0/2.10.0
%dir %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders
%{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders/*.so
%ghost %{_libdir}/gdk-pixbuf-2.0/2.10.0/loaders.cache
%dir %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}
%dir %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders
%{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders/*.so
%ghost %{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders.cache
%{_libdir}/girepository-1.0/GdkPixbuf-2.0.typelib
%files query-loaders