File macros.gdk-pixbuf of Package gdk-pixbuf
36
1
# RPM macros for packages installing a gdk-pixbuf loader
2
#
3
###
4
#
5
# When a package installs a gdk-pixbuf loader, it should use all
6
# three macros:
7
#
8
# - %gdk_pixbuf_loader_requires in the preamble
9
# - %gdk_pixbuf_loader_post in %post
10
# - %gdk_pixbuf_loader_postun in %postun
11
#
12
###
13
14
%gdk_pixbuf_loader_requires \
15
Requires(post): gdk-pixbuf-query-loaders \
16
Requires(postun): gdk-pixbuf-query-loaders
17
18
# On install, update the cache
19
%gdk_pixbuf_loader_post \
20
%if "%_lib" == "lib64" \
21
%{_bindir}/gdk-pixbuf-query-loaders-64 --update-cache \
22
%else \
23
%{_bindir}/gdk-pixbuf-query-loaders --update-cache \
24
%endif
25
26
# On uninstall, update the cache. Note: we ignore upgrades (already
27
# handled in %post of the new package).
28
%gdk_pixbuf_loader_postun \
29
if [ $1 -eq 0 ]; then \
30
%if "%_lib" == "lib64" \
31
%{_bindir}/gdk-pixbuf-query-loaders-64 --update-cache \
32
%else \
33
%{_bindir}/gdk-pixbuf-query-loaders --update-cache \
34
%endif \
35
fi
36