| Server IP : 178.212.43.201 / Your IP : 10.100.0.33 Web Server : Apache/2.4.37 (Oracle Linux Server) OpenSSL/1.1.1k System : Linux spa0007.srv.paxillus.pl 5.4.17-2136.355.3.1.el8uek.x86_64 #3 SMP Sat May 9 17:11:55 PDT 2026 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | 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}