| Server IP : 172.67.134.114 / Your IP : 104.23.197.123 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/rpm/macros.d/ |
Upload File : |
#
# RPM macros for gconf applications.
#
# (c) 2006-2007 SUSE LINUX
# Author: Stanislav Brabec <[email protected]>
# (c) 2009 Red Hat, Inc
# Author: Toshio Kuratomi <[email protected]>
#
# License: LGPLv2+
#
# Usage:
#
# Preamble:
# Requires(pre): GConf2
# Requires(preun): GConf2
# Requires(post): GConf2
#
# schemas names are without path and suffix
#
#
# %pre
# %gconf_schema_obsolete schema1
# %gconf_schema_prepare schema2 schema3
#
# %preun
# %gconf_schema_remove schema2 schema3
#
# %post
# %gconf_schema_upgrade schema2 schema3
#
# %files
# %{_sysconfdir}/gconf/schemas/schema2.schemas
# %{_sysconfdir}/gconf/schemas/schema3.schemas
# Copy schemas from old package for later uninstall on upgrade
%gconf_schema_prepare() \
if [ "$1" -gt 1 ] ; then \
rm -rf %{_localstatedir}/lib/rpm-state/gconf/* \
for schema in %{*} ; do \
if test -f %{_sysconfdir}/gconf/schemas/"$schema".schemas ; then \
cp -p %{_sysconfdir}/gconf/schemas/"$schema".schemas %{_localstatedir}/lib/rpm-state/gconf/ || : \
fi \
done \
fi \
%{nil}
# Macro to remove schemas. Not meant to be used publically
%_do_gconf_schema_remove() \
if test -f %{_sysconfdir}/gconf/schemas/"$schema".schemas ; then \
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || : \
fi \
%{nil}
# Remove schemas unconditionally
%gconf_schema_obsolete() \
for schema in %{*} ; do \
%_do_gconf_schema_remove \
done \
%{nil}
# Remove schemas on package removal (not upgrade)
%gconf_schema_remove() \
if [ "$1" -eq 0 ] ; then \
for schema in %{*} ; do \
%_do_gconf_schema_remove \
done \
fi \
%{nil}
%gconf_schema_upgrade() \
for schema in %{*} ; do \
if test -f %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas ; then \
cmp --quiet %{_sysconfdir}/gconf/schemas/"$schema".schemas %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas \
if test $? != 0; then\
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
gconftool-2 --makefile-uninstall-rule %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas > /dev/null || : \
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || : \
fi \
rm -f %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas \
else \
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || : \
fi \
done \
%{nil}