Dominique Leuenberger
5005a241a6
- Fix a syntax error in the gtk4_immodule_postun RPM macro OBS-URL: https://build.opensuse.org/request/show/922847 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk4?expand=0&rev=76
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
# RPM macros for packages installing a GTK+ IM module
|
|
#
|
|
###
|
|
#
|
|
# When a package installs a GTK+ IM module, it should use all
|
|
# three macros:
|
|
#
|
|
# - %gtk4_immodule_requires in the preamble
|
|
# - %gtk4_immodule_post in %post
|
|
# - %gtk4_immodule_postun in %postun
|
|
#
|
|
###
|
|
|
|
%gtk4_immodule_requires \
|
|
Requires(post): glib2-tools \
|
|
Requires(postun): glib2-tools
|
|
|
|
# On install, update the cache
|
|
%gtk4_immodule_post \
|
|
if [[ -x %{_bindir}/gio-querymodules-64 ]]; then \
|
|
%{_bindir}/gio-querymodules-64 %{_libdir}/gtk-4.0/4.0.0/immodules \
|
|
else \
|
|
%{_bindir}/gio-querymodules %{_libdir}/gtk-4.0/4.0.0/immodules \
|
|
fi
|
|
|
|
# On uninstall, update the cache. Note: we ignore upgrades (already
|
|
# handled in %post of the new package).
|
|
%gtk4_immodule_postun \
|
|
if [ $1 -eq 0 ]; then \
|
|
if [[ -x %{_bindir}/gio-querymodules-64 ]]; then \
|
|
%{_bindir}/gio-querymodules-64 %{_libdir}/gtk-4.0/4.0.0/immodules \
|
|
else \
|
|
%{_bindir}/gio-querymodules %{_libdir}/gtk-4.0/4.0.0/immodules \
|
|
fi \
|
|
fi
|