Accepting request 50330 from home:vuntz:branches:GNOME:Factory

some cosmetics... you should work in fashion.

OBS-URL: https://build.opensuse.org/request/show/50330
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdk-pixbuf?expand=0&rev=13
This commit is contained in:
Dominique Leuenberger 2010-10-12 20:34:52 +00:00 committed by Git OBS Bridge
parent 983eb4537f
commit dac29f1746
3 changed files with 50 additions and 23 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,16 @@
-------------------------------------------------------------------
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,6 +16,8 @@
#
# 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
@ -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,35 +110,39 @@ 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
%define _gdk_pixbuf_query_loaders_update_cache %{_gdk_pixbuf_query_loaders} --update-cache
# 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.
# 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.
%post -n libgdk_pixbuf-2_0-0
/sbin/ldconfig
if test -f %{GDK_PIXBUF_QUERY_LOADERS}; then
%{GDK_PIXBUF_QUERY_LOADERS} --update-cache
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.
# 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.
%post query-loaders
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
@ -156,10 +161,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